File tree 3 files changed +5
-9
lines changed
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 102
102
if [ -z " $prefix " ]; then
103
103
die " You must provide the --prefix option."
104
104
fi
105
- dir=" $prefix "
105
+ dir=" $( dirname " $ prefix/. " ) "
106
106
107
107
if [ " $command " != " pull" ]; then
108
108
revs=$( git rev-parse $default --revs-only " $@ " ) || exit $?
@@ -175,7 +175,7 @@ find_latest_squash()
175
175
sq=
176
176
main=
177
177
sub=
178
- git log --grep=" ^git-subtree-dir: $dir \$ " \
178
+ git log --grep=" ^git-subtree-dir: $dir /* \$ " \
179
179
--pretty=format:' START %H%n%s%n%n%b%nEND%n' HEAD |
180
180
while read a b junk; do
181
181
debug " $a $b $junk "
@@ -210,7 +210,7 @@ find_existing_splits()
210
210
revs=" $2 "
211
211
main=
212
212
sub=
213
- git log --grep=" ^git-subtree-dir: $dir \$ " \
213
+ git log --grep=" ^git-subtree-dir: $dir /* \$ " \
214
214
--pretty=format:' START %H%n%s%n%n%b%nEND%n' $revs |
215
215
while read a b junk; do
216
216
case " $a " in
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ git branch subdir
82
82
83
83
git fetch ../subproj sub1
84
84
git branch sub1 FETCH_HEAD
85
- git subtree add --prefix=subdir FETCH_HEAD
85
+ git subtree add --prefix=subdir/ FETCH_HEAD
86
86
87
87
# this shouldn't actually do anything, since FETCH_HEAD is already a parent
88
88
git merge -m ' merge -s -ours' -s ours FETCH_HEAD
@@ -118,7 +118,7 @@ create sub9
118
118
git commit -m ' sub9'
119
119
120
120
cd ../mainline
121
- split2=$( git subtree split --annotate=' *' --prefix subdir --rejoin)
121
+ split2=$( git subtree split --annotate=' *' --prefix subdir/ --rejoin)
122
122
git branch split2 " $split2 "
123
123
124
124
create subdir/main-sub10
Original file line number Diff line number Diff line change 36
36
one of the other git tools that git-subtree calls. Should
37
37
detect this situation and print the *real* problem.
38
38
39
- In fact, the prefix should *not* end with slash, and we
40
- should detect (and fix) it if it does. Otherwise the
41
- log message looks weird.
42
-
43
39
"pull --squash" should do fetch-synthesize-merge, but instead just
44
40
does "pull" directly, which doesn't work at all.
45
41
You can’t perform that action at this time.
0 commit comments