From: Junio C Hamano Date: Mon, 11 May 2015 21:39:28 +0000 (-0700) Subject: Sync with 2.3.8 X-Git-Tag: v2.4.1~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c99fec6e35437f9db228c5a37c676faf844b3fa3?ds=inline;hp=-c Sync with 2.3.8 Signed-off-by: Junio C Hamano --- c99fec6e35437f9db228c5a37c676faf844b3fa3 diff --combined Documentation/blame-options.txt index b299b59023,23b8ff80df..a09969ba08 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@@ -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 ,:: - -L ::: + -L ::: Annotate only the given line range. May be specified multiple times. Overlapping ranges are allowed. + diff --combined Documentation/git-log.txt index 18bc716a0c,6e65c5aa32..5692945a0b --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@@ -62,9 -62,9 +62,9 @@@ produced by `--stat`, etc output by allowing them to allocate space in advance. -L ,::: - -L :::: + -L :::: Trace the evolution of the line range given by "," - (or the funcname regex ) within the . You may + (or the function name regex ) within the . 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 c71e818cf4,adff610f8b..55470aa880 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -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.4.0/git.html[documentation for release 2.4] + +* release notes for + link:RelNotes/2.4.0.txt[2.4]. + - * link:v2.3.7/git.html[documentation for release 2.3.7] + * 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 d32c5327e5,73dc2f1024..bfd3016e83 --- a/builtin/config.c +++ b/builtin/config.c @@@ -5,7 -5,7 +5,7 @@@ #include "urlmatch.h" static const char *const builtin_config_usage[] = { - N_("git config [options]"), + N_("git config []"), 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 a490efea07,1a6bc5921b..a9ce0147b7 --- a/line-log.c +++ b/line-log.c @@@ -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 075ece6db1,596dfe712d..6eb83211b5 --- a/t/t4053-diff-no-index.sh +++ b/t/t4053-diff-no-index.sh @@@ -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