1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 20:36:15 +02:00

Merge branch 'maint'

* maint:
  blame: prevent a segv when -L given start > EOF
  git-push: document all the status flags used in the output
  Fix parsing of imap.preformattedHTML and imap.sslverify
  git-add documentation: Fix shell quoting example
This commit is contained in:
Junio C Hamano 2010-02-08 21:54:10 -08:00
commit 105a6339d8
5 changed files with 28 additions and 14 deletions

View File

@ -153,7 +153,7 @@ EXAMPLES
and its subdirectories:
+
------------
$ git add Documentation/\\*.txt
$ git add Documentation/\*.txt
------------
+
Note that the asterisk `\*` is quoted from the shell in this

View File

@ -176,12 +176,17 @@ If --porcelain is used, then each line of the output is of the form:
<flag> \t <from>:<to> \t <summary> (<reason>)
-------------------------------
The status of up-to-date refs is shown only if --porcelain or --verbose
option is used.
flag::
A single character indicating the status of the ref. This is
blank for a successfully pushed ref, `!` for a ref that was
rejected or failed to push, and '=' for a ref that was up to
date and did not need pushing (note that the status of up to
date refs is shown only when `git push` is running verbosely).
A single character indicating the status of the ref:
(space);; for a successfully pushed fast-forward;
`{plus}`;; for a successful forced update;
`-`;; for a successfully deleted ref;
`*`;; for a successfully pushed new ref;
`!`;; for a ref that was rejected or failed to push; and
`=`;; for a ref that was up to date and did not need pushing.
summary::
For a successfully pushed ref, the summary shows the old and new

View File

@ -2433,7 +2433,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
if (top < 1)
top = lno;
bottom--;
if (lno < top)
if (lno < top || lno < bottom)
die("file %s has only %lu lines", path, lno);
ent = xcalloc(1, sizeof(*ent));

View File

@ -1331,11 +1331,16 @@ static int git_imap_config(const char *key, const char *val, void *cb)
if (strncmp(key, imap_key, sizeof imap_key - 1))
return 0;
if (!val)
return config_error_nonbool(key);
key += sizeof imap_key - 1;
/* check booleans first, and barf on others */
if (!strcmp("sslverify", key))
server.ssl_verify = git_config_bool(key, val);
else if (!strcmp("preformattedhtml", key))
server.use_html = git_config_bool(key, val);
else if (!val)
return config_error_nonbool(key);
if (!strcmp("folder", key)) {
imap_folder = xstrdup(val);
} else if (!strcmp("host", key)) {
@ -1356,10 +1361,6 @@ static int git_imap_config(const char *key, const char *val, void *cb)
server.port = git_config_int(key, val);
else if (!strcmp("tunnel", key))
server.tunnel = xstrdup(val);
else if (!strcmp("sslverify", key))
server.ssl_verify = git_config_bool(key, val);
else if (!strcmp("preformattedHTML", key))
server.use_html = git_config_bool(key, val);
return 0;
}

View File

@ -157,4 +157,12 @@ EOF
git --no-pager blame $COMMIT -- uno >/dev/null
'
test_expect_success 'blame -L with invalid start' '
test_must_fail git blame -L5 tres 2>&1 | grep "has only 2 lines"
'
test_expect_success 'blame -L with invalid end' '
git blame -L1,5 tres 2>&1 | grep "has only 2 lines"
'
test_done