summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-29 00:42:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-29 00:42:26 (GMT)
commit1ba5c532e1f6ede63fd46bf6b647e70baa10a364 (patch)
tree5b514b2936389e2f0433565881c8555fe189c644
parent078e9bce1e8e2484d33d7400ae02c10954fd93ac (diff)
parentedac1883dc5fbadbc2d7d7cf975ed347eaef0702 (diff)
downloadgit-1ba5c532e1f6ede63fd46bf6b647e70baa10a364.zip
git-1ba5c532e1f6ede63fd46bf6b647e70baa10a364.tar.gz
git-1ba5c532e1f6ede63fd46bf6b647e70baa10a364.tar.bz2
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"
-rw-r--r--Documentation/RelNotes-1.7.1.1.txt17
-rw-r--r--builtin/notes.c4
-rw-r--r--notes.c2
-rwxr-xr-xt/t3301-notes.sh6
4 files changed, 27 insertions, 2 deletions
diff --git a/Documentation/RelNotes-1.7.1.1.txt b/Documentation/RelNotes-1.7.1.1.txt
index bfdb5ba..1f94db8 100644
--- a/Documentation/RelNotes-1.7.1.1.txt
+++ b/Documentation/RelNotes-1.7.1.1.txt
@@ -17,6 +17,13 @@ Fixes since v1.7.1
* We didn't recognize timezone "Z" as a synonym for "UTC" (75b37e70).
+ * In 1.7.0, read-tree and user commands that use the mechanism such as
+ checkout and merge were fixed to handle switching between branches one
+ of which has a file while the other has a directory at the same path
+ correctly even when there are some "confusing" pathnames in them. But
+ the algorithm used for this fix was suboptimal and had a terrible
+ performance degradation especially in larger trees.
+
* "git am -3" did not show diagnosis when the patch in the message was corrupt.
* After "git apply --whitespace=fix" removed trailing blank lines in an
@@ -57,10 +64,15 @@ Fixes since v1.7.1
* "git merge --log" used to replace the custom message given by "-m" with
the shortlog, instead of appending to it.
+ * "git notes copy" without any other argument segfaulted.
+
* "git pull" accepted "--dry-run", gave it to underlying "git fetch" but
ignored the option itself, resulting in a bogus attempt to merge
unrelated commit.
+ * "git rebase" did not faithfully reproduce a malformed author ident, that
+ is often seen in a repository converted from foreign SCMs.
+
* "git reset --hard" started from a wrong directory and a working tree in
a nonstandard location is in use got confused.
@@ -68,6 +80,9 @@ Fixes since v1.7.1
EHLO/HELO exchange, causing rejected connection from picky servers.
It learned --smtp-domain option to solve this issue.
+ * "git send-email" did not declare a content-transfer-encoding and
+ content-type even when its payload needs to be sent in 8-bit.
+
* "git show -C -C" and other corner cases lost diff metainfo output
in 1.7.0.
@@ -83,6 +98,6 @@ And other minor fixes and documentation updates.
--
exec >/var/tmp/1
-O=v1.7.1-195-gb2ebbd8
+O=v1.7.1-211-g54fcb21
echo O=$(git describe HEAD)
git shortlog --no-merges HEAD ^$O
diff --git a/builtin/notes.c b/builtin/notes.c
index f1f53a8..190005f 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -614,6 +614,10 @@ static int copy(int argc, const char **argv, const char *prefix)
}
}
+ if (argc < 2) {
+ error("too few parameters");
+ usage_with_options(git_notes_copy_usage, options);
+ }
if (2 < argc) {
error("too many parameters");
usage_with_options(git_notes_copy_usage, options);
diff --git a/notes.c b/notes.c
index 6ee04e7..30d6ded 100644
--- a/notes.c
+++ b/notes.c
@@ -716,7 +716,7 @@ static int write_each_non_note_until(const char *note_path,
struct write_each_note_data *d)
{
struct non_note *n = d->next_non_note;
- int cmp, ret;
+ int cmp = 0, ret;
while (n && (!note_path || (cmp = strcmp(n->path, note_path)) <= 0)) {
if (note_path && cmp == 0)
; /* do nothing, prefer note to non-note */
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 64f32ad..2d67a40 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -1044,4 +1044,10 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
git log -1 > output &&
test_cmp expect output
'
+
+test_expect_success 'git notes copy diagnoses too many or too few parameters' '
+ test_must_fail git notes copy &&
+ test_must_fail git notes copy one two three
+'
+
test_done