Skip to content

Commit

Permalink
Sync with 2.0.2
Browse files Browse the repository at this point in the history
* maint:
  Git 2.0.2
  annotate: use argv_array
  • Loading branch information
gitster committed Jul 16, 2014
2 parents fb46e0c + ebc5da3 commit f2c9f21
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
19 changes: 19 additions & 0 deletions Documentation/RelNotes/2.0.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ unreleased) version of Git, that is available from the '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].

Expand Down
12 changes: 5 additions & 7 deletions builtin/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit f2c9f21

Please sign in to comment.