Skip to content

Commit b32acd2

Browse files
committed
Merge branch 'maint'
* maint: Update draft release notes to 1.6.1.1 Make t3411 executable fix handling of multiple untracked files for git mv -k add test cases for "git mv -k"
2 parents 3cf3b83 + eb475bf commit b32acd2

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

Documentation/RelNotes-1.6.1.1.txt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ GIT v1.6.1.1 Release Notes
44
Fixes since v1.6.1
55
------------------
66

7+
* "git apply" took file modes from the patch text and updated the mode
8+
bits of the target tree even when the patch was not about mode changes.
9+
10+
* "git checkout $tree" did not trigger an error.
11+
712
* "git describe --all" complained when a commit is described with a tag,
813
which was nonsense.
914

@@ -13,11 +18,27 @@ Fixes since v1.6.1
1318
* "git daemon", and "git merge-file" are more careful when freopen fails
1419
and barf, instead of going on and writing to unopened filehandle.
1520

16-
Other documentation fixes.
21+
* "git http-push" did not like some RFC 4918 compliant DAV server
22+
responses.
23+
24+
* "git merge -s recursive" mistakenly overwritten an untracked file in the
25+
work tree upon delete/modify conflict.
26+
27+
* "git merge -s recursive" didn't leave the index unmerged for entries with
28+
rename/delete conflictd.
29+
30+
* "git merge -s recursive" clobbered untracked files in the work tree.
31+
32+
* "git mv -k" with more than one errorneous paths misbehaved.
33+
34+
* "git rebase -i" issued an unnecessary error message upon a user error of
35+
marking the first commit to be "squash"ed.
36+
37+
Other documentation updates.
1738

1839
---
1940
exec >/var/tmp/1
20-
O=v1.6.1-15-ga9e67c8
41+
O=v1.6.1-47-g914186a
2142
echo O=$(git describe maint)
2243
git shortlog --no-merges $O..maint
2344

builtin-mv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
192192
memmove(destination + i,
193193
destination + i + 1,
194194
(argc - i) * sizeof(char *));
195+
i--;
195196
}
196197
} else
197198
die ("%s, source=%s, destination=%s",

t/t3411-rebase-preserve-around-merges.sh

100644100755
File mode changed.

t/t7001-mv.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,31 @@ test_expect_success \
3838
'git diff-tree -r -M --name-status HEAD^ HEAD | \
3939
grep "^R100..*path1/COPYING..*path0/COPYING"'
4040

41+
test_expect_success \
42+
'checking -k on non-existing file' \
43+
'git mv -k idontexist path0'
44+
45+
test_expect_success \
46+
'checking -k on untracked file' \
47+
'touch untracked1 &&
48+
git mv -k untracked1 path0 &&
49+
test -f untracked1 &&
50+
test ! -f path0/untracked1'
51+
52+
test_expect_success \
53+
'checking -k on multiple untracked files' \
54+
'touch untracked2 &&
55+
git mv -k untracked1 untracked2 path0 &&
56+
test -f untracked1 &&
57+
test -f untracked2 &&
58+
test ! -f path0/untracked1
59+
test ! -f path0/untracked2'
60+
61+
# clean up the mess in case bad things happen
62+
rm -f idontexist untracked1 untracked2 \
63+
path0/idontexist path0/untracked1 path0/untracked2 \
64+
.git/index.lock
65+
4166
test_expect_success \
4267
'adding another file' \
4368
'cp "$TEST_DIRECTORY"/../README path0/README &&

0 commit comments

Comments
 (0)