summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-subtree.sh2
-rwxr-xr-xtest.sh1
-rw-r--r--todo6
3 files changed, 2 insertions, 7 deletions
diff --git a/git-subtree.sh b/git-subtree.sh
index f7d2fe408d..b7c741cfd4 100755
--- a/git-subtree.sh
+++ b/git-subtree.sh
@@ -426,7 +426,7 @@ cmd_add()
debug "Adding $dir as '$rev'..."
git read-tree --prefix="$dir" $rev || exit $?
- git checkout "$dir" || exit $?
+ git checkout -- "$dir" || exit $?
tree=$(git write-tree) || exit $?
headrev=$(git rev-parse HEAD) || exit $?
diff --git a/test.sh b/test.sh
index 8283fadaad..bed7f27906 100755
--- a/test.sh
+++ b/test.sh
@@ -78,6 +78,7 @@ git init
create main4
git commit -m 'main4'
git branch -m master mainline
+git branch subdir
git fetch ../subproj sub1
git branch sub1 FETCH_HEAD
diff --git a/todo b/todo
index 3040b9f171..5e72b2e510 100644
--- a/todo
+++ b/todo
@@ -20,9 +20,6 @@
automated tests for --squash stuff
- test.sh fails in msysgit?
- sort error - see Thell's email
-
"add" command non-obviously requires a commitid; would be easier if
it had a "pull" sort of mode instead
@@ -43,9 +40,6 @@
should detect (and fix) it if it does. Otherwise the
log message looks weird.
- totally weird behavior in 'git subtree add' if --prefix matches
- a branch name
-
"pull --squash" should do fetch-synthesize-merge, but instead just
does "pull" directly, which doesn't work at all.