--- /dev/null
+#!/bin/sh
+
+git ls-files -d | xargs -r git rm
+git ls-files -m | xargs -r git add
+git ls-files -o --exclude-standard | xargs -r git add
+
#!/bin/sh
branch_name=$1
-
exists_local=$(git branch | grep -x " $branch_name" | wc -l)
exists_remote=$(git branch | grep -x " origin/$branch_name" | wc -l)
'
test_expect_success 'push only does one branch' '
- create-branch topic1 &&
+ checkout topic1 &&
echo "$test_name" >a &&
git commit -a -m "move topic1" &&
git rev-parse HEAD >head.topic1 &&
- create-branch topic2 &&
+ checkout topic2 &&
echo "$test_name" >a &&
git commit -a -m "move topic2" &&
git rev-parse HEAD >head.topic2 &&
#!/bin/sh
-test_description='script create branch'
+test_description='script pull'
. ./test-lib.sh
git clone ./. server &&
rm -fr server/.git/hooks &&
git remote add origin ./server &&
- git config --add branch.master.remote origin &&
- git config --add branch.master.merge refs/heads/master &&
- git fetch &&
-
git checkout -b stable &&
git push origin stable
'
test_expect_success 'pull does a rebase' '
- create-branch topic1 &&
+ checkout topic1 &&
echo "$test_name" >a.topic1 &&
git add a.topic1 &&
git commit -m "move topic1" &&
#test_expect_success 'pull does a rebase but does not fuck up merges' '
# # Change "a" itself so we will eventually conflict
-# create-branch topic2 &&
+# checkout topic2 &&
# echo "$test_name on topic2" >a &&
# git commit -a -m "move topic2" &&
#
--- /dev/null
+#!/bin/sh
+
+test_description='script add'
+
+. ./test-lib.sh
+
+export PATH=$PATH:../../scripts
+
+test_expect_success 'setup' '
+ echo "setup" >a &&
+ git add a &&
+ git commit -m "setup" &&
+ git clone ./. server &&
+ rm -fr server/.git/hooks &&
+ git remote add origin ./server &&
+ git checkout -b stable &&
+ git push origin stable
+'
+
+test_expect_success 'add picks up new files' '
+ echo "$test_name" >a.new &&
+ add &&
+ git commit -m "add"
+'
+
+test_expect_success 'add picks up changed files' '
+ echo "$test_name" >a.new &&
+ add &&
+ git commit -m "change"
+'
+
+test_expect_success 'add picks up removed files' '
+ rm a.new &&
+ add &&
+ git commit -m "remove"
+'
+
+test_done
+