Skip to content

Commit 1ba5c53

Browse files
committed
Merge branch 'maint'
* maint: Update draft release notes to 1.7.1.1 notes: Initialise variable to appease gcc notes: check number of parameters to "git notes copy"
2 parents 078e9bc + edac188 commit 1ba5c53

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

Documentation/RelNotes-1.7.1.1.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ Fixes since v1.7.1
1717

1818
* We didn't recognize timezone "Z" as a synonym for "UTC" (75b37e70).
1919

20+
* In 1.7.0, read-tree and user commands that use the mechanism such as
21+
checkout and merge were fixed to handle switching between branches one
22+
of which has a file while the other has a directory at the same path
23+
correctly even when there are some "confusing" pathnames in them. But
24+
the algorithm used for this fix was suboptimal and had a terrible
25+
performance degradation especially in larger trees.
26+
2027
* "git am -3" did not show diagnosis when the patch in the message was corrupt.
2128

2229
* After "git apply --whitespace=fix" removed trailing blank lines in an
@@ -57,17 +64,25 @@ Fixes since v1.7.1
5764
* "git merge --log" used to replace the custom message given by "-m" with
5865
the shortlog, instead of appending to it.
5966

67+
* "git notes copy" without any other argument segfaulted.
68+
6069
* "git pull" accepted "--dry-run", gave it to underlying "git fetch" but
6170
ignored the option itself, resulting in a bogus attempt to merge
6271
unrelated commit.
6372

73+
* "git rebase" did not faithfully reproduce a malformed author ident, that
74+
is often seen in a repository converted from foreign SCMs.
75+
6476
* "git reset --hard" started from a wrong directory and a working tree in
6577
a nonstandard location is in use got confused.
6678

6779
* "git send-email" lacked a way to specify the domainname used in the
6880
EHLO/HELO exchange, causing rejected connection from picky servers.
6981
It learned --smtp-domain option to solve this issue.
7082

83+
* "git send-email" did not declare a content-transfer-encoding and
84+
content-type even when its payload needs to be sent in 8-bit.
85+
7186
* "git show -C -C" and other corner cases lost diff metainfo output
7287
in 1.7.0.
7388

@@ -83,6 +98,6 @@ And other minor fixes and documentation updates.
8398

8499
--
85100
exec >/var/tmp/1
86-
O=v1.7.1-195-gb2ebbd8
101+
O=v1.7.1-211-g54fcb21
87102
echo O=$(git describe HEAD)
88103
git shortlog --no-merges HEAD ^$O

builtin/notes.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,10 @@ static int copy(int argc, const char **argv, const char *prefix)
614614
}
615615
}
616616

617+
if (argc < 2) {
618+
error("too few parameters");
619+
usage_with_options(git_notes_copy_usage, options);
620+
}
617621
if (2 < argc) {
618622
error("too many parameters");
619623
usage_with_options(git_notes_copy_usage, options);

notes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ static int write_each_non_note_until(const char *note_path,
716716
struct write_each_note_data *d)
717717
{
718718
struct non_note *n = d->next_non_note;
719-
int cmp, ret;
719+
int cmp = 0, ret;
720720
while (n && (!note_path || (cmp = strcmp(n->path, note_path)) <= 0)) {
721721
if (note_path && cmp == 0)
722722
; /* do nothing, prefer note to non-note */

t/t3301-notes.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,4 +1044,10 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
10441044
git log -1 > output &&
10451045
test_cmp expect output
10461046
'
1047+
1048+
test_expect_success 'git notes copy diagnoses too many or too few parameters' '
1049+
test_must_fail git notes copy &&
1050+
test_must_fail git notes copy one two three
1051+
'
1052+
10471053
test_done

0 commit comments

Comments
 (0)