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

1  2 
Documentation/git-add.txt
Documentation/git-push.txt
imap-send.c
index f74fcf37378239daded405833737481cdccae8c7,d0b279b829526fa277f51b9e03c1dee1e2abac07..51cbeb7032865599317fd9d7d36a9c9e2f8cc0c5
@@@ -39,7 -39,7 +39,7 @@@ The `git add` command will not add igno
  ignored files were explicitly specified on the command line, `git add`
  will fail with a list of ignored files.  Ignored files reached by
  directory recursion or filename globbing performed by Git (quote your
 -globs before the shell) will be silently ignored.  The `add` command can
 +globs before the shell) will be silently ignored.  The 'git add' command can
  be used to add ignored files with the `-f` (force) option.
  
  Please see linkgit:git-commit[1] for alternative ways to add content to a
@@@ -153,7 -153,7 +153,7 @@@ EXAMPLE
  and its subdirectories:
  +
  ------------
- $ git add Documentation/\\*.txt
+ $ git add Documentation/\*.txt
  ------------
  +
  Note that the asterisk `\*` is quoted from the shell in this
index 73a921ca0f224506a0a5587205495c352909db53,ab1bf99fdbcd2cf8fa3c114a44c84dde5a1aec91..bd79119dd36092f7b31c156a2ca72c7969cd7586
@@@ -10,7 -10,7 +10,7 @@@ SYNOPSI
  --------
  [verse]
  'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
 -         [--repo=<repository>] [-f | --force] [-v | --verbose]
 +         [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
           [<repository> <refspec>...]
  
  DESCRIPTION
@@@ -91,10 -91,6 +91,10 @@@ nor in any Push line of the correspondi
        will be tab-separated and sent to stdout instead of stderr.  The full
        symbolic names of the refs will be given.
  
 +--delete::
 +      All listed refs are deleted from the remote repository. This is
 +      the same as prefixing all refs with a colon.
 +
  --tags::
        All refs under `$GIT_DIR/refs/tags` are pushed, in
        addition to refspecs explicitly listed on the command
  
  --repo=<repository>::
        This option is only relevant if no <repository> argument is
 -      passed in the invocation. In this case, 'git-push' derives the
 +      passed in the invocation. In this case, 'git push' derives the
        remote name from the current branch: If it tracks a remote
        branch, then that remote repository is pushed to. Otherwise,
        the name "origin" is used. For this latter case, this option
@@@ -130,18 -126,11 +130,18 @@@ git push --repo=public  #
  +
  is that #1 always pushes to "public" whereas #2 pushes to "public"
  only if the current branch does not track a remote branch. This is
 -useful if you write an alias or script around 'git-push'.
 +useful if you write an alias or script around 'git push'.
 +
 +-u::
 +--set-upstream::
 +      For every branch that is up to date or successfully pushed, add
 +      upstream (tracking) reference, used by argument-less
 +      linkgit:git-pull[1] and other commands. For more information,
 +      see 'branch.<name>.merge' in linkgit:git-config[1].
  
  --thin::
  --no-thin::
 -      These options are passed to 'git-send-pack'.  Thin
 +      These options are passed to 'git send-pack'.  Thin
        transfer spends extra cycles to minimize the number of
        objects to be sent and meant to be used on slower connection.
  
@@@ -176,12 -165,17 +176,17 @@@ If --porcelain is used, then each line 
   <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 --combined imap-send.c
index 51f371ba9f08637657ec9198cf3f16d0c0407232,ea769a960a213249ecf2e2dde645f1f5e98cd761..ba72fa4b6e2fcebc74e611ed1ca200a37b9f339d
@@@ -965,13 -965,17 +965,13 @@@ static struct store *imap_open_store(st
        /* open connection to IMAP server */
  
        if (srvc->tunnel) {
 -              const char *argv[4];
 +              const char *argv[] = { srvc->tunnel, NULL };
                struct child_process tunnel = {0};
  
                imap_info("Starting tunnel '%s'... ", srvc->tunnel);
  
 -              argv[0] = "sh";
 -              argv[1] = "-c";
 -              argv[2] = srvc->tunnel;
 -              argv[3] = NULL;
 -
                tunnel.argv = argv;
 +              tunnel.use_shell = 1;
                tunnel.in = -1;
                tunnel.out = -1;
                if (start_command(&tunnel))
@@@ -1331,11 -1335,16 +1331,16 @@@ static int git_imap_config(const char *
        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;
  }