From 8c2cfa55446f542454eb4acc7f49d1747e425c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Wed, 16 Jul 2014 10:51:33 +0200 Subject: [PATCH 1/2] annotate: use argv_array Simplify the code and get rid of some magic constants by using argv_array to build the argument list for cmd_blame. Be lazy and let the OS release our allocated memory, as before. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/annotate.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/builtin/annotate.c b/builtin/annotate.c index fc43eed36b..da413ae0d1 100644 --- a/builtin/annotate.c +++ b/builtin/annotate.c @@ -5,20 +5,18 @@ */ #include "git-compat-util.h" #include "builtin.h" +#include "argv-array.h" int cmd_annotate(int argc, const char **argv, const char *prefix) { - const char **nargv; + struct argv_array args = ARGV_ARRAY_INIT; int i; - nargv = xmalloc(sizeof(char *) * (argc + 2)); - nargv[0] = "annotate"; - nargv[1] = "-c"; + argv_array_pushl(&args, "annotate", "-c", NULL); for (i = 1; i < argc; i++) { - nargv[i+1] = argv[i]; + argv_array_push(&args, argv[i]); } - nargv[argc + 1] = NULL; - return cmd_blame(argc + 1, nargv, prefix); + return cmd_blame(args.argc, args.argv, prefix); } From ebc5da3208824e25a89672a3b91bd13629b215fe Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 16 Jul 2014 11:19:56 -0700 Subject: [PATCH 2/2] Git 2.0.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.0.2.txt | 19 +++++++++++++++++++ Documentation/git.txt | 3 ++- GIT-VERSION-GEN | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Documentation/RelNotes/2.0.2.txt b/Documentation/RelNotes/2.0.2.txt index c48c0aab27..8e8321b2ef 100644 --- a/Documentation/RelNotes/2.0.2.txt +++ b/Documentation/RelNotes/2.0.2.txt @@ -11,3 +11,22 @@ Git v2.0.2 Release Notes * Recent updates to "git repack" started to duplicate objects that are in packfiles marked with .keep flag into the new packfile by mistake. + + * "git clone -b brefs/tags/bar" would have mistakenly thought we were + following a single tag, even though it was a name of the branch, + because it incorrectly used strstr(). + + * "%G" (nothing after G) is an invalid pretty format specifier, but + the parser did not notice it as garbage. + + * Code to avoid adding the same alternate object store twice was + subtly broken for a long time, but nobody seems to have noticed. + + * A handful of code paths had to read the commit object more than + once when showing header fields that are usually not parsed. The + internal data structure to keep track of the contents of the commit + object has been updated to reduce the need for this double-reading, + and to allow the caller find the length of the object. + + * During "git rebase --merge", a conflicted patch could not be + skipped with "--skip" if the next one also conflicted. diff --git a/Documentation/git.txt b/Documentation/git.txt index 3d9c6d1743..9d0883d28f 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v2.0.1/git.html[documentation for release 2.0.1] +* link:v2.0.2/git.html[documentation for release 2.0.2] * release notes for + link:RelNotes/2.0.2.txt[2.0.2], link:RelNotes/2.0.1.txt[2.0.1], link:RelNotes/2.0.0.txt[2.0.0]. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0986062473..b14f852c0c 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.0.1 +DEF_VER=v2.0.2 LF=' '