Merge branch 'maint' to synchronize with 1.5.3.6
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 23:15:47 +0000 (15:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 23:21:12 +0000 (15:21 -0800)
* maint:
  GIT 1.5.3.6
  grep -An -Bm: fix invocation of external grep command

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/RelNotes-1.5.3.6.txt
Documentation/git.txt
builtin-grep.c

index c9f948e..069a2b2 100644 (file)
@@ -4,16 +4,18 @@ GIT v1.5.3.6 Release Notes
 Fixes since v1.5.3.5
 --------------------
 
- * git-cvsexportcommit handles root commits better;
+ * git-cvsexportcommit handles root commits better.
 
  * git-svn dcommit used to clobber when sending a series of
-   patches;
+   patches.
 
  * git-svn dcommit failed after attempting to rebase when
    started with a dirty index; now it stops upfront.
 
  * git-grep sometimes refused to work when your index was
-   unmerged;
+   unmerged.
+
+ * "git-grep -A1 -B2" acted as if it was told to run "git -A1 -B21".
 
  * git-hash-object did not honor configuration variables, such as
    core.compression.
@@ -44,9 +46,3 @@ Fixes since v1.5.3.5
    of deflateBound() has been added.
 
  * Quite a lot of documentation clarifications.
-
---
-exec >/var/tmp/1
-O=v1.5.3.5-57-gb574c8d
-echo O=`git describe refs/heads/maint`
-git shortlog --no-merges $O..refs/heads/maint
index 6db7ae1..5460201 100644 (file)
@@ -46,6 +46,7 @@ Documentation for older releases are available here:
 * link:v1.5.3/git.html[documentation for release 1.5.3]
 
 * release notes for
+  link:RelNotes-1.5.3.6.txt[1.5.3.6],
   link:RelNotes-1.5.3.5.txt[1.5.3.5],
   link:RelNotes-1.5.3.4.txt[1.5.3.4],
   link:RelNotes-1.5.3.3.txt[1.5.3.3],
index 185876b..bbf747f 100644 (file)
@@ -294,7 +294,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
                        if (opt->pre_context) {
                                push_arg("-B");
                                len += snprintf(argptr, sizeof(randarg)-len,
-                                               "%u", opt->pre_context);
+                                               "%u", opt->pre_context) + 1;
                                if (sizeof(randarg) <= len)
                                        die("maximum length of args exceeded");
                                push_arg(argptr);
@@ -303,7 +303,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
                        if (opt->post_context) {
                                push_arg("-A");
                                len += snprintf(argptr, sizeof(randarg)-len,
-                                               "%u", opt->post_context);
+                                               "%u", opt->post_context) + 1;
                                if (sizeof(randarg) <= len)
                                        die("maximum length of args exceeded");
                                push_arg(argptr);
@@ -313,7 +313,7 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
                else {
                        push_arg("-C");
                        len += snprintf(argptr, sizeof(randarg)-len,
-                                       "%u", opt->post_context);
+                                       "%u", opt->post_context) + 1;
                        if (sizeof(randarg) <= len)
                                die("maximum length of args exceeded");
                        push_arg(argptr);