Sync with 2.3.8
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 May 2015 21:39:28 +0000 (14:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 May 2015 21:39:28 +0000 (14:39 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1  2 
Documentation/blame-options.txt
Documentation/git-log.txt
Documentation/git.txt
builtin/config.c
line-log.c
t/t4053-diff-no-index.sh
index b299b5902360bdd9f784e5b3acdae3b558a6565a,23b8ff80df0b2a85049fb1d45903991e9b9131a4..a09969ba086609af5d35bbb3c5f30dfea5db00b6
@@@ -4,13 -4,13 +4,13 @@@
  
  --root::
        Do not treat root commits as boundaries.  This can also be
 -      controlled via the `blame.showroot` config option.
 +      controlled via the `blame.showRoot` config option.
  
  --show-stats::
        Include additional statistics at the end of blame output.
  
  -L <start>,<end>::
- -L :<regex>::
+ -L :<funcname>::
        Annotate only the given line range. May be specified multiple times.
        Overlapping ranges are allowed.
  +
index 18bc716a0c89e42d91973b510da1d61d33aad977,6e65c5aa328d6dfc918f614aea4e08a569f51221..5692945a0b38c0b9e8e79e73a9a755c292224c98
@@@ -62,9 -62,9 +62,9 @@@ produced by `--stat`, etc
        output by allowing them to allocate space in advance.
  
  -L <start>,<end>:<file>::
- -L :<regex>:<file>::
+ -L :<funcname>:<file>::
        Trace the evolution of the line range given by "<start>,<end>"
-       (or the funcname regex <regex>) within the <file>.  You may
+       (or the function name regex <funcname>) within the <file>.  You may
        not give any pathspec limiters.  This is currently limited to
        a walk starting from a single revision, i.e., you may only
        give zero or one positive revision arguments.
@@@ -184,7 -184,7 +184,7 @@@ log.date:
        `--date` option.)  Defaults to "default", which means to write
        dates like `Sat May 8 19:35:34 2010 -0500`.
  
 -log.showroot::
 +log.showRoot::
        If `false`, `git log` and related commands will not treat the
        initial commit as a big creation event.  Any root commits in
        `git log -p` output would be shown without a diff attached.
diff --combined Documentation/git.txt
index c71e818cf445d55e793229dd9cb46777e5f53a98,adff610f8b1f05e5f9a07f28f5138dd8c9683d16..55470aa880dc8d7acab2152acde31ec339132f24
@@@ -43,14 -43,10 +43,15 @@@ unreleased) version of Git, that is ava
  branch of the `git.git` repository.
  Documentation for older releases are available here:
  
- * link:v2.3.7/git.html[documentation for release 2.3.7]
 +* link:v2.4.0/git.html[documentation for release 2.4]
 +
 +* release notes for
 +  link:RelNotes/2.4.0.txt[2.4].
 +
+ * link:v2.3.8/git.html[documentation for release 2.3.8]
  
  * release notes for
+   link:RelNotes/2.3.8.txt[2.3.8],
    link:RelNotes/2.3.7.txt[2.3.7],
    link:RelNotes/2.3.6.txt[2.3.6],
    link:RelNotes/2.3.5.txt[2.3.5],
@@@ -929,7 -925,7 +930,7 @@@ for further details
        If this environment variable is set, then Git commands which need to
        acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
        will call this program with a suitable prompt as command-line argument
 -      and read the password from its STDOUT. See also the 'core.askpass'
 +      and read the password from its STDOUT. See also the 'core.askPass'
        option in linkgit:git-config[1].
  
  'GIT_TERMINAL_PROMPT'::
diff --combined builtin/config.c
index d32c5327e53e14a7af72e4ec91efc1b42a414659,73dc2f1024ad986a2421b0c6e9c5845574437d41..bfd3016e83f3fd4e5f4f2ec8f4d6f4c5a24e711f
@@@ -5,7 -5,7 +5,7 @@@
  #include "urlmatch.h"
  
  static const char *const builtin_config_usage[] = {
 -      N_("git config [options]"),
 +      N_("git config [<options>]"),
        NULL
  };
  
@@@ -455,9 -455,9 +455,9 @@@ static char *default_user_config(void
        struct strbuf buf = STRBUF_INIT;
        strbuf_addf(&buf,
                    _("# This is Git's per-user configuration file.\n"
-                     "[core]\n"
+                     "[user]\n"
                      "# Please adapt and uncomment the following lines:\n"
-                     "#        user = %s\n"
+                     "#        name = %s\n"
                      "#        email = %s\n"),
                    ident_default_name(),
                    ident_default_email());
diff --combined line-log.c
index a490efea07519edb006e515c8a0fdf60241e546d,1a6bc5921b4890273e4e9edab4d456cc27fd4064..a9ce0147b7edf698518a88372bb138cbc47aeb1d
@@@ -237,7 -237,7 +237,7 @@@ static void diff_ranges_release(struct 
        range_set_release(&diff->target);
  }
  
 -void line_log_data_init(struct line_log_data *r)
 +static void line_log_data_init(struct line_log_data *r)
  {
        memset(r, 0, sizeof(struct line_log_data));
        range_set_init(&r->ranges, 0);
@@@ -575,7 -575,7 +575,7 @@@ parse_lines(struct commit *commit, cons
  
                name_part = skip_range_arg(item->string);
                if (!name_part || *name_part != ':' || !name_part[1])
-                       die("-L argument '%s' not of the form start,end:file",
+                       die("-L argument not 'start,end:file' or ':funcname:file': %s",
                            item->string);
                range_part = xstrndup(item->string, name_part - item->string);
                name_part++;
diff --combined t/t4053-diff-no-index.sh
index 075ece6db16f9c313504559d95c5b1dc6b4c2e07,596dfe712d5e870cbc1a5b88358127d80d0f570c..6eb83211b593ecea798eba3790b9c76fc7d3aa60
@@@ -17,8 -17,8 +17,8 @@@ test_expect_success 'setup' 
  '
  
  test_expect_success 'git diff --no-index directories' '
 -      git diff --no-index a b >cnt
 -      test $? = 1 && test_line_count = 14 cnt
 +      test_expect_code 1 git diff --no-index a b >cnt &&
 +      test_line_count = 14 cnt
  '
  
  test_expect_success 'git diff --no-index relative path outside repo' '
@@@ -55,4 -55,38 +55,38 @@@ test_expect_success 'git diff --no-inde
        )
  '
  
+ test_expect_success 'diff D F and diff F D' '
+       (
+               cd repo &&
+               echo in-repo >a &&
+               echo non-repo >../non/git/a &&
+               mkdir sub &&
+               echo sub-repo >sub/a &&
+               test_must_fail git diff --no-index sub/a ../non/git/a >expect &&
+               test_must_fail git diff --no-index sub/a ../non/git/ >actual &&
+               test_cmp expect actual &&
+               test_must_fail git diff --no-index a ../non/git/a >expect &&
+               test_must_fail git diff --no-index a ../non/git/ >actual &&
+               test_cmp expect actual &&
+               test_must_fail git diff --no-index ../non/git/a a >expect &&
+               test_must_fail git diff --no-index ../non/git a >actual &&
+               test_cmp expect actual
+       )
+ '
+ test_expect_success 'turning a file into a directory' '
+       (
+               cd non/git &&
+               mkdir d e e/sub &&
+               echo 1 >d/sub &&
+               echo 2 >e/sub/file &&
+               printf "D\td/sub\nA\te/sub/file\n" >expect &&
+               test_must_fail git diff --no-index --name-status d e >actual &&
+               test_cmp expect actual
+       )
+ '
  test_done