author | Junio C Hamano <gitster@pobox.com> | |
Tue, 9 Feb 2010 05:54:10 +0000 (21:54 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 9 Feb 2010 05:54:10 +0000 (21:54 -0800) |
* 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
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
index f74fcf37378239daded405833737481cdccae8c7..51cbeb7032865599317fd9d7d36a9c9e2f8cc0c5 100644 (file)
and its subdirectories:
+
------------
-$ git add Documentation/\\*.txt
+$ git add Documentation/\*.txt
------------
+
Note that the asterisk `\*` is quoted from the shell in this
index 73a921ca0f224506a0a5587205495c352909db53..bd79119dd36092f7b31c156a2ca72c7969cd7586 100644 (file)
<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 6408ec8ee6805fc42eb5e5dc52be6463d62128bf..10f7eacf6e881cdb54a6b4a4c0aafc5f9751e5a9 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
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 51f371ba9f08637657ec9198cf3f16d0c0407232..ba72fa4b6e2fcebc74e611ed1ca200a37b9f339d 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
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)) {
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 ad834f200ac0d6ecf532374311d896557a9b941d..4a8db74f7e09a143e73d647479ef62af91547865 100755 (executable)
--- a/t/t8003-blame.sh
+++ b/t/t8003-blame.sh
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