]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bc/fix-cherry-pick-root' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 20:44:46 +0000 (12:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 20:44:46 +0000 (12:44 -0800)
* bc/fix-cherry-pick-root:
  builtin/revert.c: don't dereference a NULL pointer

127 files changed:
Documentation/CodingGuidelines
Documentation/RelNotes/1.7.3.1.txt [new file with mode: 0644]
Documentation/RelNotes/1.7.3.2.txt [new file with mode: 0644]
Documentation/SubmittingPatches
Documentation/config.txt
Documentation/diff-generate-patch.txt
Documentation/diff-options.txt
Documentation/git-am.txt
Documentation/git-apply.txt
Documentation/git-archive.txt
Documentation/git-bundle.txt
Documentation/git-cat-file.txt
Documentation/git-check-ref-format.txt
Documentation/git-checkout-index.txt
Documentation/git-checkout.txt
Documentation/git-cherry-pick.txt
Documentation/git-clone.txt
Documentation/git-commit-tree.txt
Documentation/git-daemon.txt
Documentation/git-diff.txt
Documentation/git-fast-export.txt
Documentation/git-fast-import.txt
Documentation/git-fetch.txt
Documentation/git-filter-branch.txt
Documentation/git-for-each-ref.txt
Documentation/git-format-patch.txt
Documentation/git-index-pack.txt
Documentation/git-init.txt
Documentation/git-log.txt
Documentation/git-ls-files.txt
Documentation/git-ls-tree.txt
Documentation/git-mailsplit.txt
Documentation/git-merge.txt
Documentation/git-mergetool.txt
Documentation/git-pack-objects.txt
Documentation/git-pull.txt
Documentation/git-push.txt
Documentation/git-reflog.txt
Documentation/git-relink.txt
Documentation/git-remote.txt
Documentation/git-repack.txt
Documentation/git-reset.txt
Documentation/git-rev-list.txt
Documentation/git-rev-parse.txt
Documentation/git-revert.txt
Documentation/git-shortlog.txt
Documentation/git-show-branch.txt
Documentation/git-show-ref.txt
Documentation/git-show.txt
Documentation/git-svn.txt
Documentation/git-update-index.txt
Documentation/git-web--browse.txt
Documentation/git.txt
Documentation/gitcore-tutorial.txt
Documentation/gitk.txt
Documentation/merge-strategies.txt
Documentation/pretty-options.txt
Documentation/rev-list-options.txt
Documentation/revisions.txt
Documentation/technical/api-sigchain.txt [new file with mode: 0644]
Documentation/user-manual.txt
GIT-VERSION-GEN
Makefile
RelNotes
archive.c
builtin/bundle.c
builtin/checkout-index.c
builtin/checkout.c
builtin/clean.c
builtin/commit-tree.c
builtin/fetch.c
builtin/grep.c
builtin/index-pack.c
builtin/init-db.c
builtin/ls-files.c
builtin/ls-tree.c
builtin/mailsplit.c
builtin/pack-objects.c
builtin/remote.c
builtin/rev-list.c
builtin/show-branch.c
builtin/unpack-objects.c
builtin/update-index.c
cache.h
compat/mingw.c
connect.c
contrib/completion/git-completion.bash
contrib/workdir/git-new-workdir
daemon.c
diff.c
diffcore-pickaxe.c
dir.c
environment.c
fast-import.c
git-am.sh
git-compat-util.h
git-rebase.sh
git-relink.perl
git-send-email.perl
git-sh-setup.sh
git-stash.sh
git-svn.perl
git.c
git_remote_helpers/setup.cfg [new file with mode: 0644]
sha1_name.c
strbuf.h
t/annotate-tests.sh
t/t0004-unwritable.sh
t/t1011-read-tree-sparse-checkout.sh
t/t1503-rev-parse-verify.sh
t/t1509-root-worktree.sh
t/t3020-ls-files-error-unmatch.sh
t/t3402-rebase-merge.sh
t/t3415-rebase-autosquash.sh
t/t3903-stash.sh
t/t5560-http-backend-noserver.sh
t/t556x_common
t/t6050-replace.sh
t/t9001-send-email.sh
t/t9100-git-svn-basic.sh
t/t9131-git-svn-empty-symlink.sh
t/t9157-git-svn-fetch-merge.sh [new file with mode: 0644]
upload-pack.c
wt-status.c
xdiff/xmacros.h
xdiff/xmerge.c
xdiff/xutils.c

index b8bf618a30fd32a014e41e1ba9914f5e652bdefd..09ffc46563cba1057b37ba4a5701858fb95c5dda 100644 (file)
@@ -35,21 +35,28 @@ For shell scripts specifically (not exhaustive):
    properly nests.  It should have been the way Bourne spelled
    it from day one, but unfortunately isn't.
 
- - We use ${parameter-word} and its [-=?+] siblings, and their
-   colon'ed "unset or null" form.
+ - We use POSIX compliant parameter substitutions and avoid bashisms;
+   namely:
 
- We use ${parameter#word} and its [#%] siblings, and their
-   doubled "longest matching" form.
  - We use ${parameter-word} and its [-=?+] siblings, and their
+     colon'ed "unset or null" form.
 
- - We use Arithmetic Expansion $(( ... )).
+   - We use ${parameter#word} and its [#%] siblings, and their
+     doubled "longest matching" form.
+
+   - No "Substring Expansion" ${parameter:offset:length}.
 
- No "Substring Expansion" ${parameter:offset:length}.
  - No shell arrays.
 
- No shell arrays.
  - No strlen ${#parameter}.
 
- - No strlen ${#parameter}.
+   - No pattern replacement ${parameter/pattern/string}.
+
+ - We use Arithmetic Expansion $(( ... )).
 
- - No regexp ${parameter/pattern/string}.
+ - Inside Arithmetic Expansion, spell shell variables with $ in front
+   of them, as some shells do not grok $((x)) while accepting $(($x))
+   just fine (e.g. dash older than 0.5.4).
 
  - We do not use Process Substitution <(list) or >(list).
 
diff --git a/Documentation/RelNotes/1.7.3.1.txt b/Documentation/RelNotes/1.7.3.1.txt
new file mode 100644 (file)
index 0000000..002c93b
--- /dev/null
@@ -0,0 +1,14 @@
+Git v1.7.3.1 Release Notes
+==========================
+
+Fixes since v1.7.3
+------------------
+
+ * "git stash show stash@{$n}" was accidentally broken in 1.7.3 ("git
+   stash show" without any argument still worked, though).
+
+ * "git stash branch $branch stash@{$n}" was accidentally broken in
+   1.7.3 and started dropping the named stash even when branch creation
+   failed.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes/1.7.3.2.txt b/Documentation/RelNotes/1.7.3.2.txt
new file mode 100644 (file)
index 0000000..5c93b85
--- /dev/null
@@ -0,0 +1,5 @@
+Git v1.7.3.2 Release Notes
+==========================
+
+This is primarily to push out many documentation fixes accumulated since
+the 1.7.3.1 release.
index ece3c77482b3ff006b973f1ed90b708e26556862..72741ebda12de8fbf786f12531d70ab465eecf42 100644 (file)
@@ -264,12 +264,21 @@ the change to its true author (see (2) above).
 Also notice that a real name is used in the Signed-off-by: line. Please
 don't hide your real name.
 
-Some people also put extra tags at the end.
-
-"Acked-by:" says that the patch was reviewed by the person who
-is more familiar with the issues and the area the patch attempts
-to modify.  "Tested-by:" says the patch was tested by the person
-and found to have the desired effect.
+If you like, you can put extra tags at the end:
+
+1. "Reported-by:" is used to to credit someone who found the bug that
+   the patch attempts to fix.
+2. "Acked-by:" says that the person who is more familiar with the area
+   the patch attempts to modify liked the patch.
+3. "Reviewed-by:", unlike the other tags, can only be offered by the
+   reviewer and means that she is completely satisfied that the patch
+   is ready for application.  It is usually offered only after a
+   detailed review.
+4. "Tested-by:" is used to indicate that the person applied the patch
+   and found it to have the desired effect.
+
+You can also create your own tag or use one that's in common usage
+such as "Thanks-to:", "Based-on-patch-by:", or "Mentored-by:".
 
 ------------------------------------------------
 An ideal patch flow
index d82c0da2cf470dbfe7936762d4645b7509647177..7f6b2109bd83a55b7dddd8a8bc36c6fc1006a134 100644 (file)
@@ -1550,12 +1550,12 @@ push.default::
        no refspec is implied by any of the options given on the command
        line. Possible values are:
 +
-* `nothing` do not push anything.
-* `matching` push all matching branches.
+* `nothing` do not push anything.
+* `matching` push all matching branches.
   All branches having the same name in both ends are considered to be
   matching. This is the default.
-* `tracking` push the current branch to its upstream branch.
-* `current` push the current branch to a branch of the same name.
+* `tracking` push the current branch to its upstream branch.
+* `current` push the current branch to a branch of the same name.
 
 rebase.stat::
        Whether to show a diffstat of what changed upstream since the last
@@ -1755,9 +1755,9 @@ status.showUntrackedFiles::
        the untracked files. Possible values are:
 +
 --
-       - 'no'     - Show no untracked files
-       - 'normal' - Shows untracked files and directories
-       - 'all'    - Shows also individual files in untracked directories.
+* `no` - Show no untracked files.
+* `normal` - Show untracked files and directories.
+* `all` - Show also individual files in untracked directories.
 --
 +
 If this variable is not specified, it defaults to 'normal'.
index 8f9a2412fd44c80f2bf8d63271e2897ebeb3ddeb..3ac2beac6229955dc2534c428238c3d5ff57d25d 100644 (file)
@@ -9,16 +9,15 @@ patch file.  You can customize the creation of such patches via the
 GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
 
 What the -p option produces is slightly different from the traditional
-diff format.
+diff format:
 
-1.   It is preceded with a "git diff" header, that looks like
-     this:
+1.   It is preceded with a "git diff" header that looks like this:
 
        diff --git a/file1 b/file2
 +
 The `a/` and `b/` filenames are the same unless rename/copy is
 involved.  Especially, even for a creation or a deletion,
-`/dev/null` is _not_ used in place of `a/` or `b/` filenames.
+`/dev/null` is _not_ used in place of the `a/` or `b/` filenames.
 +
 When rename/copy is involved, `file1` and `file2` show the
 name of the source file of the rename/copy and the name of
@@ -37,18 +36,39 @@ the file that rename/copy produces, respectively.
        similarity index <number>
        dissimilarity index <number>
        index <hash>..<hash> <mode>
-
-3.  TAB, LF, double quote and backslash characters in pathnames
-    are represented as `\t`, `\n`, `\"` and `\\`, respectively.
-    If there is need for such substitution then the whole
-    pathname is put in double quotes.
-
++
+File modes are printed as 6-digit octal numbers including the file type
+and file permission bits.
++
+Path names in extended headers do not include the `a/` and `b/` prefixes.
++
 The similarity index is the percentage of unchanged lines, and
 the dissimilarity index is the percentage of changed lines.  It
 is a rounded down integer, followed by a percent sign.  The
 similarity index value of 100% is thus reserved for two equal
 files, while 100% dissimilarity means that no line from the old
 file made it into the new one.
++
+The index line includes the SHA-1 checksum before and after the change.
+The <mode> is included if the file mode does not change; otherwise,
+separate lines indicate the old and the new mode.
+
+3.  TAB, LF, double quote and backslash characters in pathnames
+    are represented as `\t`, `\n`, `\"` and `\\`, respectively.
+    If there is need for such substitution then the whole
+    pathname is put in double quotes.
+
+4.  All the `file1` files in the output refer to files before the
+    commit, and all the `file2` files refer to files after the commit.
+    It is incorrect to apply each change to each file sequentially.  For
+    example, this patch will swap a and b:
+
+      diff --git a/a b/b
+      rename from a
+      rename to b
+      diff --git a/b b/a
+      rename from b
+      rename to a
 
 
 combined diff format
index 4656a97e6012796f182a725e14c13dc03f71bba2..5495344e612dece0eb6cb6311864463c004f1181 100644 (file)
@@ -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.
 
@@ -66,14 +66,14 @@ endif::git-format-patch[]
        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::
@@ -247,20 +247,6 @@ endif::git-log[]
        Detect copies as well as renames.  See also `--find-copies-harder`.
        If `n` is specified, it has the same meaning as for `-M<n>`.
 
-ifndef::git-format-patch[]
---diff-filter=[ACDMRTUXB*]::
-       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.
-       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
-       that matches other criteria, nothing is selected.
-endif::git-format-patch[]
-
 --find-copies-harder::
        For performance reasons, by default, `-C` option finds copies only
        if the original file of the copy was modified in the same
@@ -278,6 +264,18 @@ endif::git-format-patch[]
        number.
 
 ifndef::git-format-patch[]
+--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 (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
+       that matches other criteria, nothing is selected.
+
 -S<string>::
        Look for differences that introduce or remove an instance of
        <string>. Note that this is different than the string simply
index 9e62f8778f6590328de4d9c0c7c08044e8019eac..51297d09ecdd3468ecd87a4f7aa6fac2b8ef6224 100644 (file)
@@ -14,7 +14,7 @@ SYNOPSIS
         [--ignore-date] [--ignore-space-change | --ignore-whitespace]
         [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
         [--reject] [-q | --quiet] [--scissors | --no-scissors]
-        [<mbox> | <Maildir>...]
+        [(<mbox> | <Maildir>)...]
 'git am' (--continue | --skip | --abort)
 
 DESCRIPTION
@@ -25,7 +25,7 @@ current branch.
 
 OPTIONS
 -------
-<mbox>|<Maildir>...::
+(<mbox>|<Maildir>)...::
        The list of mailbox files to read patches from. If you do not
        supply this argument, the command reads from the standard input.
        If you supply directories, they will be treated as Maildirs.
index 4a74b23d403d970643fcb8e0438ab6649f54e54c..881652f4904c102104cfe0a0b1de07dbfc32da3f 100644 (file)
@@ -12,10 +12,10 @@ SYNOPSIS
 'git apply' [--stat] [--numstat] [--summary] [--check] [--index]
          [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse]
          [--allow-binary-replacement | --binary] [--reject] [-z]
-         [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
+         [-p<n>] [-C<n>] [--inaccurate-eof] [--recount] [--cached]
          [--ignore-space-change | --ignore-whitespace ]
-         [--whitespace=<nowarn|warn|fix|error|error-all>]
-         [--exclude=PATH] [--include=PATH] [--directory=<root>]
+         [--whitespace=(nowarn|warn|fix|error|error-all)]
+         [--exclude=<path>] [--include=<path>] [--directory=<root>]
          [--verbose] [<patch>...]
 
 DESCRIPTION
index 8d3e66626f7561b0ba7f8140288cfc15167bdc14..4163a1bcb1643e7f05b6a79034ac9f63135d6ac9 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 'git archive' [--format=<fmt>] [--list] [--prefix=<prefix>/] [<extra>]
              [-o | --output=<file>] [--worktree-attributes]
              [--remote=<repo> [--exec=<git-upload-archive>]] <tree-ish>
-             [path...]
+             [<path>...]
 
 DESCRIPTION
 -----------
@@ -73,7 +73,7 @@ OPTIONS
 <tree-ish>::
        The tree or commit to produce an archive for.
 
-path::
+<path>::
        Without an optional path parameter, all files and subdirectories
        of the current working directory are included in the archive.
        If one or more paths are specified, only these are included.
index 38e59afb34effd84da6d8a79da67e5ad3ae45c5a..6266a3a6020db72c8629ad521dfedccc9d790a03 100644 (file)
@@ -11,8 +11,8 @@ SYNOPSIS
 [verse]
 'git bundle' create <file> <git-rev-list-args>
 'git bundle' verify <file>
-'git bundle' list-heads <file> [refname...]
-'git bundle' unbundle <file> [refname...]
+'git bundle' list-heads <file> [<refname>...]
+'git bundle' unbundle <file> [<refname>...]
 
 DESCRIPTION
 -----------
@@ -68,7 +68,7 @@ unbundle <file>::
        packaged.
 
 
-[refname...]::
+[<refname>...]::
        A list of references used to limit the references reported as
        available. This is principally of use to 'git fetch', which
        expects to receive only those references asked for and not
index a3f56b07fd251cbd121c28189d1f9018b892b48e..544ba7ba218550ac1b09d9c95dc6f60ac604f7e8 100644 (file)
@@ -27,7 +27,7 @@ OPTIONS
 <object>::
        The name of the object to show.
        For a more complete list of ways to spell object names, see
-       the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+       the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 
 -t::
        Instead of the content, show the object type identified by
index f5c2e0601db6782b2a8690c687611b93da935024..205d83dd0b281d59e0f53284d29846c8eb58a246 100644 (file)
@@ -49,7 +49,7 @@ git imposes the following rules on how references are named:
 These rules make it easy for shell script based tools to parse
 reference names, pathname expansion by the shell when a reference name is used
 unquoted (by mistake), and also avoids ambiguities in certain
-reference name expressions (see linkgit:gitrevisions[1]):
+reference name expressions (see linkgit:gitrevisions[7]):
 
 . A double-dot `..` is often used as in `ref1..ref2`, and in some
   contexts this notation means `{caret}ref1 ref2` (i.e. not in
index 62f9ab24c97875df6f053aa11f8f5cde56377175..0c0a9c14bc8e78ada9fb9b7174fcb90698e497a0 100644 (file)
@@ -13,7 +13,7 @@ SYNOPSIS
                   [--stage=<number>|all]
                   [--temp]
                   [-z] [--stdin]
-                  [--] [<file>]*
+                  [--] [<file>...]
 
 DESCRIPTION
 -----------
index f88e9977d1137da0449736f5f8fe6746b42437e1..22d36114df68963811a80a6c311a98b1a26d88d3 100644 (file)
@@ -45,14 +45,14 @@ successful.
 
 'git checkout' [--patch] [<tree-ish>] [--] <pathspec>...::
 
-       When <paths> or `--patch` are given, 'git checkout' *not* switch
-       branches.  It updates the named paths in the working tree from
-       the index file or from a named <tree-ish> (most often a commit).  In
-       this case, the `-b` and `--track` options are meaningless and giving
-       either of them results in an error. The <tree-ish> argument can be
-       used to specify a specific tree-ish (i.e. commit, tag or tree)
-       to update the index for the given paths before updating the
-       working tree.
+       When <paths> or `--patch` are given, 'git checkout' does *not*
+       switch branches.  It updates the named paths in the working tree
+       from the index file or from a named <tree-ish> (most often a
+       commit).  In this case, the `-b` and `--track` options are
+       meaningless and giving either of them results in an error.  The
+       <tree-ish> argument can be used to specify a specific tree-ish
+       (i.e.  commit, tag or tree) to update the index for the given
+       paths before updating the working tree.
 +
 The index may contain unmerged entries because of a previous failed merge.
 By default, if you try to check out such an entry from the index, the
index 2cef579316ba11e68d65dc4d7309f2e56a465b3d..3c96fa8c86c34df2dced6cd9ec8a391ee3b7208e 100644 (file)
@@ -21,7 +21,7 @@ OPTIONS
 <commit>...::
        Commits to cherry-pick.
        For a more complete list of ways to spell commits, see
-       linkgit:gitrevisions[1].
+       linkgit:gitrevisions[7].
        Sets of commits can be passed but no traversal is done by
        default, as if the '--no-walk' option was specified, see
        linkgit:git-rev-list[1].
index dc7d3d17b151d05827925fdcd2806945e2e278cb..ab7293351d283e7ee3a8275c534c3667d6b4d696 100644 (file)
@@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.
        configuration variables are created.
 
 --mirror::
-       Set up a mirror of the remote repository.  This implies `--bare`.
+       Set up a mirror of the source repository.  This implies `--bare`.
+       Compared to `--bare`, `--mirror` not only maps local branches of the
+       source to local branches of the target, it maps all refs (including
+       remote branches, notes etc.) and sets up a refspec configuration such
+       that all these refs are overwritten by a `git remote update` in the
+       target repository.
 
 --origin <name>::
 -o <name>::
index 349366ee1e2c414aed87745d2c717ea9a2149367..5dcf4278fc497e4d72093069bdcd18b4ecff0949 100644 (file)
@@ -8,7 +8,7 @@ git-commit-tree - Create a new commit object
 
 SYNOPSIS
 --------
-'git commit-tree' <tree> [-p <parent commit>]* < changelog
+'git commit-tree' <tree> [(-p <parent commit>)...] < changelog
 
 DESCRIPTION
 -----------
index 01c9f8eb9eff634fe8ab99908c62207ebecd5e31..2f0ddf6fe817ab7b59fb5f5276ba688447661ee3 100644 (file)
@@ -9,15 +9,15 @@ SYNOPSIS
 --------
 [verse]
 'git daemon' [--verbose] [--syslog] [--export-all]
-            [--timeout=n] [--init-timeout=n] [--max-connections=n]
-            [--strict-paths] [--base-path=path] [--base-path-relaxed]
-            [--user-path | --user-path=path]
-            [--interpolated-path=pathtemplate]
-            [--reuseaddr] [--detach] [--pid-file=file]
-            [--enable=service] [--disable=service]
-            [--allow-override=service] [--forbid-override=service]
-            [--inetd | [--listen=host_or_ipaddr] [--port=n] [--user=user [--group=group]]
-            [directory...]
+            [--timeout=<n>] [--init-timeout=<n>] [--max-connections=<n>]
+            [--strict-paths] [--base-path=<path>] [--base-path-relaxed]
+            [--user-path | --user-path=<path>]
+            [--interpolated-path=<pathtemplate>]
+            [--reuseaddr] [--detach] [--pid-file=<file>]
+            [--enable=<service>] [--disable=<service>]
+            [--allow-override=<service>] [--forbid-override=<service>]
+            [--inetd | [--listen=<host_or_ipaddr>] [--port=<n>] [--user=<user> [--group=<group>]]
+            [<directory>...]
 
 DESCRIPTION
 -----------
@@ -48,7 +48,7 @@ OPTIONS
        'git daemon' will refuse to start when this option is enabled and no
        whitelist is specified.
 
---base-path=path::
+--base-path=<path>::
        Remap all the path requests as relative to the given path.
        This is sort of "GIT root" - if you run 'git daemon' with
        '--base-path=/srv/git' on example.com, then if you later try to pull
@@ -61,7 +61,7 @@ OPTIONS
        This is useful for switching to --base-path usage, while still
        allowing the old paths.
 
---interpolated-path=pathtemplate::
+--interpolated-path=<pathtemplate>::
        To support virtual hosting, an interpolated path template can be
        used to dynamically construct alternate paths.  The template
        supports %H for the target hostname as supplied by the client but
@@ -80,27 +80,27 @@ OPTIONS
        Have the server run as an inetd service. Implies --syslog.
        Incompatible with --port, --listen, --user and --group options.
 
---listen=host_or_ipaddr::
+--listen=<host_or_ipaddr>::
        Listen on a specific IP address or hostname.  IP addresses can
        be either an IPv4 address or an IPv6 address if supported.  If IPv6
        is not supported, then --listen=hostname is also not supported and
        --listen must be given an IPv4 address.
        Incompatible with '--inetd' option.
 
---port=n::
+--port=<n>::
        Listen on an alternative port.  Incompatible with '--inetd' option.
 
---init-timeout=n::
+--init-timeout=<n>::
        Timeout between the moment the connection is established and the
        client request is received (typically a rather low value, since
        that should be basically immediate).
 
---timeout=n::
+--timeout=<n>::
        Timeout for specific client sub-requests. This includes the time
        it takes for the server to process the sub-request and the time spent
        waiting for the next client's request.
 
---max-connections=n::
+--max-connections=<n>::
        Maximum number of concurrent clients, defaults to 32.  Set it to
        zero for no limit.
 
@@ -109,7 +109,7 @@ OPTIONS
        --verbose, thus by default only error conditions will be logged.
 
 --user-path::
---user-path=path::
+--user-path=<path>::
        Allow {tilde}user notation to be used in requests.  When
        specified with no parameter, requests to
        git://host/{tilde}alice/foo is taken as a request to access
@@ -129,12 +129,12 @@ OPTIONS
 --detach::
        Detach from the shell. Implies --syslog.
 
---pid-file=file::
+--pid-file=<file>::
        Save the process id in 'file'.  Ignored when the daemon
        is run under `--inetd`.
 
---user=user::
---group=group::
+--user=<user>::
+--group=<group>::
        Change daemon's uid and gid before entering the service loop.
        When only `--user` is given without `--group`, the
        primary group ID for the user is used.  The values of
@@ -145,16 +145,16 @@ Giving these options is an error when used with `--inetd`; use
 the facility of inet daemon to achieve the same before spawning
 'git daemon' if needed.
 
---enable=service::
---disable=service::
+--enable=<service>::
+--disable=<service>::
        Enable/disable the service site-wide per default.  Note
        that a service disabled site-wide can still be enabled
        per repository if it is marked overridable and the
        repository enables the service with a configuration
        item.
 
---allow-override=service::
---forbid-override=service::
+--allow-override=<service>::
+--forbid-override=<service>::
        Allow/forbid overriding the site-wide default with per
        repository configuration.  By default, all the services
        are overridable.
index 08fd4099addac3959e5aedbd1a0668367f07bb21..dd1fb32786f6f467a1c46f2643fbc54d0390f2ec 100644 (file)
@@ -23,9 +23,9 @@ tree and the index file, or the index file and the working tree.
        further add to the index but you still haven't.  You can
        stage these changes by using linkgit:git-add[1].
 +
-If exactly two paths are given, and at least one is untracked,
-compare the two files / directories. This behavior can be
-forced by --no-index.
+If exactly two paths are given and at least one points outside
+the current repository, 'git diff' will compare the two files /
+directories. This behavior can be forced by --no-index.
 
 'git diff' [--options] --cached [<commit>] [--] [<path>...]::
 
@@ -64,15 +64,16 @@ forced by --no-index.
 
 Just in case if you are doing something exotic, it should be
 noted that all of the <commit> in the above description, except
-for the last two forms that use ".." notations, can be any
-<tree-ish>.
+in the last two forms that use ".." notations, can be any
+<tree>.  The third form ('git diff <commit> <commit>') can also
+be used to compare two <blob> objects.
 
 For a more complete list of ways to spell <commit>, see
-"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 However, "diff" is about comparing two _endpoints_, not ranges,
 and the range notations ("<commit>..<commit>" and
 "<commit>\...<commit>") do not mean a range as defined in the
-"SPECIFYING RANGES" section in linkgit:gitrevisions[1].
+"SPECIFYING RANGES" section in linkgit:gitrevisions[7].
 
 OPTIONS
 -------
@@ -159,8 +160,12 @@ rewrites (very expensive).
 
 SEE ALSO
 --------
-linkgit:git-difftool[1]::
-       Show changes using common diff tools
+diff(1),
+linkgit:git-difftool[1],
+linkgit:git-log[1],
+linkgit:gitdiffcore[7],
+linkgit:git-format-patch[1],
+linkgit:git-apply[1]
 
 Author
 ------
index fcad1132767021a03a88cf084d5eaf4ae8780792..e05b686b1e4784290e40993469a2c5fab9b4ce5d 100644 (file)
@@ -96,7 +96,7 @@ marks the same across runs.
        in the commit (as opposed to just listing the files which are
        different from the commit's first parent).
 
-[git-rev-list-args...]::
+[<git-rev-list-args>...]::
        A list of arguments, acceptable to 'git rev-parse' and
        'git rev-list', that specifies the specific objects and references
        to export.  For example, `master{tilde}10..master` causes the
index 966ba4f21337e72f7be0a5b852e76a8b12192f7f..2c6ad5b2f32e6c0248f0a30423b07d01fed3baa3 100644 (file)
@@ -439,7 +439,7 @@ Marks must be declared (via `mark`) before they can be used.
 * A complete 40 byte or abbreviated commit SHA-1 in hex.
 
 * Any valid Git SHA-1 expression that resolves to a commit.  See
-  ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[1] for details.
+  ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[7] for details.
 
 The special case of restarting an incremental import from the
 current branch value should be written as:
index 400fe7f956961ba0ddf09d2dcc6e539adec7ff74..d159e88292cbab575be8153b381fffd1f4c85b6b 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 
 'git fetch' [<options>] <group>
 
-'git fetch' --multiple [<options>] [<repository> | <group>]...
+'git fetch' --multiple [<options>] [(<repository> | <group>)...]
 
 'git fetch' --all [<options>]
 
index 7357c8879a941537fa6aee084b572e8aacced89d..796e7489ff7ee573a65647f4de33df932bd1bea1 100644 (file)
@@ -81,7 +81,7 @@ OPTIONS
        This filter may be used if you only need to modify the environment
        in which the commit will be performed.  Specifically, you might
        want to rewrite the author/committer name/email/time environment
-       variables (see linkgit:git-commit[1] for details).  Do not forget
+       variables (see linkgit:git-commit-tree[1] for details).  Do not forget
        to re-export the variables.
 
 --tree-filter <command>::
@@ -117,7 +117,7 @@ OPTIONS
        This is the filter for performing the commit.
        If this filter is specified, it will be called instead of the
        'git commit-tree' command, with arguments of the form
-       "<TREE_ID> [-p <PARENT_COMMIT_ID>]..." and the log message on
+       "<TREE_ID> [(-p <PARENT_COMMIT_ID>)...]" and the log message on
        stdin.  The commit id is expected on stdout.
 +
 As a special extension, the commit filter may emit multiple
index d66fd9d2314774a0b31eadb23f8c00c199276d84..fac1cf55e51ff289167270de4f248dad959741c6 100644 (file)
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
-                  [--sort=<key>]* [--format=<format>] [<pattern>...]
+                  [(--sort=<key>)...] [--format=<format>] [<pattern>...]
 
 DESCRIPTION
 -----------
index 4b3f5ba5358da469feff4e861e69717f16e81d21..a00b783fe5dd7a074fc70f9aed85e6e45189ac8f 100644 (file)
@@ -39,7 +39,7 @@ There are two ways to specify which commits to operate on.
    that leads to the <since> to be output.
 
 2. Generic <revision range> expression (see "SPECIFYING
-   REVISIONS" section in linkgit:gitrevisions[1]) means the
+   REVISIONS" section in linkgit:gitrevisions[7]) means the
    commits in the specified range.
 
 The first rule takes precedence in the case of a single <commit>.  To
index f3ccc72f0d68f03cd7b3fb6a36aabc8d7c7772a1..c2bb81042c80dbf93b7a651c47fc177358132f97 100644 (file)
@@ -59,10 +59,10 @@ OPTIONS
        the newly constructed pack and index before refs can be
        updated to use objects contained in the pack.
 
---keep='why'::
+--keep=<msg>::
        Like --keep create a .keep file before moving the index into
        its final destination, but rather than creating an empty file
-       place 'why' followed by an LF into the .keep file.  The 'why'
+       place '<msg>' followed by an LF into the .keep file.  The '<msg>'
        message can later be searched for within all .keep files to
        locate any which have outlived their usefulness.
 
index 246b07ebf94394d2079c2acc3e8c1a2e6c40bba9..00d4a124c918e7548628140646f698b9e37ab87a 100644 (file)
@@ -31,7 +31,7 @@ current working directory.
 Specify the directory from which templates will be used.  (See the "TEMPLATE
 DIRECTORY" section below.)
 
---shared[={false|true|umask|group|all|world|everybody|0xxx}]::
+--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
 
 Specify that the git repository is to be shared amongst several users.  This
 allows users belonging to the same group to push into that
index c213bdbdc500b1117805bc84cb2a0f31eeff3bcd..6d40f0011b0fd297e5676c8479e46989d7f47696 100644 (file)
@@ -31,7 +31,7 @@ OPTIONS
        either <since> or <until> is omitted, it defaults to
        `HEAD`, i.e. the tip of the current branch.
        For a more complete list of ways to spell <since>
-       and <until>, see linkgit:gitrevisions[1].
+       and <until>, see linkgit:gitrevisions[7].
 
 --follow::
        Continue listing the history of a file beyond renames
index 347f4479865419d010b874bc8b26f5f1b40a6f61..86abd1345178d4c5d2362509fc075de80d2fc7e3 100644 (file)
@@ -17,7 +17,7 @@ SYNOPSIS
                [--exclude-per-directory=<file>]
                [--exclude-standard]
                [--error-unmatch] [--with-tree=<tree-ish>]
-               [--full-name] [--abbrev] [--] [<file>]*
+               [--full-name] [--abbrev] [--] [<file>...]
 
 DESCRIPTION
 -----------
index 1f89d3680043cc98ad39facb1f43ae770ff66e14..76ed625e7b2fe503d3fb2262371ecd4de006411f 100644 (file)
@@ -10,8 +10,8 @@ SYNOPSIS
 --------
 [verse]
 'git ls-tree' [-d] [-r] [-t] [-l] [-z]
-           [--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev=[<n>]]
-           <tree-ish> [paths...]
+           [--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev[=<n>]]
+           <tree-ish> [<path>...]
 
 DESCRIPTION
 -----------
@@ -19,11 +19,11 @@ Lists the contents of a given tree object, like what "/bin/ls -a" does
 in the current working directory.  Note that:
 
  - the behaviour is slightly different from that of "/bin/ls" in that the
-   'paths' denote just a list of patterns to match, e.g. so specifying
+   '<path>' denotes just a list of patterns to match, e.g. so specifying
    directory name (without '-r') will behave differently, and order of the
    arguments does not matter.
 
- - the behaviour is similar to that of "/bin/ls" in that the 'paths' is
+ - the behaviour is similar to that of "/bin/ls" in that the '<path>' is
    taken as relative to the current working directory.  E.g. when you are
    in a directory 'sub' that has a directory 'dir', you can run 'git
    ls-tree -r HEAD dir' to list the contents of the tree (that is
@@ -72,7 +72,7 @@ OPTIONS
        Do not limit the listing to the current working directory.
        Implies --full-name.
 
-paths::
+[<path>...]::
        When paths are given, show them (note that this isn't really raw
        pathnames, but rather a list of patterns to match).  Otherwise
        implicitly uses the root level of the tree as the sole path argument.
index a634485281154cb665c8168cc3469dc0f5051697..71912a19a4dcda5f2b76d1c06b4c9ef5051265e3 100644 (file)
@@ -7,7 +7,7 @@ git-mailsplit - Simple UNIX mbox splitter program
 
 SYNOPSIS
 --------
-'git mailsplit' [-b] [-f<nn>] [-d<prec>] [--keep-cr] -o<directory> [--] [<mbox>|<Maildir>...]
+'git mailsplit' [-b] [-f<nn>] [-d<prec>] [--keep-cr] -o<directory> [--] [(<mbox>|<Maildir>)...]
 
 DESCRIPTION
 -----------
index 84043cc5b26db7d34c93a70ec005df913c345d85..d43416d299a7c028a88e8ddce89536c2c64e65c9 100644 (file)
@@ -59,13 +59,13 @@ include::merge-options.txt[]
 -m <msg>::
        Set the commit message to be used for the merge commit (in
        case one is created).
-
-       If `--log` is specified, a shortlog of the commits being merged
-       will be appended to the specified message.
-
-       The 'git fmt-merge-msg' command can be
-       used to give a good default for automated 'git merge'
-       invocations.
++
+If `--log` is specified, a shortlog of the commits being merged
+will be appended to the specified message.
++
+The 'git fmt-merge-msg' command can be
+used to give a good default for automated 'git merge'
+invocations.
 
 --rerere-autoupdate::
 --no-rerere-autoupdate::
index e4ed0161467866f731c89eb48e64453051c64281..1f75a848ba36728eeaa67e5cbbc209075393193b 100644 (file)
@@ -7,7 +7,7 @@ git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
 
 SYNOPSIS
 --------
-'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>]...
+'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>...]
 
 DESCRIPTION
 -----------
index 8ed09c0b3cfc0fff2dbb8907fdc00e027c2c6d33..65eff66afe5990efc4af4f141809f355b7111bd3 100644 (file)
@@ -11,8 +11,8 @@ SYNOPSIS
 [verse]
 'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
        [--no-reuse-delta] [--delta-base-offset] [--non-empty]
-       [--local] [--incremental] [--window=N] [--depth=N]
-       [--revs [--unpacked | --all]*] [--stdout | base-name]
+       [--local] [--incremental] [--window=<n>] [--depth=<n>]
+       [--revs [--unpacked | --all]] [--stdout | base-name]
        [--keep-true-parents] < object-list
 
 
@@ -82,8 +82,8 @@ base-name::
        reference was included in the resulting packfile.  This
        can be useful to send new tags to native git clients.
 
---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
@@ -95,10 +95,10 @@ base-name::
        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
@@ -106,7 +106,7 @@ base-name::
        `--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.
@@ -171,7 +171,7 @@ base-name::
        wholesale enforcement of a different compression level on the
        packed data is desired.
 
---compression=[N]::
+--compression=<n>::
        Specifies compression level for newly-compressed data in the
        generated pack.  If not specified,  pack compression level is
        determined first by pack.compression,  then by core.compression,
index c50f7dcb890139d829bae51c30b513d54fd7761e..e1b0bd2868e5f4c489f698038c4d4aaae7740c52 100644 (file)
@@ -92,12 +92,14 @@ include::merge-options.txt[]
 :git-pull: 1
 
 --rebase::
-       Instead of a merge, perform a rebase after fetching.  If
-       there is a remote ref for the upstream branch, and this branch
-       was rebased since last fetched, the rebase uses that information
-       to avoid rebasing non-local changes. To make this the default
-       for branch `<name>`, set configuration `branch.<name>.rebase`
-       to `true`.
+       Rebase the current branch on top of the upstream branch after
+       fetching.  If there is a remote-tracking branch corresponding to
+       the upstream branch and the upstream branch was rebased since last
+       fetched, the rebase uses that information to avoid rebasing
+       non-local changes.
++
+See `branch.<name>.rebase` in linkgit:git-config[1] if you want to make
+`git pull` always use `{litdd}rebase` instead of merging.
 +
 [NOTE]
 This is a potentially _dangerous_ mode of operation.
index 020955ff5a8635e385208a6a89b1ad71125fb205..e11660a2e651b385251bef4f45dc36f212fa58bf 100644 (file)
@@ -41,7 +41,7 @@ OPTIONS[[OPTIONS]]
 +
 The <src> is often the name of the branch you would want to push, but
 it can be any arbitrary "SHA-1 expression", such as `master~4` or
-`HEAD` (see linkgit:gitrevisions[1]).
+`HEAD` (see linkgit:gitrevisions[7]).
 +
 The <dst> tells which ref on the remote side is updated with this
 push. Arbitrary expressions cannot be used here, an actual ref must
index 5a0451aaf377d13590d6112a9ee8cf51e217a21d..e50bd9b68d80e9be997de80252dec5afbb7452b4 100644 (file)
@@ -40,7 +40,7 @@ see linkgit:git-log[1].
 The reflog is useful in various git commands, to specify the old value
 of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be
 two moves ago", `master@\{one.week.ago\}` means "where master used to
-point to one week ago", and so on. See linkgit:gitrevisions[1] for
+point to one week ago", and so on. See linkgit:gitrevisions[7] for
 more details.
 
 To delete single entries from the reflog, use the subcommand "delete"
index 8a5842bb937a0f8f89a561566d1d7ce129edc4b0..8fc809f82b2fae71f5cf6315dec707b649931382 100644 (file)
@@ -7,7 +7,7 @@ git-relink - Hardlink common objects in local repositories
 
 SYNOPSIS
 --------
-'git relink' [--safe] <dir> [<dir>]* <master_dir>
+'git relink' [--safe] <dir>... <master_dir>
 
 DESCRIPTION
 -----------
index aa021b0cb803a9cd9f08566f6a6fe407eb025e4b..0d28febe1b44fff289b772a0e0fb6e74a010b9eb 100644 (file)
@@ -20,7 +20,7 @@ SYNOPSIS
 'git remote set-url --delete' [--push] <name> <url>
 'git remote' [-v | --verbose] 'show' [-n] <name>
 'git remote prune' [-n | --dry-run] <name>
-'git remote' [-v | --verbose] 'update' [-p | --prune] [group | remote]...
+'git remote' [-v | --verbose] 'update' [-p | --prune] [(<group> | <remote>)...]
 
 DESCRIPTION
 -----------
index 8c67d1724f705c94fb8faf6801ee2bc7cd459629..af79b86516764617163b020ec3c4d9bbeda9fe9b 100644 (file)
@@ -8,7 +8,7 @@ git-repack - Pack unpacked objects in a repository
 
 SYNOPSIS
 --------
-'git repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
+'git repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=<n>] [--depth=<n>]
 
 DESCRIPTION
 -----------
@@ -76,8 +76,8 @@ other objects in that pack they already have locally.
        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
@@ -87,10 +87,10 @@ other objects in that pack they already have locally.
        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
@@ -98,7 +98,7 @@ other objects in that pack they already have locally.
        `--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.
index 9cf31485feec4b03850edb1f2f3a4b765245f4cc..fd72976371cee0fcd25e3419138eb13382dc6ab8 100644 (file)
@@ -15,17 +15,24 @@ SYNOPSIS
 DESCRIPTION
 -----------
 In the first and second form, copy entries from <commit> to the index.
-In the third form, set the current branch to <commit>, optionally
-modifying index and worktree to match.  The <commit> defaults to HEAD
+In the third form, set the current branch head (HEAD) to <commit>, optionally
+modifying index and working tree to match.  The <commit> defaults to HEAD
 in all forms.
 
 'git reset' [-q] [<commit>] [--] <paths>...::
        This form resets the index entries for all <paths> to their
-       state at the <commit>.  (It does not affect the worktree, nor
+       state at <commit>.  (It does not affect the working tree, nor
        the current branch.)
 +
 This means that `git reset <paths>` is the opposite of `git add
 <paths>`.
++
+After running `git reset <paths>` to update the index entry, you can
+use linkgit:git-checkout[1] to check the contents out of the index to
+the working tree.
+Alternatively, using linkgit:git-checkout[1] and specifying a commit, you
+can copy the contents of a path out of a commit to the index and to the
+working tree in one go.
 
 'git reset' --patch|-p [<commit>] [--] [<paths>...]::
        Interactively select hunks in the difference between the index
@@ -36,16 +43,17 @@ This means that `git reset -p` is the opposite of `git add -p` (see
 linkgit:git-add[1]).
 
 'git reset' [--<mode>] [<commit>]::
-       This form points the current branch to <commit> and then
-       updates index and working tree according to <mode>, which must
-       be one of the following:
+       This form resets the current branch head to <commit> and
+       possibly updates the index (resetting it to the tree of <commit>) and
+       the working tree depending on <mode>, which
+       must be one of the following:
 +
 --
 --soft::
-       Does not touch the index file nor the working tree at allbut
-       requires them to be in a good order. This leaves all your changed
-       files "Changes to be committed", as 'git status' would
-       put it.
+       Does not touch the index file nor the working tree at all (but
+       resets the head to <commit>, just like all modes do). This leaves
+       all your changed files "Changes to be committed", as 'git status'
+       would put it.
 
 --mixed::
        Resets the index but not the working tree (i.e., the changed files
@@ -53,22 +61,30 @@ linkgit:git-add[1]).
        been updated. This is the default action.
 
 --hard::
-       Matches the working tree and index to that of the tree being
-       switched to. Any changes to tracked files in the working tree
-       since <commit> are lost.
+       Resets the index and working tree. Any changes to tracked files in the
+       working tree since <commit> are discarded.
 
 --merge::
-       Resets the index to match the tree recorded by the named commit,
-       and updates the files that are different between the named commit
-       and the current commit in the working tree.
+       Resets the index and updates the files in the working tree that are
+       different between <commit> and HEAD, but keeps those which are
+       different between the index and working tree (i.e. which have changes
+       which have not been added).
+       If a file that is different between <commit> and the index has unstaged
+       changes, reset is aborted.
++
+In other words, --merge does something like a 'git read-tree -u -m <commit>',
+but carries forward unmerged index entries.
 
 --keep::
-       Reset the index to the given commit, keeping local changes in
-       the working tree since the current commit, while updating
-       working tree files without local changes to what appears in
-       the given commit.  If a file that is different between the
-       current commit and the given commit has local changes, reset
-       is aborted.
+       Resets the index, updates files in the working tree that are
+       different between <commit> and HEAD, but keeps those
+       which are different between HEAD and the working tree (i.e.
+       which have local changes).
+       If a file that is different between <commit> and HEAD has local changes,
+       reset is aborted.
++
+In other words, --keep does a 2-way merge between <commit> and HEAD followed by
+'git reset --mixed <commit>'.
 --
 
 If you want to undo a commit other than the latest on a branch,
@@ -184,7 +200,7 @@ tip of the current branch in ORIG_HEAD, so resetting hard to it
 brings your index file and the working tree back to that state,
 and resets the tip of the branch to that commit.
 
-Undo a merge or pull inside a dirty work tree::
+Undo a merge or pull inside a dirty working tree::
 +
 ------------
 $ git pull                         <1>
@@ -257,7 +273,7 @@ Suppose you are working on something and you commit it, and then you
 continue working a bit more, but now you think that what you have in
 your working tree should be in another branch that has nothing to do
 with what you committed previously. You can start a new branch and
-reset it while keeping the changes in your work tree.
+reset it while keeping the changes in your working tree.
 +
 ------------
 $ git tag start
@@ -294,8 +310,10 @@ In these tables, A, B, C and D are some different states of a
 file. For example, the first line of the first table means that if a
 file is in state A in the working tree, in state B in the index, in
 state C in HEAD and in state D in the target, then "git reset --soft
-target" will put the file in state A in the working tree, in state B
-in the index and in state D in HEAD.
+target" will leave the file in the working tree in state A and in the
+index in state B.  It resets (i.e. moves) the HEAD (i.e. the tip of
+the current branch, if you are on one) to "target" (which has the file
+in state D).
 
       working index HEAD target         working index HEAD
       ----------------------------------------------------
@@ -346,11 +364,11 @@ in the index and in state D in HEAD.
                                --keep   B       C     C
 
 "reset --merge" is meant to be used when resetting out of a conflicted
-merge. Any mergy operation guarantees that the work tree file that is
+merge. Any mergy operation guarantees that the working tree file that is
 involved in the merge does not have local change wrt the index before
-it starts, and that it writes the result out to the work tree. So if
+it starts, and that it writes the result out to the working tree. So if
 we see some difference between the index and the target and also
-between the index and the work tree, then it means that we are not
+between the index and the working tree, then it means that we are not
 resetting out from a state that a mergy operation left after failing
 with a conflict. That is why we disallow --merge option in this case.
 
index 173f3fc78599f268c1e483c4d1abe51e95ad0e59..8e1e32908c31ddb8cb07046a25bcdb6dd38d74f5 100644 (file)
@@ -9,10 +9,10 @@ git-rev-list - Lists commit objects in reverse chronological order
 SYNOPSIS
 --------
 [verse]
-'git rev-list' [ \--max-count=number ]
-            [ \--skip=number ]
-            [ \--max-age=timestamp ]
-            [ \--min-age=timestamp ]
+'git rev-list' [ \--max-count=<number> ]
+            [ \--skip=<number> ]
+            [ \--max-age=<timestamp> ]
+            [ \--min-age=<timestamp> ]
             [ \--sparse ]
             [ \--merges ]
             [ \--no-merges ]
@@ -21,10 +21,10 @@ SYNOPSIS
             [ \--full-history ]
             [ \--not ]
             [ \--all ]
-            [ \--branches[=pattern] ]
-            [ \--tags[=pattern] ]
-            [ \--remotes[=pattern] ]
-            [ \--glob=glob-pattern ]
+            [ \--branches[=<pattern>] ]
+            [ \--tags[=<pattern>] ]
+            [ \--remotes[=<pattern>] ]
+            [ \--glob=<glob-pattern> ]
             [ \--stdin ]
             [ \--quiet ]
             [ \--topo-order ]
@@ -37,7 +37,7 @@ SYNOPSIS
             [ \--regexp-ignore-case | -i ]
             [ \--extended-regexp | -E ]
             [ \--fixed-strings | -F ]
-            [ \--date={local|relative|default|iso|rfc|short} ]
+            [ \--date=(local|relative|default|iso|rfc|short) ]
             [ [\--objects | \--objects-edge] [ \--unpacked ] ]
             [ \--pretty | \--header ]
             [ \--bisect ]
index 341ca90c6e2b40676d4be360118176a39955b11c..4a27643c1ea0e908a0a54b84f668d5a80f6d7100 100644 (file)
@@ -95,7 +95,7 @@ OPTIONS
        unfortunately named tag "master"), and show them as full
        refnames (e.g. "refs/heads/master").
 
---abbrev-ref[={strict|loose}]::
+--abbrev-ref[=(strict|loose)]::
        A non-ambiguous short name of the objects name.
        The option core.warnAmbiguousRefs is used to select the strict
        abbreviation mode.
index b7d9ef7e4726db40f3b0d1ec9474494bb6e07dcf..f40984d144e4ca276f84fc81a74c4ae726dcf497 100644 (file)
@@ -31,7 +31,7 @@ OPTIONS
 <commit>...::
        Commits to revert.
        For a more complete list of ways to spell commit names, see
-       linkgit:gitrevisions[1].
+       linkgit:gitrevisions[7].
        Sets of commits can also be given but no traversal is done by
        default, see linkgit:git-rev-list[1] and its '--no-walk'
        option.
index bc1ac77495347967c941298e2da38f76d5d124c6..5cc3baf48dcbf86e976d5d4407831a6d0ceb108f 100644 (file)
@@ -44,7 +44,7 @@ OPTIONS
 --email::
        Show the email address of each author.
 
---format[='<format>']::
+--format[=<format>]::
        Instead of the commit subject, use some other information to
        describe each commit.  '<format>' can be any string accepted
        by the `--format` option of 'git log', such as '{asterisk} [%h] %s'.
index 64532633406bedb431c4c6755101ce117e71388f..3b0c88271a80ad9dfc989dcb44247479f09431bf 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
                [--current] [--color[=<when>] | --no-color] [--sparse]
                [--more=<n> | --list | --independent | --merge-base]
                [--no-name | --sha1-name] [--topics]
-               [<rev> | <glob>]...
+               [(<rev> | <glob>)...]
 
 'git show-branch' (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]
 
@@ -32,7 +32,7 @@ no <rev> nor <glob> is given on the command line.
 OPTIONS
 -------
 <rev>::
-       Arbitrary extended SHA1 expression (see linkgit:gitrevisions[1])
+       Arbitrary extended SHA1 expression (see linkgit:gitrevisions[7])
        that typically names a branch head or a tag.
 
 <glob>::
index 4696af743321d78d9e1d17115d29222f17cb4d55..be0ec189af45e1006134e5607bb76a7b6ad20699 100644 (file)
@@ -84,7 +84,11 @@ OPTIONS
 
 <pattern>...::
 
-       Show references matching one or more patterns.
+       Show references matching one or more patterns. Patterns are matched from
+       the end of the full name, and only complete parts are matched, e.g.
+       'master' matches 'refs/heads/master', 'refs/remotes/origin/master',
+       'refs/tags/jedi/master' but not 'refs/heads/mymaster' nor
+       'refs/remotes/master/jedi'.
 
 OUTPUT
 ------
index 0002bfb0455b38eecf6b29da6a2464058ba42c57..f0a8a1aff3694cf00587d8670a8fe9962fe98af3 100644 (file)
@@ -36,7 +36,7 @@ OPTIONS
 <object>...::
        The names of objects to show.
        For a more complete list of ways to spell object names, see
-       "SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+       "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 
 include::pretty-options.txt[]
 
@@ -54,6 +54,10 @@ git show v1.0.0::
 git show v1.0.0^\{tree\}::
        Shows the tree pointed to by the tag `v1.0.0`.
 
+git show -s --format=%s v1.0.0^\{commit\}::
+       Shows the subject of the commit pointed to by the
+       tag `v1.0.0`.
+
 git show next~10:Documentation/README::
        Shows the contents of the file `Documentation/README` as
        they were current in the 10th last commit of the branch
index 4b84d08fc87c13f6db371ecc52710bd09865d784..139d314ba54c4e7897ffcf257a1fd847eb7939fa 100644 (file)
@@ -56,6 +56,8 @@ COMMANDS
        as well, they take precedence.
 --no-metadata;;
        Set the 'noMetadata' option in the [svn-remote] config.
+       This option is not recommended, please read the 'svn.noMetadata'
+       section of this manpage before using this option.
 --use-svm-props;;
        Set the 'useSvmProps' option in the [svn-remote] config.
 --use-svnsync-props;;
@@ -436,7 +438,7 @@ git rebase --onto remotes/git-svn A^ master
 OPTIONS
 -------
 
---shared[={false|true|umask|group|all|world|everybody}]::
+--shared[=(false|true|umask|group|all|world|everybody)]::
 --template=<template_directory>::
        Only used with the 'init' command.
        These are passed directly to 'git init'.
@@ -597,13 +599,22 @@ svn.noMetadata::
 svn-remote.<name>.noMetadata::
        This gets rid of the 'git-svn-id:' lines at the end of every commit.
 +
-If you lose your .git/svn/git-svn/.rev_db file, 'git svn' will not
-be able to rebuild it and you won't be able to fetch again,
-either.  This is fine for one-shot imports.
+This option can only be used for one-shot imports as 'git svn'
+will not be able to fetch again without metadata. Additionally,
+if you lose your .git/svn/**/.rev_map.* files, 'git svn' will not
+be able to rebuild them.
 +
 The 'git svn log' command will not work on repositories using
 this, either.  Using this conflicts with the 'useSvmProps'
 option for (hopefully) obvious reasons.
++
+This option is NOT recommended as it makes it difficult to track down
+old references to SVN revision numbers in existing documentation, bug
+reports and archives.  If you plan to eventually migrate from SVN to git
+and are certain about dropping SVN history, consider
+linkgit:git-filter-branch[1] instead.  filter-branch also allows
+reformating of metadata for ease-of-reading and rewriting authorship
+info for non-"svn.authorsFile" users.
 
 svn.useSvmProps::
 svn-remote.<name>.useSvmProps::
index 74d1d49dbffda60a00f6c195d77020b5ec7be979..1ca56c85aa66b96dc1774b77ba1e117d93847033 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 'git update-index'
             [--add] [--remove | --force-remove] [--replace]
             [--refresh] [-q] [--unmerged] [--ignore-missing]
-            [--cacheinfo <mode> <object> <file>]*
+            [(--cacheinfo <mode> <object> <file>)...]
             [--chmod=(+|-)x]
             [--assume-unchanged | --no-assume-unchanged]
             [--skip-worktree | --no-skip-worktree]
@@ -21,7 +21,7 @@ SYNOPSIS
             [--info-only] [--index-info]
             [-z] [--stdin]
             [--verbose]
-            [--] [<file>]*
+            [--] [<file>...]
 
 DESCRIPTION
 -----------
@@ -144,8 +144,8 @@ you will need to handle the situation manually.
         Report what is being added and removed from index.
 
 -z::
-       Only meaningful with `--stdin`; paths are separated with
-       NUL character instead of LF.
+       Only meaningful with `--stdin` or `--index-info`; paths are
+       separated with NUL character instead of LF.
 
 \--::
        Do not interpret any more arguments as options.
index e1586c78c3d271c78bcf26827cf10ff234fcba62..51e8e0af1e7ff37ce4abfe53b6d52e9935b536a8 100644 (file)
@@ -32,19 +32,19 @@ Custom commands may also be specified.
 
 OPTIONS
 -------
--b BROWSER::
---browser=BROWSER::
-       Use the specified BROWSER. It must be in the list of supported
+-b <browser>::
+--browser=<browser>::
+       Use the specified browser. It must be in the list of supported
        browsers.
 
--t BROWSER::
---tool=BROWSER::
+-t <browser>::
+--tool=<browser>::
        Same as above.
 
--c CONF.VAR::
---config=CONF.VAR::
+-c <conf.var>::
+--config=<conf.var>::
        CONF.VAR is looked up in the git config files. If it's set,
-       then its value specify the browser that should be used.
+       then its value specifies the browser that should be used.
 
 CONFIGURATION VARIABLES
 -----------------------
index 646e76178935e7c702f3a2e56ab819e93e7b7609..0c897df6a71ddb5e7f4e960300c2b336ede5aab2 100644 (file)
@@ -9,11 +9,11 @@ git - the stupid content tracker
 SYNOPSIS
 --------
 [verse]
-'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
+'git' [--version] [--exec-path[=<path>]] [--html-path]
     [-p|--paginate|--no-pager] [--no-replace-objects]
-    [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
-    [-c name=value]
-    [--help] COMMAND [ARGS]
+    [--bare] [--git-dir=<path>] [--work-tree=<path>]
+    [-c <name>=<value>]
+    [--help] <command> [<args>]
 
 DESCRIPTION
 -----------
@@ -28,7 +28,7 @@ also want to read linkgit:gitcvs-migration[7].  See
 the link:user-manual.html[Git User's Manual] for a more in-depth
 introduction.
 
-The COMMAND is either a name of a Git command (see below) or an alias
+The '<command>' is either a name of a Git command (see below) or an alias
 as defined in the configuration file (see linkgit:git-config[1]).
 
 Formatted and hyperlinked version of the latest git
@@ -44,9 +44,11 @@ unreleased) version of git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v1.7.3/git.html[documentation for release 1.7.3]
+* link:v1.7.3.2/git.html[documentation for release 1.7.3.2]
 
 * release notes for
+  link:RelNotes/1.7.3.2.txt[1.7.3.2],
+  link:RelNotes/1.7.3.1.txt[1.7.3.1],
   link:RelNotes/1.7.3.txt[1.7.3].
 
 * link:v1.7.2.3/git.html[documentation for release 1.7.2.3]
@@ -251,7 +253,7 @@ help ...`.
        The <name> is expected in the same format as listed by
        'git config' (subkeys separated by dots).
 
---exec-path::
+--exec-path[=<path>]::
        Path to wherever your core git programs are installed.
        This can also be controlled by setting the GIT_EXEC_PATH
        environment variable. If no path is given, 'git' will print
@@ -494,7 +496,7 @@ HEAD::
        (i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
 
 For a more complete list of ways to spell object names, see
-"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
 
 
 File/Directory Structure
index 5e9c5ebba3e3239f61195155448c960cfe476463..c27d086f68432d094a0fa7c1f9da353d6d3a0513 100644 (file)
@@ -971,7 +971,7 @@ commits from the master branch.  The string inside brackets
 before the commit log message is a short name you can use to
 name the commit.  In the above example, 'master' and 'mybranch'
 are branch heads.  'master^' is the first parent of 'master'
-branch head.  Please see linkgit:gitrevisions[1] if you want to
+branch head.  Please see linkgit:gitrevisions[7] if you want to
 see more complex cases.
 
 [NOTE]
index 05ac1c79f768352be8756eeb483e71f0d09131de..e21bac4f3f16a6d0c0b1ff6d3062e8464e182e7f 100644 (file)
@@ -69,7 +69,7 @@ frequently used options.
        the form "'<from>'..'<to>'" to show all revisions between '<from>' and
        back to '<to>'. Note, more advanced revision selection can be applied.
        For a more complete list of ways to spell object names, see
-       linkgit:gitrevisions[1].
+       linkgit:gitrevisions[7].
 
 <path>...::
 
index 049313d6015758fb3e95c21fecc40e021e8aa4bd..8676e26ca20311196d069ab28c08c913271c7631 100644 (file)
@@ -52,7 +52,7 @@ no-renormalize;;
        Disables the `renormalize` option.  This overrides the
        `merge.renormalize` configuration variable.
 
-subtree[=path];;
+subtree[=<path>];;
        This option is a more advanced form of 'subtree' strategy, where
        the strategy makes a guess on how two trees must be shifted to
        match with each other when merging.  Instead, the specified path
index 9b6f3899ec28fb431c1f3969bf5bfb717c12f346..50923e2ce9a5bdc3bcabb072a67921c6cf8171c1 100644 (file)
@@ -1,5 +1,5 @@
---pretty[='<format>']::
---format='<format>'::
+--pretty[=<format>]::
+--format=<format>::
 
        Pretty-print the contents of the commit logs in a given format,
        where '<format>' can be one of 'oneline', 'short', 'medium',
index e2237ae4a0a80b0e5aa22cbb13aa5a01ce4fb891..42ca059908b6af5726d958d92912705c96235d29 100644 (file)
@@ -13,7 +13,7 @@ include::pretty-options.txt[]
 
        Synonym for `--date=relative`.
 
---date={relative,local,default,iso,rfc,short,raw}::
+--date=(relative|local|default|iso|rfc|short|raw)::
 
        Only takes effect for dates shown in human-readable format, such
        as when using "--pretty". `log.date` config variable sets a default
@@ -45,13 +45,13 @@ endif::git-rev-list[]
 
 --parents::
 
-       Print the parents of the commit.  Also enables parent
-       rewriting, see 'History Simplification' below.
+       Print also the parents of the commit (in the form "commit parent...").
+       Also enables parent rewriting, see 'History Simplification' below.
 
 --children::
 
-       Print the children of the commit.  Also enables parent
-       rewriting, see 'History Simplification' below.
+       Print also the children of the commit (in the form "commit child...").
+       Also enables parent rewriting, see 'History Simplification' below.
 
 ifdef::git-rev-list[]
 --timestamp::
@@ -95,6 +95,8 @@ you would get an output like this:
        to be printed in between commits, in order for the graph history
        to be drawn properly.
 +
+This enables parent rewriting, see 'History Simplification' below.
++
 This implies the '--topo-order' option by default, but the
 '--date-order' option may also be specified.
 
@@ -146,6 +148,9 @@ options may be given. See linkgit:git-diff-files[1] for more options.
 -t::
 
        Show the tree objects in the diff output. This implies '-r'.
+
+-s::
+       Suppress diff output.
 endif::git-rev-list[]
 
 Commit Limiting
@@ -246,29 +251,29 @@ endif::git-rev-list[]
        Pretend as if all the refs in `refs/` are listed on the
        command line as '<commit>'.
 
---branches[=pattern]::
+--branches[=<pattern>]::
 
        Pretend as if all the refs in `refs/heads` are listed
-       on the command line as '<commit>'. If `pattern` is given, limit
+       on the command line as '<commit>'. If '<pattern>' is given, limit
        branches to ones matching given shell glob. If pattern lacks '?',
        '*', or '[', '/*' at the end is implied.
 
---tags[=pattern]::
+--tags[=<pattern>]::
 
        Pretend as if all the refs in `refs/tags` are listed
-       on the command line as '<commit>'. If `pattern` is given, limit
+       on the command line as '<commit>'. If '<pattern>' is given, limit
        tags to ones matching given shell glob. If pattern lacks '?', '*',
        or '[', '/*' at the end is implied.
 
---remotes[=pattern]::
+--remotes[=<pattern>]::
 
        Pretend as if all the refs in `refs/remotes` are listed
-       on the command line as '<commit>'. If `pattern`is given, limit
+       on the command line as '<commit>'. If '<pattern>' is given, limit
        remote tracking branches to ones matching given shell glob.
        If pattern lacks '?', '*', or '[', '/*' at the end is implied.
 
---glob=glob-pattern::
-       Pretend as if all the refs matching shell glob `glob-pattern`
+--glob=<glob-pattern>::
+       Pretend as if all the refs matching shell glob '<glob-pattern>'
        are listed on the command line as '<commit>'. Leading 'refs/',
        is automatically prepended if missing. If pattern lacks '?', '*',
        or '[', '/*' at the end is implied.
index fe846f043ca30fdfc3bc93b2dbba75154bd38804..3d4b79c480e2c84150bee96392ee2dd2a4b7d3ea 100644 (file)
@@ -107,11 +107,13 @@ the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
   found.
 
 * A colon, followed by a slash, followed by a text (e.g. `:/fix nasty bug`): this names
-  a commit whose commit message starts with the specified text.
+  a commit whose commit message matches the specified regular expression.
   This name returns the youngest matching commit which is
   reachable from any ref.  If the commit message starts with a
   '!', you have to repeat that;  the special sequence ':/!',
   followed by something else than '!' is reserved for now.
+  The regular expression can match any part of the commit message. To
+  match messages starting with a string, one can use e.g. `:/^foo`.
 
 * A suffix ':' followed by a path (e.g. `HEAD:README`); this names the blob or tree
   at the given path in the tree-ish object named by the part
diff --git a/Documentation/technical/api-sigchain.txt b/Documentation/technical/api-sigchain.txt
new file mode 100644 (file)
index 0000000..535cdff
--- /dev/null
@@ -0,0 +1,41 @@
+sigchain API
+============
+
+Code often wants to set a signal handler to clean up temporary files or
+other work-in-progress when we die unexpectedly. For multiple pieces of
+code to do this without conflicting, each piece of code must remember
+the old value of the handler and restore it either when:
+
+  1. The work-in-progress is finished, and the handler is no longer
+     necessary. The handler should revert to the original behavior
+     (either another handler, SIG_DFL, or SIG_IGN).
+
+  2. The signal is received. We should then do our cleanup, then chain
+     to the next handler (or die if it is SIG_DFL).
+
+Sigchain is a tiny library for keeping a stack of handlers. Your handler
+and installation code should look something like:
+
+------------------------------------------
+  void clean_foo_on_signal(int sig)
+  {
+         clean_foo();
+         sigchain_pop(sig);
+         raise(sig);
+  }
+
+  void other_func()
+  {
+         sigchain_push_common(clean_foo_on_signal);
+         mess_up_foo();
+         clean_foo();
+  }
+------------------------------------------
+
+Handlers are given the typdef of sigchain_fun. This is the same type
+that is given to signal() or sigaction(). It is perfectly reasonable to
+push SIG_DFL or SIG_IGN onto the stack.
+
+You can sigchain_push and sigchain_pop individual signals. For
+convenience, sigchain_push_common will push the handler onto the stack
+for many common signals.
index fecc4eb5b3b853f4781c769fff8337e8bb6c3500..fc56da677cb0ed3d9243bfb928686b60df213243 100644 (file)
@@ -397,7 +397,7 @@ is usually a shortcut for the HEAD branch in the repository "origin".
 For the complete list of paths which git checks for references, and
 the order it uses to decide which to choose when there are multiple
 references with the same shorthand name, see the "SPECIFYING
-REVISIONS" section of linkgit:gitrevisions[1].
+REVISIONS" section of linkgit:gitrevisions[7].
 
 [[Updating-a-repository-With-git-fetch]]
 Updating a repository with git fetch
@@ -568,7 +568,7 @@ We have seen several ways of naming commits already:
        - HEAD: refers to the head of the current branch
 
 There are many more; see the "SPECIFYING REVISIONS" section of the
-linkgit:gitrevisions[1] man page for the complete list of ways to
+linkgit:gitrevisions[7] man page for the complete list of ways to
 name revisions.  Some examples:
 
 -------------------------------------------------
@@ -909,7 +909,7 @@ commits reachable from some head but not from any tag in the repository:
 $ gitk $( git show-ref --heads ) --not  $( git show-ref --tags )
 -------------------------------------------------
 
-(See linkgit:gitrevisions[1] for explanations of commit-selecting
+(See linkgit:gitrevisions[7] for explanations of commit-selecting
 syntax such as `--not`.)
 
 [[making-a-release]]
@@ -955,7 +955,7 @@ echo "git diff --stat --summary -M v$last v$new > ../diffstat-$new"
 and then he just cut-and-pastes the output commands after verifying that
 they look OK.
 
-[[Finding-comments-With-given-Content]]
+[[Finding-commits-With-given-Content]]
 Finding commits referencing a file with given content
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -1635,7 +1635,7 @@ you've checked out.
 The reflogs are kept by default for 30 days, after which they may be
 pruned.  See linkgit:git-reflog[1] and linkgit:git-gc[1] to learn
 how to control this pruning, and see the "SPECIFYING REVISIONS"
-section of linkgit:gitrevisions[1] for details.
+section of linkgit:gitrevisions[7] for details.
 
 Note that the reflog history is very different from normal git history.
 While normal history is shared by every repository that works on the
@@ -2171,11 +2171,14 @@ $ git push mytree release
 
 Now to apply some patches from the community.  Think of a short
 snappy name for a branch to hold this patch (or related group of
-patches), and create a new branch from the current tip of Linus's
-branch:
+patches), and create a new branch from a recent stable tag of
+Linus's branch. Picking a stable base for your branch will:
+1) help you: by avoiding inclusion of unrelated and perhaps lightly
+tested changes
+2) help future bug hunters that use "git bisect" to find problems
 
 -------------------------------------------------
-$ git checkout -b speed-up-spinlocks origin
+$ git checkout -b speed-up-spinlocks v2.6.35
 -------------------------------------------------
 
 Now you apply the patch(es), run some tests, and commit the change(s).  If
@@ -2439,9 +2442,9 @@ You have performed no merges into mywork, so it is just a simple linear
 sequence of patches on top of "origin":
 
 ................................................
- o--o--o <-- origin
+ o--o--O <-- origin
         \
-         o--o--o <-- mywork
+        a--b--c <-- mywork
 ................................................
 
 Some more interesting work has been done in the upstream project, and
@@ -3850,7 +3853,7 @@ You create a commit object by giving it the tree that describes the
 state at the time of the commit, and a list of parents:
 
 -------------------------------------------------
-$ git commit-tree <tree> -p <parent> [-p <parent2> ..]
+$ git commit-tree <tree> -p <parent> [(-p <parent2>)...]
 -------------------------------------------------
 
 and then giving the reason for the commit on stdin (either through
index ac9c4dbf2fe692fa8385c2d2c54f4122339204de..9ff9e51205ca14aef2f0e2c5936d14f715f1ea61 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.7.3
+DEF_VER=v1.7.3.2
 
 LF='
 '
index b7a62cfdf2ca4f05e47d69332976adabb73583e9..cd0f6481721f9ec47bdc2c0da93936fdfe806a2c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -390,6 +390,8 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
          $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
          git-instaweb
 
+ETAGS_TARGET = TAGS
+
 # Empty...
 EXTRA_PROGRAMS =
 
@@ -1122,6 +1124,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
        NO_REGEX = YesPlease
        NO_PYTHON = YesPlease
        BLK_SHA1 = YesPlease
+       ETAGS_TARGET = ETAGS
        COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32
        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
        COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \
@@ -1918,7 +1921,7 @@ git-%$X: %.o $(GITLIBS)
 
 git-imap-send$X: imap-send.o $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-               $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
+               $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 
 git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
@@ -1961,11 +1964,11 @@ info:
 pdf:
        $(MAKE) -C Documentation pdf
 
-TAGS:
-       $(RM) TAGS
-       $(FIND) . -name '*.[hcS]' -print | xargs etags -a
+$(ETAGS_TARGET): FORCE
+       $(RM) $(ETAGS_TARGET)
+       $(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)
 
-tags:
+tags: FORCE
        $(RM) tags
        $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
 
@@ -1974,7 +1977,7 @@ cscope:
        $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
 
 ### Detect prefix changes
-TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
+TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\
              $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
 
 GIT-CFLAGS: FORCE
@@ -2235,7 +2238,7 @@ clean:
        $(RM) $(TEST_PROGRAMS)
        $(RM) -r bin-wrappers
        $(RM) -r $(dep_dirs)
-       $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
+       $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope*
        $(RM) -r autom4te.cache
        $(RM) config.log config.mak.autogen config.mak.append config.status config.cache
        $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
@@ -2259,7 +2262,7 @@ endif
 
 .PHONY: all install clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
-.PHONY: FORCE TAGS tags cscope
+.PHONY: FORCE cscope
 
 ### Check documentation
 #
index 8c65931ff4d966ea7c76cdfa1fcb000c97ab1c19..c2b0d4d1266e8f3b104133da35cfcc2ec4ad97a6 120000 (symlink)
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/1.7.3.txt
\ No newline at end of file
+Documentation/RelNotes/1.7.3.2.txt
\ No newline at end of file
index edd68534fa847ad839fe8554e6864b39de4fcde0..f59afda6ffda02920a50cabe1eb3e764221199ba 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -7,9 +7,9 @@
 #include "unpack-trees.h"
 
 static char const * const archive_usage[] = {
-       "git archive [options] <tree-ish> [path...]",
+       "git archive [options] <tree-ish> [<path>...]",
        "git archive --list",
-       "git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [path...]",
+       "git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]",
        "git archive --remote <repo> [--exec <cmd>] --list",
        NULL
 };
index 80649ba0b28846d09b49a791dd25af9a2907f75f..9b87fb9ac2505e746ae34db34740cdfb3cfde127 100644 (file)
@@ -12,8 +12,8 @@
 static const char builtin_bundle_usage[] =
   "git bundle create <file> <git-rev-list args>\n"
   "   or: git bundle verify <file>\n"
-  "   or: git bundle list-heads <file> [refname...]\n"
-  "   or: git bundle unbundle <file> [refname...]";
+  "   or: git bundle list-heads <file> [<refname>...]\n"
+  "   or: git bundle unbundle <file> [<refname>...]";
 
 int cmd_bundle(int argc, const char **argv, const char *prefix)
 {
index a7a5ee10f32d52c7555f85f2dcf6c567425488dd..65cbee0552b8e2d5ed7cfd57781031d72c1cdd98 100644 (file)
@@ -155,7 +155,7 @@ static void checkout_all(const char *prefix, int prefix_length)
 }
 
 static const char * const builtin_checkout_index_usage[] = {
-       "git checkout-index [options] [--] <file>...",
+       "git checkout-index [options] [--] [<file>...]",
        NULL
 };
 
index 560eae17159290c5adcefd2e2e2da5825ac6b75d..a54583b3a4936b341820cf5c639e5647ce456a5a 100644 (file)
@@ -691,16 +691,16 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
                           "create and checkout a new branch"),
                OPT_STRING('B', NULL, &opts.new_branch_force, "branch",
                           "create/reset and checkout a branch"),
-               OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "log for new branch"),
-               OPT_SET_INT('t', "track",  &opts.track, "track",
+               OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "create reflog for new branch"),
+               OPT_SET_INT('t', "track",  &opts.track, "set upstream info for new branch",
                        BRANCH_TRACK_EXPLICIT),
                OPT_STRING(0, "orphan", &opts.new_orphan_branch, "new branch", "new unparented branch"),
-               OPT_SET_INT('2', "ours", &opts.writeout_stage, "stage",
+               OPT_SET_INT('2', "ours", &opts.writeout_stage, "checkout our version for unmerged files",
                            2),
-               OPT_SET_INT('3', "theirs", &opts.writeout_stage, "stage",
+               OPT_SET_INT('3', "theirs", &opts.writeout_stage, "checkout their version for unmerged files",
                            3),
-               OPT_BOOLEAN('f', "force", &opts.force, "force"),
-               OPT_BOOLEAN('m', "merge", &opts.merge, "merge"),
+               OPT_BOOLEAN('f', "force", &opts.force, "force checkout (throw away local modifications)"),
+               OPT_BOOLEAN('m', "merge", &opts.merge, "perform a 3-way merge with the new branch"),
                OPT_STRING(0, "conflict", &conflict_style, "style",
                           "conflict style (merge or diff3)"),
                OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
index c8798f549ed12192a098ab90b35c0437b8059351..fb24030751ec5e755009a97439ffa08ff55f67d5 100644 (file)
@@ -38,7 +38,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 {
        int i;
        int show_only = 0, remove_directories = 0, quiet = 0, ignored = 0;
-       int ignored_only = 0, baselen = 0, config_set = 0, errors = 0;
+       int ignored_only = 0, config_set = 0, errors = 0;
        int rm_flags = REMOVE_DIR_KEEP_NESTED_GIT;
        struct strbuf directory = STRBUF_INIT;
        struct dir_struct dir;
@@ -138,7 +138,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                if (pathspec) {
                        memset(seen, 0, argc > 0 ? argc : 1);
                        matches = match_pathspec(pathspec, ent->name, len,
-                                                baselen, seen);
+                                                0, seen);
                }
 
                if (S_ISDIR(st.st_mode)) {
@@ -153,7 +153,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                                        printf("Removing %s\n", qname);
                                if (remove_dir_recursively(&directory,
                                                           rm_flags) != 0) {
-                                       warning("failed to remove '%s'", qname);
+                                       warning("failed to remove %s", qname);
                                        errors++;
                                }
                        } else if (show_only) {
@@ -173,7 +173,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                                printf("Removing %s\n", qname);
                        }
                        if (unlink(ent->name) != 0) {
-                               warning("failed to remove '%s'", qname);
+                               warning("failed to remove %s", qname);
                                errors++;
                        }
                }
index 87f0591c2f68a03e06c73b352282426b803450ba..e06573920f461229717b885e291c76831f87e428 100644 (file)
@@ -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)
 {
index 6fc50477031c9c9f7be01fee7d90266c67b38c79..d35f000c034964ed600b1d8d45e2ef9260abcfb6 100644 (file)
@@ -16,7 +16,7 @@
 static const char * const builtin_fetch_usage[] = {
        "git fetch [<options>] [<repository> [<refspec>...]]",
        "git fetch [<options>] <group>",
-       "git fetch --multiple [<options>] [<repository> | <group>]...",
+       "git fetch --multiple [<options>] [(<repository> | <group>)...]",
        "git fetch --all [<options>]",
        NULL
 };
index da32f3df34da7af3cdcb0a9dd6aa66061bdfe927..3d5f6ace97b806fd7dba9f8c5d62abcdbd903681 100644 (file)
@@ -24,7 +24,7 @@
 #endif
 
 static char const * const grep_usage[] = {
-       "git grep [options] [-e] <pattern> [<rev>...] [[--] path...]",
+       "git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]",
        NULL
 };
 
index 2e680d7a7ac3495c9d6bd10e0fa6a6ae28bb8670..8dc5c0b5410d4bb57607bab690126f22d954dd7a 100644 (file)
@@ -11,7 +11,7 @@
 #include "exec_cmd.h"
 
 static const char index_pack_usage[] =
-"git index-pack [-v] [-o <index-file>] [{ --keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
+"git index-pack [-v] [-o <index-file>] [ --keep | --keep=<msg> ] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";
 
 struct object_entry
 {
@@ -161,7 +161,7 @@ static void use(int bytes)
        input_offset += bytes;
 
        /* make sure off_t is sufficiently large not to wrap */
-       if (consumed_bytes > consumed_bytes + bytes)
+       if (signed_add_overflows(consumed_bytes, bytes))
                die("pack too large for current definition of off_t");
        consumed_bytes += bytes;
 }
index 0271285fad6ad532a6133838f7188498476fd77b..9d4886c71675f2bc50671ea284875ebae9a34735 100644 (file)
@@ -294,11 +294,26 @@ static int create_default_files(const char *template_path)
        return reinit;
 }
 
+static void create_object_directory(void)
+{
+       const char *object_directory = get_object_directory();
+       int len = strlen(object_directory);
+       char *path = xmalloc(len + 40);
+
+       memcpy(path, object_directory, len);
+
+       safe_create_dir(object_directory, 1);
+       strcpy(path+len, "/pack");
+       safe_create_dir(path, 1);
+       strcpy(path+len, "/info");
+       safe_create_dir(path, 1);
+
+       free(path);
+}
+
 int init_db(const char *template_dir, unsigned int flags)
 {
-       const char *sha1_dir;
-       char *path;
-       int len, reinit;
+       int reinit;
 
        safe_create_dir(get_git_dir(), 0);
 
@@ -313,16 +328,7 @@ int init_db(const char *template_dir, unsigned int flags)
 
        reinit = create_default_files(template_dir);
 
-       sha1_dir = get_object_directory();
-       len = strlen(sha1_dir);
-       path = xmalloc(len + 40);
-       memcpy(path, sha1_dir, len);
-
-       safe_create_dir(sha1_dir, 1);
-       strcpy(path+len, "/pack");
-       safe_create_dir(path, 1);
-       strcpy(path+len, "/info");
-       safe_create_dir(path, 1);
+       create_object_directory();
 
        if (shared_repository) {
                char buf[10];
index bb4f612b3d48c453d551f251b65887beb283ec7b..6a307ab784a25c9f8d201392f79c7146a4a8eece 100644 (file)
@@ -424,7 +424,7 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_
 }
 
 static const char * const ls_files_usage[] = {
-       "git ls-files [options] [<file>]*",
+       "git ls-files [options] [<file>...]",
        NULL
 };
 
index a8187568bf99872e717c389b031331838544fe04..f73e6bd9626a0e929a513fed1fd1227c28732ec7 100644 (file)
@@ -24,7 +24,7 @@ static int chomp_prefix;
 static const char *ls_tree_prefix;
 
 static const  char * const ls_tree_usage[] = {
-       "git ls-tree [<options>] <tree-ish> [path...]",
+       "git ls-tree [<options>] <tree-ish> [<path>...]",
        NULL
 };
 
index 99654d02221c13ff98f268ad2dee99f16e794750..2d4327801e4f7766328389311c87dd63d4c5f8e4 100644 (file)
@@ -10,7 +10,7 @@
 #include "strbuf.h"
 
 static const char git_mailsplit_usage[] =
-"git mailsplit [-d<prec>] [-f<n>] [-b] [--keep-cr] -o<directory> [<mbox>|<Maildir>...]";
+"git mailsplit [-d<prec>] [-f<n>] [-b] [--keep-cr] -o<directory> [(<mbox>|<Maildir>)...]";
 
 static int is_from_line(const char *line, int len)
 {
index 0e8167311884d38c48a9421bf8aede89e7f2c22d..f8eba53c82242d0c435524ab9ffab70ba2e2d5ad 100644 (file)
 #endif
 
 static const char pack_usage[] =
-  "git pack-objects [{ -q | --progress | --all-progress }]\n"
+  "git pack-objects [ -q | --progress | --all-progress ]\n"
   "        [--all-progress-implied]\n"
-  "        [--max-pack-size=N] [--local] [--incremental]\n"
-  "        [--window=N] [--window-memory=N] [--depth=N]\n"
+  "        [--max-pack-size=<n>] [--local] [--incremental]\n"
+  "        [--window=<n>] [--window-memory=<n>] [--depth=<n>]\n"
   "        [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]\n"
-  "        [--threads=N] [--non-empty] [--revs [--unpacked | --all]*]\n"
+  "        [--threads=<n>] [--non-empty] [--revs [--unpacked | --all]]\n"
   "        [--reflog] [--stdout | base-name] [--include-tag]\n"
-  "        [--keep-unreachable | --unpack-unreachable \n"
-  "        [<ref-list | <object-list]";
+  "        [--keep-unreachable | --unpack-unreachable]\n"
+  "        [< ref-list | < object-list]";
 
 struct object_entry {
        struct pack_idx_entry idx;
@@ -431,7 +431,7 @@ static int write_one(struct sha1file *f,
        written_list[nr_written++] = &e->idx;
 
        /* make sure off_t is sufficiently large not to wrap */
-       if (*offset > *offset + size)
+       if (signed_add_overflows(*offset, size))
                die("pack too large for current definition of off_t");
        *offset += size;
        return 1;
index 48e0a6bf260cab18d44058ade554e3a9d5946b93..e9a6e09257f445b1c26833dd9fae89518369daa7 100644 (file)
@@ -15,7 +15,7 @@ static const char * const builtin_remote_usage[] = {
        "git remote set-head <name> (-a | -d | <branch>)",
        "git remote [-v | --verbose] show [-n] <name>",
        "git remote prune [-n | --dry-run] <name>",
-       "git remote [-v | --verbose] update [-p | --prune] [group | remote]",
+       "git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]",
        "git remote set-branches <name> [--add] <branch>...",
        "git remote set-url <name> <newurl> [<oldurl>]",
        "git remote set-url --add <name> <newurl>",
index efe9360e2fdb9aac3bae0c61c85531041f24708a..158ce1111af12db1445d82cfa5728bc19837570d 100644 (file)
@@ -11,9 +11,9 @@
 static const char rev_list_usage[] =
 "git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
 "  limiting output:\n"
-"    --max-count=nr\n"
-"    --max-age=epoch\n"
-"    --min-age=epoch\n"
+"    --max-count=<n>\n"
+"    --max-age=<epoch>\n"
+"    --min-age=<epoch>\n"
 "    --sparse\n"
 "    --no-merges\n"
 "    --remove-empty\n"
@@ -33,7 +33,7 @@ static const char rev_list_usage[] =
 "    --objects | --objects-edge\n"
 "    --unpacked\n"
 "    --header | --pretty\n"
-"    --abbrev=nr | --no-abbrev\n"
+"    --abbrev=<n> | --no-abbrev\n"
 "    --abbrev-commit\n"
 "    --left-right\n"
 "  special purpose:\n"
index e8719aa9e9f47c30b697332925fcdd206fdfd55c..8663ccaa99299447a42da64f9f2c77f772996902 100644 (file)
@@ -6,7 +6,7 @@
 #include "parse-options.h"
 
 static const char* show_branch_usage[] = {
-    "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...",
+    "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]",
     "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]",
     NULL
 };
index 685566e0b5e458c510fdf989744d63dda29e28f0..f63973c9143c4109a3d1e40df9ec66a32498fe00 100644 (file)
@@ -83,7 +83,7 @@ static void use(int bytes)
        offset += bytes;
 
        /* make sure off_t is sufficiently large not to wrap */
-       if (consumed_bytes > consumed_bytes + bytes)
+       if (signed_add_overflows(consumed_bytes, bytes))
                die("pack too large for current definition of off_t");
        consumed_bytes += bytes;
 }
index 3ab214d24e537865875d6d1e3acd8cf6b019ff22..62d9f3f0fa358058fcf54e4fcbd4c3101b1279db 100644 (file)
@@ -398,7 +398,7 @@ static void read_index_info(int line_termination)
 }
 
 static const char update_index_usage[] =
-"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
+"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] [<file>...]";
 
 static unsigned char head_sha1[20];
 static unsigned char merge_head_sha1[20];
diff --git a/cache.h b/cache.h
index 2ef2fa3a5e166d94e5e981ca7c76afad13236e7e..33decd942d4985c8efc1c75fd3fa2f4adf4a56ca 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -277,9 +277,16 @@ static inline int ce_to_dtype(const struct cache_entry *ce)
        else
                return DT_UNKNOWN;
 }
-#define canon_mode(mode) \
-       (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \
-       S_ISLNK(mode) ? S_IFLNK : S_ISDIR(mode) ? S_IFDIR : S_IFGITLINK)
+static inline unsigned int canon_mode(unsigned int mode)
+{
+       if (S_ISREG(mode))
+               return S_IFREG | ce_permissions(mode);
+       if (S_ISLNK(mode))
+               return S_IFLNK;
+       if (S_ISDIR(mode))
+               return S_IFDIR;
+       return S_IFGITLINK;
+}
 
 #define flexible_size(STRUCT,len) ((offsetof(struct STRUCT,name) + (len) + 8) & ~7)
 #define cache_entry_size(len) flexible_size(cache_entry,len)
@@ -438,7 +445,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
  * at least 'nr' entries; the number of entries currently allocated
  * is 'alloc', using the standard growing factor alloc_nr() macro.
  *
- * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
+ * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'.
  */
 #define ALLOC_GROW(x, nr, alloc) \
        do { \
index f2d9e1fd974b7271366da09370e10fafd2c50f08..b98e6000062134f01a0611fb17a3fd43250f7989 100644 (file)
@@ -195,9 +195,10 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)
  */
 static int do_lstat(const char *file_name, struct stat *buf)
 {
+       int err;
        WIN32_FILE_ATTRIBUTE_DATA fdata;
 
-       if (!(errno = get_file_attr(file_name, &fdata))) {
+       if (!(err = get_file_attr(file_name, &fdata))) {
                buf->st_ino = 0;
                buf->st_gid = 0;
                buf->st_uid = 0;
@@ -211,6 +212,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
                buf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime));
                return 0;
        }
+       errno = err;
        return -1;
 }
 
index 3450cabd0e3281e0eeedeb35d331b95bf95f5afb..57dc20c43ca1ba205ec0a18e263f9dde081390f4 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -631,8 +631,12 @@ char *git_getpass(const char *prompt)
                askpass = askpass_program;
        if (!askpass)
                askpass = getenv("SSH_ASKPASS");
-       if (!askpass || !(*askpass))
-               return getpass(prompt);
+       if (!askpass || !(*askpass)) {
+               char *result = getpass(prompt);
+               if (!result)
+                       die_errno("Could not read password");
+               return result;
+       }
 
        args[0] = askpass;
        args[1] = prompt;
index 67569901e71e5062199e48304afc424f15b57ba1..f83f019ca91a2611f5bd3474ccf6d10081320c4c 100755 (executable)
@@ -1125,7 +1125,7 @@ _git_diff ()
        case "$cur" in
        --*)
                __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
-                       --base --ours --theirs
+                       --base --ours --theirs --no-index
                        $__git_diff_common_options
                        "
                return
index 3ad2c0cea56392fb941282ec6225c5f9a3ce05ea..75e8b258177f7f04dadcac125f2bf7ebea4d0f81 100755 (executable)
@@ -42,7 +42,7 @@ then
 fi
 
 # don't link to a workdir
-if test -L "$git_dir/config"
+if test -h "$git_dir/config"
 then
        die "\"$orig_git\" is a working directory only, please specify" \
                "a complete repository."
index e22a2b7fa5f6fcfc5b26541a21c10d3c8b7eda81..9326d3a1fa05f4878a21b58a623d07428f7230fe 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -20,15 +20,15 @@ static int reuseaddr;
 
 static const char daemon_usage[] =
 "git daemon [--verbose] [--syslog] [--export-all]\n"
-"           [--timeout=n] [--init-timeout=n] [--max-connections=n]\n"
-"           [--strict-paths] [--base-path=path] [--base-path-relaxed]\n"
-"           [--user-path | --user-path=path]\n"
-"           [--interpolated-path=path]\n"
-"           [--reuseaddr] [--detach] [--pid-file=file]\n"
-"           [--[enable|disable|allow-override|forbid-override]=service]\n"
-"           [--inetd | [--listen=host_or_ipaddr] [--port=n]\n"
-"                      [--user=user [--group=group]]\n"
-"           [directory...]";
+"           [--timeout=<n>] [--init-timeout=<n>] [--max-connections=<n>]\n"
+"           [--strict-paths] [--base-path=<path>] [--base-path-relaxed]\n"
+"           [--user-path | --user-path=<path>]\n"
+"           [--interpolated-path=<path>]\n"
+"           [--reuseaddr] [--detach] [--pid-file=<file>]\n"
+"           [--(enable|disable|allow-override|forbid-override)=<service>]\n"
+"           [--inetd | [--listen=<host_or_ipaddr>] [--port=<n>]\n"
+"                      [--user=<user> [--group=<group>]]\n"
+"           [<directory>...]";
 
 /* List of acceptable pathname prefixes */
 static char **ok_paths;
diff --git a/diff.c b/diff.c
index 9a5c77c13ff3406a85e8a94f309a639529f2d88b..340d878f02b0daa3b26cf5eb3bf71bdda1437ce2 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -3310,7 +3310,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
        else if ((argcount = parse_long_opt("output", av, &optarg))) {
                options->file = fopen(optarg, "w");
                if (!options->file)
-                       die_errno("Could not open '%s'", arg + strlen("--output="));
+                       die_errno("Could not open '%s'", optarg);
                options->close_file = 1;
                return argcount;
        } else
@@ -3527,7 +3527,7 @@ static void diff_flush_stat(struct diff_filepair *p, struct diff_options *o,
 
        if ((DIFF_FILE_VALID(p->one) && S_ISDIR(p->one->mode)) ||
            (DIFF_FILE_VALID(p->two) && S_ISDIR(p->two->mode)))
-               return; /* no tree diffs in patch format */
+               return; /* no useful stat for tree diffs */
 
        run_diffstat(p, o, diffstat);
 }
@@ -3540,7 +3540,7 @@ static void diff_flush_checkdiff(struct diff_filepair *p,
 
        if ((DIFF_FILE_VALID(p->one) && S_ISDIR(p->one->mode)) ||
            (DIFF_FILE_VALID(p->two) && S_ISDIR(p->two->mode)))
-               return; /* no tree diffs in patch format */
+               return; /* nothing to check in tree diffs */
 
        run_checkdiff(p, o);
 }
index 929de15aa9228099b3a772be788d746e440a9e8c..9c6544daacb6d0c7aeb2cc188d089ee5aeb06c5d 100644 (file)
@@ -128,9 +128,8 @@ void diffcore_pickaxe(const char *needle, int opts)
                                diff_free_filepair(p);
                }
 
-       if (opts & DIFF_PICKAXE_REGEX) {
+       if (opts & DIFF_PICKAXE_REGEX)
                regfree(&regex);
-       }
 
        free(q->queue);
        *q = outq;
diff --git a/dir.c b/dir.c
index 133f472a1e73786e781c1021eea17e543858937f..b2dfb69eb5606a7538cc5e1876a91f703ec4969c 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -232,7 +232,7 @@ int add_excludes_from_file_to_list(const char *fname,
 {
        struct stat st;
        int fd, i;
-       size_t size;
+       size_t size = 0;
        char *buf, *entry;
 
        fd = open(fname, O_RDONLY);
@@ -360,7 +360,8 @@ int excluded_from_list(const char *pathname,
 
                        if (x->flags & EXC_FLAG_MUSTBEDIR) {
                                if (!dtype) {
-                                       if (!prefixcmp(pathname, exclude))
+                                       if (!prefixcmp(pathname, exclude) &&
+                                           pathname[x->patternlen] == '/')
                                                return to_exclude;
                                        else
                                                continue;
index 2d0c3153791d7cceffb12f50dd5a7716b8c0a8c0..de5581fe51d532231b0121bd2ef2e46669015bda 100644 (file)
@@ -64,7 +64,7 @@ char *git_work_tree_cfg;
 static char *work_tree;
 
 static const char *git_dir;
-static char *git_object_dir, *git_index_file, *git_refs_dir, *git_graft_file;
+static char *git_object_dir, *git_index_file, *git_graft_file;
 
 /*
  * Repository-local GIT_* environment variables
@@ -87,8 +87,10 @@ const char * const local_repo_env[LOCAL_REPO_ENV_SIZE + 1] = {
 static void setup_git_env(void)
 {
        git_dir = getenv(GIT_DIR_ENVIRONMENT);
-       if (!git_dir)
+       if (!git_dir) {
                git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
+               git_dir = git_dir ? xstrdup(git_dir) : NULL;
+       }
        if (!git_dir)
                git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
        git_object_dir = getenv(DB_ENVIRONMENT);
@@ -96,8 +98,6 @@ static void setup_git_env(void)
                git_object_dir = xmalloc(strlen(git_dir) + 9);
                sprintf(git_object_dir, "%s/objects", git_dir);
        }
-       git_refs_dir = xmalloc(strlen(git_dir) + 6);
-       sprintf(git_refs_dir, "%s/refs", git_dir);
        git_index_file = getenv(INDEX_ENVIRONMENT);
        if (!git_index_file) {
                git_index_file = xmalloc(strlen(git_dir) + 7);
index 2317b0fe7509b957577234890135509143c0872b..eab68d58c394a67f4805d77b0007b583e79e24b9 100644 (file)
@@ -2884,7 +2884,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
 }
 
 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)
 {
index e7f008c7baae2ff484e16882e199b6b9d75195aa..de116a29ef091a23f60603a28f1260ba60f054ac 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -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
@@ -137,7 +137,7 @@ It does not apply to blobs recorded in its index."
     export GITHEAD_$his_tree
     if test -n "$GIT_QUIET"
     then
-           export GIT_MERGE_VERBOSITY=0
+           GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY
     fi
     git-merge-recursive $orig_tree -- HEAD $his_tree || {
            git rerere $allow_rerere_autoupdate
index 81883e7270daadafb4d827e894fa4645ff2e2b66..2af8d3edbe35dce35e940c5cccb91f9e06ebeff8 100644 (file)
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 #define bitsizeof(x)  (CHAR_BIT * sizeof(x))
 
+#define maximum_signed_value_of_type(a) \
+    (INTMAX_MAX >> (bitsizeof(intmax_t) - bitsizeof(a)))
+
+/*
+ * Signed integer overflow is undefined in C, so here's a helper macro
+ * to detect if the sum of two integers will overflow.
+ *
+ * Requires: a >= 0, typeof(a) equals typeof(b)
+ */
+#define signed_add_overflows(a, b) \
+    ((b) > maximum_signed_value_of_type(a) - (a))
+
 #ifdef __GNUC__
 #define TYPEOF(x) (__typeof__(x))
 #else
index 3335cee70b8ea5510f109da83d8470d3bbabab52..10a238ae3cc942bc021db18195b7098e2866c266 100755 (executable)
@@ -111,7 +111,7 @@ call_merge () {
        export GITHEAD_$cmt GITHEAD_$hd
        if test -n "$GIT_QUIET"
        then
-               export GIT_MERGE_VERBOSITY=1
+               GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY
        fi
        eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"'
        rv=$?
@@ -311,10 +311,6 @@ do
                esac
                strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$newopt")"
                do_merge=t
-               if test -n "$strategy"
-               then
-                       strategy=recursive
-               fi
                ;;
        -s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\
                --strateg=*|--strategy=*|\
index 937c69a74858a8a3c63bb41a23705b579df1b3a3..c2a0ef8d5a2794a45908cbcfff1b419ebfc17f8e 100755 (executable)
@@ -163,7 +163,7 @@ sub link_two_files($$) {
 
 
 sub usage() {
-       print("Usage: git relink [--safe] <dir> [<dir> ...] <master_dir> \n");
+       print("Usage: git relink [--safe] <dir>... <master_dir> \n");
        print("All directories should contain a .git/objects/ subdirectory.\n");
        print("Options\n");
        print("\t--safe\t" .
index 6dab3bf6a74bb52c7294e33dbac5bf87b51a9fdf..81b2ea5633a9692f52af67ab8bfd42b68781cf4d 100755 (executable)
@@ -85,6 +85,7 @@ git send-email [options] <file | directory | rev-list options >
     --[no-]validate                * Perform patch sanity checks. Default on.
     --[no-]format-patch            * understand any non optional arguments as
                                      `git format-patch` ones.
+    --force                        * Send even if safety checks would prevent it.
 
 EOT
        exit(1);
@@ -162,6 +163,7 @@ if ($@) {
 my ($quiet, $dry_run) = (0, 0);
 my $format_patch;
 my $compose_filename;
+my $force = 0;
 
 # Handle interactive edition of files.
 my $multiedit;
@@ -301,6 +303,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
                    "validate!" => \$validate,
                    "format-patch!" => \$format_patch,
                    "8bit-encoding=s" => \$auto_8bit_encoding,
+                   "force" => \$force,
         );
 
 unless ($rc) {
@@ -702,6 +705,16 @@ if (!defined $auto_8bit_encoding && scalar %broken_encoding) {
                                  default => "UTF-8");
 }
 
+if (!$force) {
+       for my $f (@files) {
+               if (get_patch_subject($f) =~ /\*\*\* SUBJECT HERE \*\*\*/) {
+                       die "Refusing to send because the patch\n\t$f\n"
+                               . "has the template subject '*** SUBJECT HERE ***'. "
+                               . "Pass --force if you really want to send.\n";
+               }
+       }
+}
+
 my $prompting = 0;
 if (!defined $sender) {
        $sender = $repoauthor || $repocommitter || '';
@@ -895,7 +908,7 @@ sub sanitize_address {
 
 sub valid_fqdn {
        my $domain = shift;
-       return !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
+       return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
 }
 
 sub maildomain_net {
@@ -940,7 +953,7 @@ sub maildomain {
 sub send_message {
        my @recipients = unique_email_list(@to);
        @cc = (grep { my $cc = extract_valid_address($_);
-                     not grep { $cc eq $_ } @recipients
+                     not grep { $cc eq $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients
                    }
               map { sanitize_address($_) }
               @cc);
index 6131670860514c215a6b9b7417dd05c3124e81b4..8d54b73d3208064829613499580bad541586c725 100644 (file)
@@ -151,17 +151,14 @@ get_author_ident_from_commit () {
                s/'\''/'\''\\'\'\''/g
                h
                s/^author \([^<]*\) <[^>]*> .*$/\1/
-               s/'\''/'\''\'\'\''/g
                s/.*/GIT_AUTHOR_NAME='\''&'\''/p
 
                g
                s/^author [^<]* <\([^>]*\)> .*$/\1/
-               s/'\''/'\''\'\'\''/g
                s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
 
                g
                s/^author [^<]* <[^>]*> \(.*\)$/\1/
-               s/'\''/'\''\'\'\''/g
                s/.*/GIT_AUTHOR_DATE='\''&'\''/p
 
                q
index 57f36ce8dd7cd25e269f8e31d6fdc668d62811f9..7561b374d2ec90fe774e98e39a121a1a3a3cdfa9 100755 (executable)
@@ -264,36 +264,22 @@ parse_flags_and_rev()
        b_tree=
        i_tree=
 
-       # Work around rev-parse --flags eating -q
-       for opt
-       do
-               case "$opt" in
-               -q|--quiet)
-                       GIT_QUIET=t
-                       ;;
-               esac
-       done
-
        REV=$(git rev-parse --no-flags --symbolic "$@" 2>/dev/null)
-       FLAGS=$(git rev-parse --no-revs --flags "$@" 2>/dev/null)
-
-       set -- $FLAGS
 
        FLAGS=
-       while test $# -ne 0
+       for opt
        do
-               case "$1" in
+               case "$opt" in
+                       -q|--quiet)
+                               GIT_QUIET=-t
+                       ;;
                        --index)
                                INDEX_OPTION=--index
                        ;;
-                       --)
-                               :
-                       ;;
-                       *)
-                               FLAGS="${FLAGS}${FLAGS:+ }$1"
+                       -*)
+                               FLAGS="${FLAGS}${FLAGS:+ }$opt"
                        ;;
                esac
-               shift
        done
 
        set -- $REV
@@ -387,7 +373,7 @@ apply_stash () {
 
        if test -n "$GIT_QUIET"
        then
-               export GIT_MERGE_VERBOSITY=0
+               GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY
        fi
        if git merge-recursive $b_tree -- $c_tree $w_tree
        then
@@ -446,9 +432,9 @@ apply_to_branch () {
        assert_stash_like "$@"
 
        git checkout -b $branch $REV^ &&
-       apply_stash "$@"
-
-       test -z "$IS_STASH_REF" || drop_stash "$@"
+       apply_stash "$@" && {
+               test -z "$IS_STASH_REF" || drop_stash "$@"
+       }
 }
 
 PARSE_CACHE='--not-parsed'
index 9b046b693fe82c992b3844bf6e8f79214dfa7a59..18cfb2466d11aa28a795e3dabac70e236061fbe9 100755 (executable)
@@ -1513,7 +1513,8 @@ sub cmt_sha2rev_batch {
 
 sub working_head_info {
        my ($head, $refs) = @_;
-       my @args = ('log', '--no-color', '--first-parent', '--pretty=medium');
+       my @args = qw/log --no-color --no-decorate --first-parent
+                     --pretty=medium/;
        my ($fh, $ctx) = command_output_pipe(@args, $head);
        my $hash;
        my %max;
@@ -3118,9 +3119,10 @@ sub _rev_list {
 sub check_cherry_pick {
        my $base = shift;
        my $tip = shift;
+       my $parents = shift;
        my @ranges = @_;
        my %commits = map { $_ => 1 }
-               _rev_list("--no-merges", $tip, "--not", $base);
+               _rev_list("--no-merges", $tip, "--not", $base, @$parents);
        for my $range ( @ranges ) {
                delete @commits{_rev_list($range)};
        }
@@ -3296,6 +3298,7 @@ sub find_extra_svn_parents {
                # double check that there are no missing non-merge commits
                my (@incomplete) = check_cherry_pick(
                        $merge_base, $merge_tip,
+                       $parents,
                        @$ranges,
                       );
 
diff --git a/git.c b/git.c
index 50a14013c5a87fed200df0a5a4ec6db0f1e2c223..0409ac9fd3f1ea36680189e07116e58b2630ccad 100644 (file)
--- a/git.c
+++ b/git.c
@@ -6,14 +6,14 @@
 #include "run-command.h"
 
 const char git_usage_string[] =
-       "git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n"
+       "git [--version] [--exec-path[=<path>]] [--html-path]\n"
        "           [-p|--paginate|--no-pager] [--no-replace-objects]\n"
-       "           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n"
+       "           [--bare] [--git-dir=<path>] [--work-tree=<path>]\n"
        "           [-c name=value] [--help]\n"
-       "           COMMAND [ARGS]";
+       "           <command> [<args>]";
 
 const char git_more_info_string[] =
-       "See 'git help COMMAND' for more information on a specific command.";
+       "See 'git help <command>' for more information on a specific command.";
 
 static struct startup_info git_startup_info;
 static int use_pager = -1;
diff --git a/git_remote_helpers/setup.cfg b/git_remote_helpers/setup.cfg
new file mode 100644 (file)
index 0000000..4bff887
--- /dev/null
@@ -0,0 +1,3 @@
+[build]
+build_purelib = build/lib
+build_platlib = build/lib
index 7b7e61719fa63e41917b41240061c68e3cbabf01..484081de82928108a23a714a76ea88693e56bdd1 100644 (file)
@@ -1062,6 +1062,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
        /* sha1:path --> object name of path in ent sha1
         * :path -> object name of path in index
         * :[0-3]:path -> object name of path in index at stage
+        * :/foo -> recent commit matching foo
         */
        if (name[0] == ':') {
                int stage = 0;
index fac2dbc24fc654e58840727204043a198d065921..675a91f93821421aa79de51857b22a4960da8ec1 100644 (file)
--- a/strbuf.h
+++ b/strbuf.h
@@ -16,7 +16,7 @@
  *
  * 2. the ->buf member is a byte array that has at least ->len + 1 bytes
  *    allocated. The extra byte is used to store a '\0', allowing the ->buf
- *    member to be a valid C-string. Every strbuf function ensure this
+ *    member to be a valid C-string. Every strbuf function ensures this
  *    invariant is preserved.
  *
  *    Note that it is OK to "play" with the buffer directly if you work it
index 396b9653a3ad80490cf360c86a910edff58862a2..141b60cdcbf4c8f70813e090a950c5d736853a8e 100644 (file)
@@ -8,27 +8,27 @@ check_count () {
        $PROG file $head >.result || return 1
        cat .result | perl -e '
                my %expect = (@ARGV);
-               my %count = ();
+               my %count = map { $_ => 0 } keys %expect;
                while (<STDIN>) {
                        if (/^[0-9a-f]+\t\(([^\t]+)\t/) {
                                my $author = $1;
                                for ($author) { s/^\s*//; s/\s*$//; }
-                               if (exists $expect{$author}) {
-                                       $count{$author}++;
-                               }
+                               $count{$author}++;
                        }
                }
                my $bad = 0;
                while (my ($author, $count) = each %count) {
                        my $ok;
-                       if ($expect{$author} != $count) {
+                       my $value = 0;
+                       $value = $expect{$author} if defined $expect{$author};
+                       if ($value != $count) {
                                $bad = 1;
                                $ok = "bad";
                        }
                        else {
                                $ok = "good";
                        }
-                       print STDERR "Author $author (expected $expect{$author}, attributed $count) $ok\n";
+                       print STDERR "Author $author (expected $value, attributed $count) $ok\n";
                }
                exit($bad);
        ' "$@"
index 385b1265de53829053bae40f111a0bf30004b98b..e3137d638ee5bb07b9278c1a9b90a207ad024a08 100755 (executable)
@@ -16,53 +16,29 @@ test_expect_success setup '
 '
 
 test_expect_success POSIXPERM,SANITY 'write-tree should notice unwritable repository' '
-
-       (
-               chmod a-w .git/objects .git/objects/?? &&
-               test_must_fail git write-tree
-       )
-       status=$?
-       chmod 775 .git/objects .git/objects/??
-       (exit $status)
-
+       test_when_finished "chmod 775 .git/objects .git/objects/??" &&
+       chmod a-w .git/objects .git/objects/?? &&
+       test_must_fail git write-tree
 '
 
 test_expect_success POSIXPERM,SANITY 'commit should notice unwritable repository' '
-
-       (
-               chmod a-w .git/objects .git/objects/?? &&
-               test_must_fail git commit -m second
-       )
-       status=$?
-       chmod 775 .git/objects .git/objects/??
-       (exit $status)
-
+       test_when_finished "chmod 775 .git/objects .git/objects/??" &&
+       chmod a-w .git/objects .git/objects/?? &&
+       test_must_fail git commit -m second
 '
 
 test_expect_success POSIXPERM,SANITY 'update-index should notice unwritable repository' '
-
-       (
-               echo 6O >file &&
-               chmod a-w .git/objects .git/objects/?? &&
-               test_must_fail git update-index file
-       )
-       status=$?
-       chmod 775 .git/objects .git/objects/??
-       (exit $status)
-
+       test_when_finished "chmod 775 .git/objects .git/objects/??" &&
+       echo 6O >file &&
+       chmod a-w .git/objects .git/objects/?? &&
+       test_must_fail git update-index file
 '
 
 test_expect_success POSIXPERM,SANITY 'add should notice unwritable repository' '
-
-       (
-               echo b >file &&
-               chmod a-w .git/objects .git/objects/?? &&
-               test_must_fail git add file
-       )
-       status=$?
-       chmod 775 .git/objects .git/objects/??
-       (exit $status)
-
+       test_when_finished "chmod 775 .git/objects .git/objects/??" &&
+       echo b >file &&
+       chmod a-w .git/objects .git/objects/?? &&
+       test_must_fail git add file
 '
 
 test_done
index 9a07de1a5b6d3a98c0db0b24cdd9c3a68cef79b5..8008fa2d894baf76a19168a020ed4f4640619ce7 100755 (executable)
@@ -17,17 +17,19 @@ test_expect_success 'setup' '
        cat >expected <<-\EOF &&
        100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0       init.t
        100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       sub/added
+       100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       subsub/added
        EOF
        cat >expected.swt <<-\EOF &&
        H init.t
        H sub/added
+       H subsub/added
        EOF
 
        test_commit init &&
        echo modified >>init.t &&
-       mkdir sub &&
-       touch sub/added &&
-       git add init.t sub/added &&
+       mkdir sub subsub &&
+       touch sub/added subsub/added &&
+       git add init.t sub/added subsub/added &&
        git commit -m "modified and added" &&
        git tag top &&
        git rm sub/added &&
@@ -81,6 +83,7 @@ test_expect_success 'match directories with trailing slash' '
        cat >expected.swt-noinit <<-\EOF &&
        S init.t
        H sub/added
+       S subsub/added
        EOF
 
        echo sub/ > .git/info/sparse-checkout &&
@@ -105,6 +108,7 @@ test_expect_success 'checkout area changes' '
        cat >expected.swt-nosub <<-\EOF &&
        H init.t
        S sub/added
+       S subsub/added
        EOF
 
        echo init.t >.git/info/sparse-checkout &&
index 100f857b168b1d8b88ea1a1e7e31ba42a2beee6c..813cc1b3e29ec840deb63ad9c3c1dffd2187cdc5 100755 (executable)
@@ -106,8 +106,8 @@ test_expect_success 'use --default' '
 
 test_expect_success 'master@{n} for various n' '
        N=$(git reflog | wc -l) &&
-       Nm1=$((N-1)) &&
-       Np1=$((N+1)) &&
+       Nm1=$(($N-1)) &&
+       Np1=$(($N+1)) &&
        git rev-parse --verify master@{0} &&
        git rev-parse --verify master@{1} &&
        git rev-parse --verify master@{$Nm1} &&
index 7f60fd0b2e8904ec231975df3d65e66c9363ff45..335420fd87f87727f323156f461e520374b7da0b 100755 (executable)
@@ -134,8 +134,8 @@ cat >ls.expected <<EOF
 100644 $ONE_SHA1 0     me
 EOF
 
-export GIT_DIR="$TRASH_DIRECTORY/.git"
-export GIT_WORK_TREE=/
+GIT_DIR="$TRASH_DIRECTORY/.git" && export GIT_DIR
+GIT_WORK_TREE=/ && export GIT_WORK_TREE
 
 test_vars 'abs gitdir, root' "$GIT_DIR" "/" ""
 test_foobar_root
@@ -154,24 +154,24 @@ say "GIT_DIR relative, GIT_WORK_TREE set"
 
 test_expect_success 'go to /' 'cd /'
 
-export GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git"
-export GIT_WORK_TREE=/
+GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git" && export GIT_DIR
+GIT_WORK_TREE=/ && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, root' "$GIT_DIR" "/" ""
 test_foobar_root
 
 test_expect_success 'go to /foo' 'cd /foo'
 
-export GIT_DIR="../$TRASH_DIRECTORY/.git"
-export GIT_WORK_TREE=/
+GIT_DIR="../$TRASH_DIRECTORY/.git" && export GIT_DIR
+GIT_WORK_TREE=/ && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, foo' "$TRASH_DIRECTORY/.git" "/" "foo/"
 test_foobar_foo
 
 test_expect_success 'go to /foo/bar' 'cd /foo/bar'
 
-export GIT_DIR="../../$TRASH_DIRECTORY/.git"
-export GIT_WORK_TREE=/
+GIT_DIR="../../$TRASH_DIRECTORY/.git" && export GIT_DIR
+GIT_WORK_TREE=/ && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, foo/bar' "$TRASH_DIRECTORY/.git" "/" "foo/bar/"
 test_foobar_foobar
@@ -180,24 +180,24 @@ say "GIT_DIR relative, GIT_WORK_TREE relative"
 
 test_expect_success 'go to /' 'cd /'
 
-export GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git"
-export GIT_WORK_TREE=.
+GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git" && export GIT_DIR
+GIT_WORK_TREE=. && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, root' "$GIT_DIR" "/" ""
 test_foobar_root
 
 test_expect_success 'go to /' 'cd /foo'
 
-export GIT_DIR="../$TRASH_DIRECTORY/.git"
-export GIT_WORK_TREE=..
+GIT_DIR="../$TRASH_DIRECTORY/.git" && export GIT_DIR
+GIT_WORK_TREE=.. && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, foo' "$TRASH_DIRECTORY/.git" "/" "foo/"
 test_foobar_foo
 
 test_expect_success 'go to /foo/bar' 'cd /foo/bar'
 
-export GIT_DIR="../../$TRASH_DIRECTORY/.git"
-export GIT_WORK_TREE=../..
+GIT_DIR="../../$TRASH_DIRECTORY/.git" && export GIT_DIR
+GIT_WORK_TREE=../.. && export GIT_WORK_TREE
 
 test_vars 'rel gitdir, foo/bar' "$TRASH_DIRECTORY/.git" "/" "foo/bar/"
 test_foobar_foobar
index a7d8187169a36f708bd7dc39d97604dd9cc21565..ca01053bcc88806aae9abde5892b8c163b3936d0 100755 (executable)
@@ -26,4 +26,3 @@ test_expect_success \
     'git ls-files --error-unmatch foo bar'
 
 test_done
-1
index 2bea65634a1790ceecf824309c1fbb66250f58d5..be8c1d5ef9fd650c128a9fe7126cbcd8db6c5a95 100755 (executable)
@@ -117,4 +117,25 @@ test_expect_success 'picking rebase' '
        esac
 '
 
+test_expect_success 'rebase -s funny -Xopt' '
+       test_when_finished "rm -fr test-bin funny.was.run" &&
+       mkdir test-bin &&
+       cat >test-bin/git-merge-funny <<-EOF &&
+       #!$SHELL_PATH
+       case "\$1" in --opt) ;; *) exit 2 ;; esac
+       shift &&
+       >funny.was.run &&
+       exec git merge-recursive "\$@"
+       EOF
+       chmod +x test-bin/git-merge-funny &&
+       git reset --hard &&
+       git checkout -b test-funny master^ &&
+       test_commit funny &&
+       (
+               PATH=./test-bin:$PATH
+               git rebase -s funny -Xopt master
+       ) &&
+       test -f funny.was.run
+'
+
 test_done
index 37cb89ab53055099db3d5f774d00ade1c4da6c69..fd2184ce7159122ae8d1d65f5a228a7b91c5e02a 100755 (executable)
@@ -26,7 +26,7 @@ test_auto_fixup() {
        echo 1 >file1 &&
        git add -u &&
        test_tick &&
-       git commit -m "fixup! first"
+       git commit -m "fixup! first" &&
 
        git tag $1 &&
        test_tick &&
@@ -55,7 +55,7 @@ test_auto_squash() {
        echo 1 >file1 &&
        git add -u &&
        test_tick &&
-       git commit -m "squash! first"
+       git commit -m "squash! first" &&
 
        git tag $1 &&
        test_tick &&
@@ -84,7 +84,7 @@ test_expect_success 'misspelled auto squash' '
        echo 1 >file1 &&
        git add -u &&
        test_tick &&
-       git commit -m "squash! forst"
+       git commit -m "squash! forst" &&
        git tag final-missquash &&
        test_tick &&
        git rebase --autosquash -i HEAD^^^ &&
index 9ed2396e29fb6f573f32e12c1dd4182086d60b04..903a122efe0c54cb44eb6c3e7ed04bdbab81439d 100755 (executable)
@@ -545,4 +545,15 @@ test_expect_success 'invalid ref of the form stash@{n}, n >= N' '
        git stash drop
 '
 
+test_expect_success 'stash branch should not drop the stash if the branch exists' '
+       git stash clear &&
+       echo foo >file &&
+       git add file &&
+       git commit -m initial &&
+       echo bar >file &&
+       git stash &&
+       test_must_fail git stash branch master stash@{0} &&
+       git rev-parse stash@{0} --
+'
+
 test_done
index 44885b850c4a1c3a09b8b078a643cf7cd8918213..94f9d2e8e0790c22b9884cee4b668b8a6d408d99 100755 (executable)
@@ -14,7 +14,7 @@ run_backend() {
 }
 
 GET() {
-       export REQUEST_METHOD="GET" &&
+       REQUEST_METHOD="GET" && export REQUEST_METHOD &&
        run_backend "/repo.git/$1" &&
        unset REQUEST_METHOD &&
        if ! grep "Status" act.out >act
@@ -26,8 +26,8 @@ GET() {
 }
 
 POST() {
-       export REQUEST_METHOD="POST" &&
-       export CONTENT_TYPE="application/x-$1-request" &&
+       REQUEST_METHOD="POST" && export REQUEST_METHOD &&
+       CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE &&
        run_backend "/repo.git/$1" "$2" &&
        unset REQUEST_METHOD &&
        unset CONTENT_TYPE &&
@@ -46,7 +46,7 @@ log_div() {
 . "$TEST_DIRECTORY"/t556x_common
 
 expect_aliased() {
-       export REQUEST_METHOD="GET" &&
+       REQUEST_METHOD="GET" && export REQUEST_METHOD &&
        if test $1 = 0; then
                run_backend "$2"
        else
index be024e551c977355d8611c2134a4eda97a2bcc7d..51287d89d8deb27ae2ae49fec84268422377eb29 100755 (executable)
@@ -50,7 +50,7 @@ get_static_files() {
 }
 
 SMART=smart
-export GIT_HTTP_EXPORT_ALL=1
+GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL
 test_expect_success 'direct refs/heads/master not found' '
        log_div "refs/heads/master"
        GET refs/heads/master "404 Not Found"
@@ -73,7 +73,7 @@ test_expect_success 'export if git-daemon-export-ok' '
         get_static_files "200 OK"
 '
 SMART=smart
-export GIT_HTTP_EXPORT_ALL=1
+GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL
 test_expect_success 'static file if http.getanyfile true is ok' '
        log_div "getanyfile true"
        config http.getanyfile true &&
index c907523e7e04542c6aada74f9b355ebcbae8c562..95b180f4693658504fa44d8199efc2a31e85b43d 100755 (executable)
@@ -205,9 +205,16 @@ test_expect_success 'fetch branch with replacement' '
      git branch tofetch $HASH6 &&
      (
          cd clone_dir &&
-         git fetch origin refs/heads/tofetch:refs/heads/parallel3
-         git log --pretty=oneline parallel3 | grep $PARA3
-         git show $PARA3 | grep "A U Thor"
+         git fetch origin refs/heads/tofetch:refs/heads/parallel3 &&
+         git log --pretty=oneline parallel3 > output.txt &&
+         ! grep $PARA3 output.txt &&
+         git show $PARA3 > para3.txt &&
+         grep "A U Thor" para3.txt &&
+         git fetch origin "refs/replace/*:refs/replace/*" &&
+         git log --pretty=oneline parallel3 > output.txt &&
+         grep $PARA3 output.txt &&
+         git show $PARA3 > para3.txt &&
+         grep "O Thor" para3.txt
      )
 '
 
index 71b3df9b55d7009def5ea11ff519cae4f28dea6d..a298eb04373f622473e3d33c9a46c6734f8a8fc8 100755 (executable)
@@ -279,7 +279,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
                --to=nobody@example.com \
                --in-reply-to=" " \
                --smtp-server="$(pwd)/fake.sendmail" \
-               $patches
+               $patches \
                2>errors
        ! grep "^In-Reply-To: < *>" msgtxt1
 '
@@ -1032,4 +1032,40 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '
        test_cmp expected actual
 '
 
+# Note that the patches in this test are deliberately out of order; we
+# want to make sure it works even if the cover-letter is not in the
+# first mail.
+test_expect_success 'refusing to send cover letter template' '
+       clean_fake_sendmail &&
+       rm -fr outdir &&
+       git format-patch --cover-letter -2 -o outdir &&
+       test_must_fail git send-email \
+         --from="Example <nobody@example.com>" \
+         --to=nobody@example.com \
+         --smtp-server="$(pwd)/fake.sendmail" \
+         outdir/0002-*.patch \
+         outdir/0000-*.patch \
+         outdir/0001-*.patch \
+         2>errors >out &&
+       grep "SUBJECT HERE" errors &&
+       test -z "$(ls msgtxt*)"
+'
+
+test_expect_success '--force sends cover letter template anyway' '
+       clean_fake_sendmail &&
+       rm -fr outdir &&
+       git format-patch --cover-letter -2 -o outdir &&
+       git send-email \
+         --force \
+         --from="Example <nobody@example.com>" \
+         --to=nobody@example.com \
+         --smtp-server="$(pwd)/fake.sendmail" \
+         outdir/0002-*.patch \
+         outdir/0000-*.patch \
+         outdir/0001-*.patch \
+         2>errors >out &&
+       ! grep "SUBJECT HERE" errors &&
+       test -n "$(ls msgtxt*)"
+'
+
 test_done
index 2f458f7a999a69c623052898726567b9d7ce67c9..b041516a1d6316dd36657b582c15100c0a7359d0 100755 (executable)
@@ -143,7 +143,7 @@ test_expect_success "$name" '
        git svn set-tree --find-copies-harder --rmdir \
                ${remotes_git_svn}..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
-       test -L "$SVN_TREE"/exec.sh'
+       test -h "$SVN_TREE"/exec.sh'
 
 name='new symlink is added to a file that was also just made executable'
 
@@ -156,7 +156,7 @@ test_expect_success "$name" '
                ${remotes_git_svn}..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -x "$SVN_TREE"/bar/zzz &&
-       test -L "$SVN_TREE"/exec-2.sh'
+       test -h "$SVN_TREE"/exec-2.sh'
 
 name='modify a symlink to become a file'
 test_expect_success "$name" '
@@ -169,7 +169,7 @@ test_expect_success "$name" '
                ${remotes_git_svn}..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -f "$SVN_TREE"/exec-2.sh &&
-       test ! -L "$SVN_TREE"/exec-2.sh &&
+       test ! -h "$SVN_TREE"/exec-2.sh &&
        test_cmp help "$SVN_TREE"/exec-2.sh'
 
 name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
index 9a24a65b64111b4540db28315fedd4efd3b19ae7..f762038f0ea95ce0f9d411ff6f494088ee1fc22c 100755 (executable)
@@ -88,7 +88,7 @@ test_expect_success 'enable broken symlink workaround' \
 test_expect_success '"bar" is an empty file' 'test -f x/bar && ! test -s x/bar'
 test_expect_success 'get "bar" => symlink fix from svn' \
                '(cd x && git svn rebase)'
-test_expect_success SYMLINKS '"bar" becomes a symlink' 'test -L x/bar'
+test_expect_success SYMLINKS '"bar" becomes a symlink' 'test -h x/bar'
 
 
 test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" y'
diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh
new file mode 100644 (file)
index 0000000..da582c5
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Steven Walter
+#
+
+test_description='git svn merge detection'
+. ./lib-git-svn.sh
+
+test_expect_success 'initialize source svn repo' '
+       svn_cmd mkdir -m x "$svnrepo"/trunk &&
+       svn_cmd mkdir -m x "$svnrepo"/branches &&
+       svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
+       (
+               cd "$SVN_TREE" &&
+               touch foo &&
+               svn add foo &&
+               svn commit -m "initial commit" &&
+               svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch1 &&
+               touch bar &&
+               svn add bar &&
+               svn commit -m x &&
+               svn cp -m branch "$svnrepo"/trunk "$svnrepo"/branches/branch2 &&
+               svn switch "$svnrepo"/branches/branch1 &&
+               touch baz &&
+               svn add baz &&
+               svn commit -m x &&
+               svn switch "$svnrepo"/trunk &&
+               svn merge "$svnrepo"/branches/branch1 &&
+               svn commit -m "merge" &&
+               svn switch "$svnrepo"/branches/branch1 &&
+               svn commit -m x &&
+               svn switch "$svnrepo"/branches/branch2 &&
+               svn merge "$svnrepo"/branches/branch1 &&
+               svn commit -m "merge branch1" &&
+               svn switch "$svnrepo"/trunk &&
+               svn merge "$svnrepo"/branches/branch2 &&
+               svn resolved baz &&
+               svn commit -m "merge branch2"
+       ) &&
+       rm -rf "$SVN_TREE"
+'
+
+test_expect_success 'clone svn repo' '
+       git svn init -s "$svnrepo" &&
+       git svn fetch
+'
+
+test_expect_success 'verify merge commit' 'git rev-parse HEAD^2'
+
+test_done
index 92f9530c6572a212c12ac917d774736286325e52..f05e4229d0d3a3ed34b4bba6636f4d333c74dc22 100644 (file)
@@ -11,7 +11,7 @@
 #include "list-objects.h"
 #include "run-command.h"
 
-static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=nn] <dir>";
+static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=<n>] <dir>";
 
 /* bits #0..7 in revision.h, #8..10 in commit.c */
 #define THEY_HAVE      (1u << 11)
index 54b6b03b9cc4e168e6b6429679b61dc2a1d5197b..fc2438f60b0e0e87772db2a9f3e407f351bb03d0 100644 (file)
@@ -390,11 +390,9 @@ static void wt_status_collect_untracked(struct wt_status *s)
        fill_directory(&dir, s->pathspec);
        for (i = 0; i < dir.nr; i++) {
                struct dir_entry *ent = dir.entries[i];
-               if (!cache_name_is_other(ent->name, ent->len))
-                       continue;
-               if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
-                       continue;
-               string_list_insert(&s->untracked, ent->name);
+               if (cache_name_is_other(ent->name, ent->len) &&
+                   match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
+                       string_list_insert(&s->untracked, ent->name);
                free(ent);
        }
 
@@ -404,11 +402,9 @@ static void wt_status_collect_untracked(struct wt_status *s)
                fill_directory(&dir, s->pathspec);
                for (i = 0; i < dir.nr; i++) {
                        struct dir_entry *ent = dir.entries[i];
-                       if (!cache_name_is_other(ent->name, ent->len))
-                               continue;
-                       if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
-                               continue;
-                       string_list_insert(&s->ignored, ent->name);
+                       if (cache_name_is_other(ent->name, ent->len) &&
+                           match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
+                               string_list_insert(&s->ignored, ent->name);
                        free(ent);
                }
        }
index 8ef232cfad12d706aaafe705bf16c546f3597182..165a895a93e04b33ca7c8f3839ee85e0eccb4a07 100644 (file)
@@ -30,6 +30,7 @@
 #define XDL_MAX(a, b) ((a) > (b) ? (a): (b))
 #define XDL_ABS(v) ((v) >= 0 ? (v): -(v))
 #define XDL_ISDIGIT(c) ((c) >= '0' && (c) <= '9')
+#define XDL_ISSPACE(c) (isspace((unsigned char)(c)))
 #define XDL_ADDBITS(v,b)       ((v) + ((v) >> (b)))
 #define XDL_MASKBITS(b)                ((1UL << (b)) - 1)
 #define XDL_HASHLONG(v,b)      (XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))
index 6d6fc1bc5e01be7305ec5101f43645a1dce69bd3..9e13b25abc90350de4488276074dc282edc216b1 100644 (file)
@@ -336,7 +336,7 @@ static int xdl_refine_conflicts(xdfenv_t *xe1, xdfenv_t *xe2, xdmerge_t *m,
 static int line_contains_alnum(const char *ptr, long size)
 {
        while (size--)
-               if (isalnum(*(ptr++)))
+               if (isalnum((unsigned char)*(ptr++)))
                        return 1;
        return 0;
 }
index 22f9bd692c2706136b4938bbcb2e0fc3dab212b8..ab6503460f760356a393a3c7b3b8438213e1ee94 100644 (file)
@@ -211,18 +211,18 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
                        if (l1[i1++] != l2[i2++])
                                return 0;
                skip_ws:
-                       while (i1 < s1 && isspace(l1[i1]))
+                       while (i1 < s1 && XDL_ISSPACE(l1[i1]))
                                i1++;
-                       while (i2 < s2 && isspace(l2[i2]))
+                       while (i2 < s2 && XDL_ISSPACE(l2[i2]))
                                i2++;
                }
        } else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
                while (i1 < s1 && i2 < s2) {
-                       if (isspace(l1[i1]) && isspace(l2[i2])) {
+                       if (XDL_ISSPACE(l1[i1]) && XDL_ISSPACE(l2[i2])) {
                                /* Skip matching spaces and try again */
-                               while (i1 < s1 && isspace(l1[i1]))
+                               while (i1 < s1 && XDL_ISSPACE(l1[i1]))
                                        i1++;
-                               while (i2 < s2 && isspace(l2[i2]))
+                               while (i2 < s2 && XDL_ISSPACE(l2[i2]))
                                        i2++;
                                continue;
                        }
@@ -241,13 +241,13 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
         * while there still are characters remaining on both lines.
         */
        if (i1 < s1) {
-               while (i1 < s1 && isspace(l1[i1]))
+               while (i1 < s1 && XDL_ISSPACE(l1[i1]))
                        i1++;
                if (s1 != i1)
                        return 0;
        }
        if (i2 < s2) {
-               while (i2 < s2 && isspace(l2[i2]))
+               while (i2 < s2 && XDL_ISSPACE(l2[i2]))
                        i2++;
                return (s2 == i2);
        }
@@ -260,10 +260,10 @@ static unsigned long xdl_hash_record_with_whitespace(char const **data,
        char const *ptr = *data;
 
        for (; ptr < top && *ptr != '\n'; ptr++) {
-               if (isspace(*ptr)) {
+               if (XDL_ISSPACE(*ptr)) {
                        const char *ptr2 = ptr;
                        int at_eol;
-                       while (ptr + 1 < top && isspace(ptr[1])
+                       while (ptr + 1 < top && XDL_ISSPACE(ptr[1])
                                        && ptr[1] != '\n')
                                ptr++;
                        at_eol = (top <= ptr + 1 || ptr[1] == '\n');