Skip to content

Commit f2c9f21

Browse files
committed
Sync with 2.0.2
* maint: Git 2.0.2 annotate: use argv_array
2 parents fb46e0c + ebc5da3 commit f2c9f21

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

Documentation/RelNotes/2.0.2.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,22 @@ Git v2.0.2 Release Notes
1111
* Recent updates to "git repack" started to duplicate objects that
1212
are in packfiles marked with .keep flag into the new packfile by
1313
mistake.
14+
15+
* "git clone -b brefs/tags/bar" would have mistakenly thought we were
16+
following a single tag, even though it was a name of the branch,
17+
because it incorrectly used strstr().
18+
19+
* "%G" (nothing after G) is an invalid pretty format specifier, but
20+
the parser did not notice it as garbage.
21+
22+
* Code to avoid adding the same alternate object store twice was
23+
subtly broken for a long time, but nobody seems to have noticed.
24+
25+
* A handful of code paths had to read the commit object more than
26+
once when showing header fields that are usually not parsed. The
27+
internal data structure to keep track of the contents of the commit
28+
object has been updated to reduce the need for this double-reading,
29+
and to allow the caller find the length of the object.
30+
31+
* During "git rebase --merge", a conflicted patch could not be
32+
skipped with "--skip" if the next one also conflicted.

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from the 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v2.0.1/git.html[documentation for release 2.0.1]
46+
* link:v2.0.2/git.html[documentation for release 2.0.2]
4747

4848
* release notes for
49+
link:RelNotes/2.0.2.txt[2.0.2],
4950
link:RelNotes/2.0.1.txt[2.0.1],
5051
link:RelNotes/2.0.0.txt[2.0.0].
5152

builtin/annotate.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@
55
*/
66
#include "git-compat-util.h"
77
#include "builtin.h"
8+
#include "argv-array.h"
89

910
int cmd_annotate(int argc, const char **argv, const char *prefix)
1011
{
11-
const char **nargv;
12+
struct argv_array args = ARGV_ARRAY_INIT;
1213
int i;
13-
nargv = xmalloc(sizeof(char *) * (argc + 2));
1414

15-
nargv[0] = "annotate";
16-
nargv[1] = "-c";
15+
argv_array_pushl(&args, "annotate", "-c", NULL);
1716

1817
for (i = 1; i < argc; i++) {
19-
nargv[i+1] = argv[i];
18+
argv_array_push(&args, argv[i]);
2019
}
21-
nargv[argc + 1] = NULL;
2220

23-
return cmd_blame(argc + 1, nargv, prefix);
21+
return cmd_blame(args.argc, args.argv, prefix);
2422
}

0 commit comments

Comments
 (0)