Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Feb 2010 05:54:10 +0000 (21:54 -0800)
committerJunio 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

Documentation/git-add.txt
Documentation/git-push.txt
builtin-blame.c
imap-send.c
t/t8003-blame.sh

index f74fcf37378239daded405833737481cdccae8c7..51cbeb7032865599317fd9d7d36a9c9e2f8cc0c5 100644 (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
index 73a921ca0f224506a0a5587205495c352909db53..bd79119dd36092f7b31c156a2ca72c7969cd7586 100644 (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
index 6408ec8ee6805fc42eb5e5dc52be6463d62128bf..10f7eacf6e881cdb54a6b4a4c0aafc5f9751e5a9 100644 (file)
@@ -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));
index 51f371ba9f08637657ec9198cf3f16d0c0407232..ba72fa4b6e2fcebc74e611ed1ca200a37b9f339d 100644 (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;
 }
 
index ad834f200ac0d6ecf532374311d896557a9b941d..4a8db74f7e09a143e73d647479ef62af91547865 100755 (executable)
@@ -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