diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-02-08 21:54:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-08 21:54:10 -0800 |
commit | 105a6339d8454d3856099f6ccea14435a05e2268 (patch) | |
tree | ae998ef88c0b1cd495c1fd354902e6d9a74e8974 | |
parent | 720c9f7bda20d8f307745772374647c1a2076b3d (diff) | |
parent | e33cc592deae8132936eea119554799e1039bc0f (diff) | |
download | git-105a6339d8454d3856099f6ccea14435a05e2268.tar.gz |
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
-rw-r--r-- | Documentation/git-add.txt | 2 | ||||
-rw-r--r-- | Documentation/git-push.txt | 15 | ||||
-rw-r--r-- | builtin-blame.c | 2 | ||||
-rw-r--r-- | imap-send.c | 15 | ||||
-rwxr-xr-x | t/t8003-blame.sh | 8 |
5 files changed, 28 insertions, 14 deletions
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index f74fcf3737..51cbeb7032 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -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 diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 73a921ca0f..bd79119dd3 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -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 diff --git a/builtin-blame.c b/builtin-blame.c index 6408ec8ee6..10f7eacf6e 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -2433,7 +2433,7 @@ parse_done: 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)); diff --git a/imap-send.c b/imap-send.c index 51f371ba9f..ba72fa4b6e 100644 --- a/imap-send.c +++ b/imap-send.c @@ -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; } diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh index ad834f200a..4a8db74f7e 100755 --- a/t/t8003-blame.sh +++ b/t/t8003-blame.sh @@ -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 |