Sync with 1.7.3.2
authorJunio C Hamano <gitster@pobox.com>
Fri, 22 Oct 2010 00:16:04 +0000 (17:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Oct 2010 00:16:10 +0000 (17:16 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1  2 
Documentation/diff-options.txt
Documentation/git-repack.txt
builtin/commit-tree.c
fast-import.c
git-am.sh
index f77a0f874937eb8e530d685fce2ee38e5e5f14a9,d723e992321490e64041caa5021e82bb75eefa02..e954af0ad6c20707c2bf950a021fa1296e2582ea
@@@ -48,9 -48,9 +48,9 @@@ endif::git-format-patch[
  --patience::
        Generate a diff using the "patience diff" algorithm.
  
- --stat[=width[,name-width]]::
+ --stat[=<width>[,<name-width>]]::
        Generate a diffstat.  You can override the default
-       output width for 80-column terminal by `--stat=width`.
+       output width for 80-column terminal by `--stat=<width>`.
        The width of the filename part can be controlled by
        giving another width to it separated by a comma.
  
        number of modified files, as well as number of added and deleted
        lines.
  
- --dirstat[=limit]::
+ --dirstat[=<limit>]::
        Output the distribution of relative amount of changes (number of lines added or
        removed) for each sub-directory. Directories with changes below
        a cut-off percent (3% by default) are not shown. The cut-off percent
-       can be set with `--dirstat=limit`. Changes in a child directory is not
+       can be set with `--dirstat=<limit>`. Changes in a child directory are not
        counted for the parent directory, unless `--cumulative` is used.
  
- --dirstat-by-file[=limit]::
+ --dirstat-by-file[=<limit>]::
        Same as `--dirstat`, but counts changed files instead of lines.
  
  --summary::
@@@ -248,13 -248,13 +248,13 @@@ endif::git-log[
        If `n` is specified, it has the same meaning as for `-M<n>`.
  
  ifndef::git-format-patch[]
- --diff-filter=[ACDMRTUXB*]::
+ --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]::
        Select only files that are Added (`A`), Copied (`C`),
        Deleted (`D`), Modified (`M`), Renamed (`R`), have their
        type (i.e. regular file, symlink, submodule, ...) changed (`T`),
        are Unmerged (`U`), are
        Unknown (`X`), or have had their pairing Broken (`B`).
-       Any combination of the filter characters may be used.
+       Any combination of the filter characters (including none) can be used.
        When `*` (All-or-none) is added to the combination, all
        paths are selected if there is any file that matches
        other criteria in the comparison; if there is no file
@@@ -284,12 -284,8 +284,12 @@@ ifndef::git-format-patch[
        appearing in diff output; see the 'pickaxe' entry in
        linkgit:gitdiffcore[7] for more details.
  
 +-G<regex>::
 +      Look for differences whose added or removed line matches
 +      the given <regex>.
 +
  --pickaxe-all::
 -      When `-S` finds a change, show all the changes in that
 +      When `-S` or `-G` finds a change, show all the changes in that
        changeset, not just the files that contain the change
        in <string>.
  
index 9566727f7ad6c1690571f7321f79da951c8c6b50,af79b86516764617163b020ec3c4d9bbeda9fe9b..27f7865b061cc96398f7aa052d162723e1f9255e
@@@ -8,7 -8,7 +8,7 @@@ git-repack - Pack unpacked objects in 
  
  SYNOPSIS
  --------
- 'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [--window=N] [--depth=N]
 -'git repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=<n>] [--depth=<n>]
++'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [--window=<n>] [--depth=<n>]
  
  DESCRIPTION
  -----------
@@@ -62,10 -62,6 +62,10 @@@ other objects in that pack they alread
        linkgit:git-pack-objects[1].
  
  -f::
 +      Pass the `--no-reuse-delta` option to `git-pack-objects`, see
 +      linkgit:git-pack-objects[1].
 +
 +-F::
        Pass the `--no-reuse-object` option to `git-pack-objects`, see
        linkgit:git-pack-objects[1].
  
@@@ -80,8 -76,8 +80,8 @@@
        this repository (or a direct copy of it)
        over HTTP or FTP.  See linkgit:git-update-server-info[1].
  
- --window=[N]::
- --depth=[N]::
+ --window=<n>::
+ --depth=<n>::
        These two options affect how the objects contained in the pack are
        stored using delta compression. The objects are first internally
        sorted by type, size and optionally names and compared against the
        to be applied that many times to get to the necessary object.
        The default value for --window is 10 and --depth is 50.
  
- --window-memory=[N]::
+ --window-memory=<n>::
        This option provides an additional limit on top of `--window`;
        the window size will dynamically scale down so as to not take
-       up more than N bytes in memory.  This is useful in
+       up more than '<n>' bytes in memory.  This is useful in
        repositories with a mix of large and small objects to not run
        out of memory with a large window, but still be able to take
        advantage of the large window for the smaller objects.  The
        `--window-memory=0` makes memory usage unlimited, which is the
        default.
  
- --max-pack-size=[N]::
+ --max-pack-size=<n>::
        Maximum size of each output pack file. The size can be suffixed with
        "k", "m", or "g". The minimum size allowed is limited to 1 MiB.
        If specified,  multiple packfiles may be created.
diff --combined builtin/commit-tree.c
index 732f8952bb2e6a03415e15a046f3c62df7f63a0d,e06573920f461229717b885e291c76831f87e428..d083795e26e7893c6b7d466f9bcf2be1311cfeb2
@@@ -9,7 -9,7 +9,7 @@@
  #include "builtin.h"
  #include "utf8.h"
  
- static const char commit_tree_usage[] = "git commit-tree <sha1> [-p <sha1>]* < changelog";
+ static const char commit_tree_usage[] = "git commit-tree <sha1> [(-p <sha1>)...] < changelog";
  
  static void new_parent(struct commit *parent, struct commit_list **parents_p)
  {
@@@ -56,12 -56,10 +56,12 @@@ int cmd_commit_tree(int argc, const cha
        if (strbuf_read(&buffer, 0, 0) < 0)
                die_errno("git commit-tree: failed to read");
  
 -      if (!commit_tree(buffer.buf, tree_sha1, parents, commit_sha1, NULL)) {
 -              printf("%s\n", sha1_to_hex(commit_sha1));
 -              return 0;
 -      }
 -      else
 +      if (commit_tree(buffer.buf, tree_sha1, parents, commit_sha1, NULL)) {
 +              strbuf_release(&buffer);
                return 1;
 +      }
 +
 +      printf("%s\n", sha1_to_hex(commit_sha1));
 +      strbuf_release(&buffer);
 +      return 0;
  }
diff --combined fast-import.c
index 8f68a892342f9fdfb968c4fbc7e17d92cca11765,eab68d58c394a67f4805d77b0007b583e79e24b9..77549ebd6fbfbea051901d4ab474eebc8e2dbdbd
@@@ -1454,15 -1454,6 +1454,15 @@@ static int tree_content_set
                n = slash1 - p;
        else
                n = strlen(p);
 +      if (!slash1 && !n) {
 +              if (!S_ISDIR(mode))
 +                      die("Root cannot be a non-directory");
 +              hashcpy(root->versions[1].sha1, sha1);
 +              if (root->tree)
 +                      release_tree_content_recursive(root->tree);
 +              root->tree = subtree;
 +              return 1;
 +      }
        if (!n)
                die("Empty path component found in input");
        if (!slash1 && !S_ISDIR(mode) && subtree)
@@@ -2893,7 -2884,7 +2893,7 @@@ static int git_pack_config(const char *
  }
  
  static const char fast_import_usage[] =
- "git fast-import [--date-format=f] [--max-pack-size=n] [--big-file-threshold=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
+ "git fast-import [--date-format=<f>] [--max-pack-size=<n>] [--big-file-threshold=<n>] [--depth=<n>] [--active-branches=<n>] [--export-marks=<marks.file>]";
  
  static void parse_argv(void)
  {
diff --combined git-am.sh
index 10436dcad56585774ee96ac3baadd04d5a151a84,de116a29ef091a23f60603a28f1260ba60f054ac..df09b42840b7675e135605f9108894ce93e6d477
+++ b/git-am.sh
@@@ -5,7 -5,7 +5,7 @@@
  SUBDIRECTORY_OK=Yes
  OPTIONS_KEEPDASHDASH=
  OPTIONS_SPEC="\
- git am [options] [<mbox>|<Maildir>...]
+ git am [options] [(<mbox>|<Maildir>)...]
  git am [options] (--resolved | --skip | --abort)
  --
  i,interactive   run interactively
@@@ -444,12 -444,12 +444,12 @@@ els
                                set x
                                first=
                        }
 -                      case "$arg" in
 -                      /*)
 -                              set "$@" "$arg" ;;
 -                      *)
 -                              set "$@" "$prefix$arg" ;;
 -                      esac
 +                      if is_absolute_path "$arg"
 +                      then
 +                              set "$@" "$arg"
 +                      else
 +                              set "$@" "$prefix$arg"
 +                      fi
                done
                shift
        fi