From: Junio C Hamano Date: Fri, 22 Oct 2010 00:16:04 +0000 (-0700) Subject: Sync with 1.7.3.2 X-Git-Tag: v1.7.4-rc0~173 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d4c436975214d8f94d38f9be0ef709b4714fc821?ds=inline;hp=-c Sync with 1.7.3.2 Signed-off-by: Junio C Hamano --- d4c436975214d8f94d38f9be0ef709b4714fc821 diff --combined Documentation/diff-options.txt index f77a0f8749,d723e99232..e954af0ad6 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@@ -48,9 -48,9 +48,9 @@@ endif::git-format-patch[ --patience:: Generate a diff using the "patience diff" algorithm. - --stat[=width[,name-width]]:: + --stat[=[,]]:: 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=`. The width of the filename part can be controlled by giving another width to it separated by a comma. @@@ -66,14 -66,14 +66,14 @@@ number of modified files, as well as number of added and deleted lines. - --dirstat[=limit]:: + --dirstat[=]:: 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=`. Changes in a child directory are not counted for the parent directory, unless `--cumulative` is used. - --dirstat-by-file[=limit]:: + --dirstat-by-file[=]:: 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`. 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:: + Look for differences whose added or removed line matches + the given . + --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 . diff --combined Documentation/git-repack.txt index 9566727f7a,af79b86516..27f7865b06 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@@ -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=] [--depth=] ++'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [--window=] [--depth=] 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=:: + --depth=:: 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 @@@ -91,10 -87,10 +91,10 @@@ 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=:: 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 '' 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 @@@ -102,7 -98,7 +102,7 @@@ `--window-memory=0` makes memory usage unlimited, which is the default. - --max-pack-size=[N]:: + --max-pack-size=:: 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 732f8952bb,e06573920f..d083795e26 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@@ -9,7 -9,7 +9,7 @@@ #include "builtin.h" #include "utf8.h" - static const char commit_tree_usage[] = "git commit-tree [-p ]* < changelog"; + static const char commit_tree_usage[] = "git commit-tree [(-p )...] < 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 8f68a89234,eab68d58c3..77549ebd6f --- a/fast-import.c +++ b/fast-import.c @@@ -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=] [--max-pack-size=] [--big-file-threshold=] [--depth=] [--active-branches=] [--export-marks=]"; static void parse_argv(void) { diff --combined git-am.sh index 10436dcad5,de116a29ef..df09b42840 --- a/git-am.sh +++ b/git-am.sh @@@ -5,7 -5,7 +5,7 @@@ SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ - git am [options] [|...] + git am [options] [(|)...] 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