]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'rs/archive-parse-options'
authorJunio C Hamano <gitster@pobox.com>
Wed, 6 Aug 2008 20:31:38 +0000 (13:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Aug 2008 20:31:38 +0000 (13:31 -0700)
* rs/archive-parse-options:
  archive: allow --exec and --remote without equal sign

78 files changed:
Documentation/RelNotes-1.5.2.txt
Documentation/RelNotes-1.5.3.txt
Documentation/RelNotes-1.5.4.4.txt
Documentation/RelNotes-1.5.4.5.txt
Documentation/RelNotes-1.5.6.5.txt [new file with mode: 0644]
Documentation/RelNotes-1.6.0.txt
Documentation/config.txt
Documentation/git-cat-file.txt
Documentation/git-clean.txt
Documentation/git-clone.txt
Documentation/git-describe.txt
Documentation/git-fast-export.txt
Documentation/git-filter-branch.txt
Documentation/git-for-each-ref.txt
Documentation/git-log.txt
Documentation/git-merge.txt
Documentation/git-mergetool.txt
Documentation/git-name-rev.txt
Documentation/git-push.txt
Documentation/git-rev-parse.txt
Documentation/git-send-email.txt
Documentation/git-show-ref.txt
Documentation/git-show.txt
Documentation/git-submodule.txt
Documentation/git-svn.txt
Documentation/git-verify-tag.txt
Documentation/git.txt
Documentation/gitk.txt
Documentation/merge-config.txt
Documentation/user-manual.txt
INSTALL
builtin-blame.c
builtin-clone.c
builtin-commit.c
builtin-fast-export.c
builtin-fsck.c
builtin-ls-tree.c
builtin-merge.c
builtin-name-rev.c
builtin-prune.c
builtin-remote.c
builtin-revert.c
compat/mingw.h
contrib/completion/git-completion.bash
contrib/examples/git-commit.sh
contrib/examples/git-tag.sh
diff.c
git-am.sh
git-cvsimport.perl
git-gui/Makefile
git-gui/git-gui.sh
git-gui/lib/diff.tcl
git-gui/windows/git-gui.sh
git-stash.sh
git-svn.perl
ident.c
log-tree.c
perl/Git.pm
read-cache.c
revision.c
run-command.c
sha1_file.c
t/t0040-parse-options.sh
t/t4013/diff.format-patch_--attach_--stdout_initial..master
t/t4013/diff.format-patch_--attach_--stdout_initial..master^
t/t4013/diff.format-patch_--attach_--stdout_initial..side
t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
t/t4013/diff.format-patch_--inline_--stdout_initial..master
t/t4013/diff.format-patch_--inline_--stdout_initial..master^
t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
t/t4013/diff.format-patch_--inline_--stdout_initial..side
t/t5601-clone.sh
t/t7502-commit.sh
t/t9113-git-svn-dcommit-new-file.sh
t/t9119-git-svn-info.sh
t/t9301-fast-export.sh
test-parse-options.c
var.c

index 6195715dc78a26ce9ac452bd64852455fb79137c..e8328d090a438e496ff2e6a2026f633d77f589b5 100644 (file)
@@ -36,7 +36,7 @@ Updates since v1.5.1
   expansion).  These conversions apply when checking files in
   or out, and exporting via git-archive.
 
-* The packfile format now optionally suports 64-bit index.
+* The packfile format now optionally supports 64-bit index.
 
   This release supports the "version 2" format of the .idx
   file.  This is automatically enabled when a huge packfile
index d03894b92645f2dd0d7cb464d3ab1905d8cb62ed..0668d3c0cadc8e252ae07e0f873f603fafa02c27 100644 (file)
@@ -86,7 +86,7 @@ Updates since v1.5.2
 
   - "git rev-list" learned --regexp-ignore-case and
     --extended-regexp options to tweak its matching logic used
-    for --grep fitering.
+    for --grep filtering.
 
   - "git describe --contains" is a handier way to call more
     obscure command "git name-rev --tags".
@@ -243,7 +243,7 @@ Updates since v1.5.2
 
   - We used to have core.legacyheaders configuration, when
     set to false, allowed git to write loose objects in a format
-    that mimicks the format used by objects stored in packs.  It
+    that mimics the format used by objects stored in packs.  It
     turns out that this was not so useful.  Although we will
     continue to read objects written in that format, we do not
     honor that configuration anymore and create loose objects in
@@ -302,7 +302,7 @@ Updates since v1.5.2
     small enough delta results it creates while looking for the
     best delta candidates.
 
-  - "git pack-objects" learned a new heuristcs to prefer delta
+  - "git pack-objects" learned a new heuristic to prefer delta
     that is shallower in depth over the smallest delta
     possible.  This improves both overall packfile access
     performance and packfile density.
index 89fa6d03bc038d6210e94d7fe9fbbffdbc84d883..323c1a88c7fe2be146d2ae7682de6f723acd6fa8 100644 (file)
@@ -55,7 +55,7 @@ Fixes since v1.5.4.3
 
  * "git log --merge" did not work well with --left-right option.
 
- * "git svn" promprted for client cert password every time it accessed the
+ * "git svn" prompted for client cert password every time it accessed the
    server.
 
  * The reset command in "git fast-import" data stream was documented to
index 02823413987d5a10364d936327e3a1cfb38cbac2..bbd130e36d411e70f7c3b3b4fcfe531d383e9f0e 100644 (file)
@@ -9,7 +9,7 @@ Fixes since v1.5.4.4
    1.5.4).
 
  * Bogus refspec configuration such as "remote.there.fetch = =" were not
-   detected as errors (regressionin 1.5.4).
+   detected as errors (regression in 1.5.4).
 
  * You couldn't specify a custom editor whose path contains a whitespace
    via GIT_EDITOR (and core.editor).
diff --git a/Documentation/RelNotes-1.5.6.5.txt b/Documentation/RelNotes-1.5.6.5.txt
new file mode 100644 (file)
index 0000000..23981ac
--- /dev/null
@@ -0,0 +1,32 @@
+GIT v1.5.6.5 Release Notes
+==========================
+
+Fixes since v1.5.6.4
+--------------------
+
+* "git cvsimport" used to spit out "UNKNOWN LINE..." diagnostics to stdout.
+
+* "git init --template=" with blank "template" parameter linked files
+  under root directories to .git, which was a total nonsense.  Instead, it
+  means "I do not want to use anything from the template directory".
+
+* "git diff-tree" and other diff plumbing ignored diff.renamelimit configuration
+  variable when the user explicitly asked for rename detection.
+
+* "git name-rev --name-only" did not work when "--stdin" option was in effect.
+
+* "git show-branch" mishandled its 8th branch.
+
+* Addition of "git update-index --ignore-submodules" that happened during
+  1.5.6 cycle broke "git update-index --ignore-missing".
+
+* "git send-email" did not parse charset from an existing Content-type:
+  header properly.
+
+Contains other various documentation fixes.
+
+--
+exec >/var/tmp/1
+echo O=$(git describe maint)
+O=v1.5.6.4-26-g2b6ca6d
+git shortlog --no-merges $O..maint
index 2542cf53d2e40b06afe918fcf1cd35de19126d9e..614a3be9457cea4e07870ac08f8305c2254e3610 100644 (file)
@@ -187,7 +187,7 @@ Updates since v1.5.6
   command internally uses rev-parse to interpret its arguments.
 
 * git-rev-list learned --children option to show child commits it
-  encountered during the traversal, instead of shoing parent commits.
+  encountered during the traversal, instead of showing parent commits.
 
 * git-send-mail can talk not just over SSL but over TLS now.
 
index 61c376057c0f2b9510bf6f1b2beb42f9859b7f46..b8ec01c923a8bdb8614f5c5700a7fda603365e8b 100644 (file)
@@ -693,7 +693,7 @@ gitcvs.usecrlfattr
        files to determine the '-k' modes to use. If `crlf` is set,
        the '-k' mode will be left blank, so cvs clients will
        treat it as text. If `crlf` is explicitly unset, the file
-       will be set with '-kb' mode, which supresses any newline munging
+       will be set with '-kb' mode, which suppresses any newline munging
        the client might otherwise do. If `crlf` is not specified,
        then 'gitcvs.allbinary' is used. See linkgit:gitattributes[5].
 
index d35e8a04fe28b095b5405ae2e0b09e3ab448bf63..668f697c2a03c29f589e249de832ddf01b9b1e6d 100644 (file)
@@ -81,7 +81,7 @@ object specified on stdin:
 ------------
 
 If '--batch-check' is specified, output of the following form is printed for
-each object specified fon stdin:
+each object specified on stdin:
 
 ------------
 <sha1> SP <type> SP <size> LF
index 7dcc1ba58c3879cb14ce243a4af00bca9e850799..8a114509f4a19b4fa6c6d8de8afdc94938d24b82 100644 (file)
@@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree
 SYNOPSIS
 --------
 [verse]
-'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...
+'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <path>...
 
 DESCRIPTION
 -----------
@@ -16,8 +16,8 @@ Removes files unknown to git.  This allows to clean the working tree
 from files that are not under version control.  If the '-x' option is
 specified, ignored files are also removed, allowing to remove all
 build products.
-When optional `<paths>...` arguments are given, the paths
-affected are further limited to those that match them.
+If any optional `<path>...` arguments are given, only those paths
+are affected.
 
 
 OPTIONS
index 26fd1b111798461b9150f1416721aa460f1ea525..0e14e732fd470b7f48882c9959235785df19b7b0 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git clone' [--template=<template_directory>]
-         [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare]
+         [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-u <upload-pack>] [--reference <repository>]
          [--depth <depth>] [--] <repository> [<directory>]
 
@@ -106,6 +106,9 @@ then the cloned repository will become corrupt.
        used, neither remote-tracking branches nor the related
        configuration variables are created.
 
+--mirror::
+       Set up a mirror of the remote repository.  This implies --bare.
+
 --origin <name>::
 -o <name>::
        Instead of using the remote name 'origin' to keep track
index 7fdda04bae34790eb2345427dda746e8bf097c1a..c4dbc2ae342833561080f7a18a93bcf5ac5a0dd3 100644 (file)
@@ -21,8 +21,8 @@ abbreviated object name of the most recent commit.
 
 OPTIONS
 -------
-<committish>::
-       The object name of the committish.
+<committish>...::
+       Committish object names to describe.
 
 --all::
        Instead of using only the annotated tags, use any ref
index 4956964d857fd27d27fbff54de724623b79286db..b974e2115b01f17f0ac809b691baf2f4e4d32169 100644 (file)
@@ -36,6 +36,15 @@ when encountering a signed tag.  With 'strip', the tags will be made
 unsigned, with 'verbatim', they will be silently exported
 and with 'warn', they will be exported, but you will see a warning.
 
+-M::
+-C::
+       Perform move and/or copy detection, as described in the
+       linkgit:git-diff[1] manual page, and use it to generate
+       rename and copy commands in the output dump.
++
+Note that earlier versions of this command did not complain and
+produced incorrect results if you gave these options.
+
 --export-marks=<file>::
        Dumps the internal marks table to <file> when complete.
        Marks are written one per line as `:markid SHA-1`. Only marks
index 7ba9dab5e6c0b32f927d24de800e17b71a06b84b..a518ba6072127afce1b117a6c70022415979d079 100644 (file)
@@ -167,7 +167,7 @@ to other tags will be rewritten to point to the underlying commit.
        directory or when there are already refs starting with
        'refs/original/', unless forced.
 
-<rev-list-options>::
+<rev-list options>...::
        When options are given after the new branch name, they will
        be passed to 'git-rev-list'.  Only commits in the resulting
        output will be filtered, although the filtered commits can still
index 727d84e6735417baa82fe7abff5b6945f6d6cef4..eae6c0e7bcad5708442d10a7bc73eac3ec90bcbd 100644 (file)
@@ -47,9 +47,9 @@ OPTIONS
        `xx`; for example `%00` interpolates to `\0` (NUL),
        `%09` to `\t` (TAB) and `%0a` to `\n` (LF).
 
-<pattern>::
+<pattern>...::
        If one or more patterns are given, only refs are shown that
-       match againt at least one pattern, either using fnmatch(3) or
+       match against at least one pattern, either using fnmatch(3) or
        literally, in the latter case matching completely or from the
        beginning up to a slash.
 
index 05cbac56aced6ad27f36fe63f8f536e794794f9f..0446bad7e589c06c97bb9274e9edd4b343ef9e55 100644 (file)
@@ -41,10 +41,10 @@ include::diff-options.txt[]
        Print out the ref names of any commits that are shown.
 
 --full-diff::
-       Without this flag, "git log -p <paths>..." shows commits that
+       Without this flag, "git log -p <path>..." shows commits that
        touch the specified paths, and diffs about the same specified
        paths.  With this, the full diff is shown for commits that touch
-       the specified paths; this means that "<paths>..." limits only
+       the specified paths; this means that "<path>..." limits only
        commits, and doesn't limit diff for those commits.
 
 --follow::
@@ -57,7 +57,7 @@ include::diff-options.txt[]
        Note that only message is considered, if also a diff is shown
        its size is not included.
 
-<paths>...::
+<path>...::
        Show only commits that affect any of the specified paths.
 
 
index 2db88809898592c691166427efdd106d844d42d9..17a15acb07df2d8beed4a41cdcf820010f95b35b 100644 (file)
@@ -32,8 +32,8 @@ include::merge-options.txt[]
        it is created). The 'git-fmt-merge-msg' script can be used
        to give a good default for automated 'git-merge' invocations.
 
-<remote>::
-       Other branch head merged into our branch.  You need at
+<remote>...::
+       Other branch heads to merge into our branch.  You need at
        least one <remote>.  Specifying more than one <remote>
        obviously means you are trying an Octopus.
 
index 31570b1e27af6a603df98868c627da08d91c17cc..e0b2703b380cb46b23870a97b861462d8e8f758a 100644 (file)
@@ -40,7 +40,7 @@ tool is available in PATH.
 +
 Instead of running one of the known merge tool programs
 'git-mergetool' can be customized to run an alternative program
-by specifying the command line to invoke in a configration
+by specifying the command line to invoke in a configuration
 variable `mergetool.<tool>.cmd`.
 +
 When 'git-mergetool' is invoked with this tool (either through the
index 6e77ab135353aaf713b638a70701717db1706c2c..abd2237e51dfd86bcea98320edfff8922bc04eb6 100644 (file)
@@ -38,8 +38,7 @@ OPTIONS
        Instead of printing both the SHA-1 and the name, print only
        the name.  If given with --tags the usual tag prefix of
        "tags/" is also omitted from the name, matching the output
-       of 'git-describe' more closely.  This option
-       cannot be combined with --stdin.
+       of `git-describe` more closely.
 
 --no-undefined::
        Die with error code != 0 when a reference is undefined,
index 94d07ab8120d17d0667eeb8e420d4b2270ad7352..050c3ddae2732fdf4cb9f3b0f798e3d2d190fa4e 100644 (file)
@@ -10,7 +10,8 @@ SYNOPSIS
 --------
 [verse]
 'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]
-           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]
+          [--repo=all] [-f | --force] [-v | --verbose]
+          [<repository> <refspec>...]
 
 DESCRIPTION
 -----------
@@ -29,8 +30,8 @@ OPTIONS
        The "remote" repository that is destination of a push
        operation.  See the section <<URLS,GIT URLS>> below.
 
-<refspec>::
-       The canonical format of a <refspec> parameter is
+<refspec>...::
+       The canonical format of each <refspec> parameter is
        `+?<src>:<dst>`; that is, an optional plus `+`, followed
        by the source ref, followed by a colon `:`, followed by
        the destination ref.
@@ -180,11 +181,11 @@ git push origin :experimental::
        Find a ref that matches `experimental` in the `origin` repository
        (e.g. `refs/heads/experimental`), and delete it.
 
-git push origin master:satellite/master::
-       Find a ref that matches `master` in the source repository
-       (most likely, it would find `refs/heads/master`), and update
-       the ref that matches `satellite/master` (most likely, it would
-       be `refs/remotes/satellite/master`) in `origin` repository with it.
+git push origin master:satellite/master dev:satellite/dev::
+       Use the source ref that matches `master` (e.g. `refs/heads/master`)
+       to update the ref that matches `satellite/master` (most probably
+       `refs/remotes/satellite/master`) in the `origin` repository, then
+       do the same for `dev` and `satellite/dev`.
 
 git push origin master:refs/heads/experimental::
        Create the branch `experimental` in the `origin` repository
index 5c936693d30d0537c00433721e6893d7c48be2ee..2921da320d2b84df4d15ec2745e6d94093dd6907 100644 (file)
@@ -155,8 +155,9 @@ blobs contained in a commit.
   name the same commit object if there are no other object in
   your repository whose object name starts with dae86e.
 
-* An output from 'git-describe'; i.e. a closest tag, followed by a
-  dash, a `g`, and an abbreviated object name.
+* An output from 'git-describe'; i.e. a closest tag, optionally
+  followed by a dash and a number of commits, followed by a dash, a
+  `g`, and an abbreviated object name.
 
 * A symbolic ref name.  E.g. 'master' typically means the commit
   object referenced by $GIT_DIR/refs/heads/master.  If you
index afbb294a7faadc7ff6d4039246dc1c085575cd4f..e2437f30ca1314dc00a55f72c4e2a325cc75c7b6 100644 (file)
@@ -56,7 +56,7 @@ The --cc option must be repeated for each user you want on the cc list.
 
 --from::
        Specify the sender of the emails.  This will default to
-       the value GIT_COMMITTER_IDENT, as returned by "git-var -l".
+       the value GIT_COMMITTER_IDENT, as returned by "git var -l".
        The user will still be prompted to confirm this entry.
 
 --in-reply-to::
index 9a4389981ca067633d773e28393a1d72ac6552ae..2f173fff356282df7c906da6edeac1fcd4430025 100644 (file)
@@ -84,7 +84,7 @@ OPTIONS
        (5) otherwise output the line.
 
 
-<pattern>::
+<pattern>...::
 
        Show references matching one or more patterns.
 
index 1642cfd8236a5b57420f67da580b42066afaa4f6..48b612e2ae50c319bcef567c7619f60396dd8408 100644 (file)
@@ -33,8 +33,8 @@ This manual page describes only the most frequently used options.
 
 OPTIONS
 -------
-<object>::
-       The name of the object to show.
+<object>...::
+       The names of objects to show.
        For a more complete list of ways to spell object names, see
        "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
index 35efeefb3056ac69cf02689dc338956340e9efc9..bf33b0cba05e8858e28275661c731aae6c8372ee 100644 (file)
@@ -146,8 +146,8 @@ OPTIONS
        (the default). This limit only applies to modified submodules. The
        size is always limited to 1 for added/deleted/typechanged submodules.
 
-<path>::
-       Path to submodule(s). When specified this will restrict the command
+<path>...::
+       Paths to submodule(s). When specified this will restrict the command
        to only operate on the submodules found at the specified paths.
        (This argument is required with add).
 
index e7c0f1c959d39739e177096875dd8aac5fd185d9..773ae9654b71304b969d421607b77819c95d4cca 100644 (file)
@@ -12,18 +12,18 @@ SYNOPSIS
 DESCRIPTION
 -----------
 'git-svn' is a simple conduit for changesets between Subversion and git.
-It is not to be confused with linkgit:git-svnimport[1], which is
-read-only.
+It provides a bidirectional flow of changes between a Subversion and a git
+repository.
 
-'git-svn' was originally designed for an individual developer who wants a
-bidirectional flow of changesets between a single branch in Subversion
-and an arbitrary number of branches in git.  Since its inception,
-'git-svn' has gained the ability to track multiple branches in a manner
-similar to 'git-svnimport'.
+'git-svn' can track a single Subversion branch simply by using a
+URL to the branch, follow branches laid out in the Subversion recommended
+method (trunk, branches, tags directories) with the --stdlayout option, or
+follow branches in any layout with the -T/-t/-b options (see options to
+'init' below, and also the 'clone' command).
 
-'git-svn' is especially useful when it comes to tracking repositories
-not organized in the way Subversion developers recommend (trunk,
-branches, tags directories).
+Once tracking a Subversion branch (with any of the above methods), the git
+repository can be updated from Subversion by the 'fetch' command and
+Subversion updated from git by the 'dcommit' command.
 
 COMMANDS
 --------
@@ -209,7 +209,7 @@ Any other arguments are passed directly to 'git-log'
        Recursively finds the svn:ignore property on directories and
        creates matching .gitignore files. The resulting files are staged to
        be committed, but are not committed. Use -r/--revision to refer to a
-       specfic revision.
+       specific revision.
 
 'show-ignore'::
        Recursively finds and lists the svn:ignore property on
@@ -218,8 +218,7 @@ Any other arguments are passed directly to 'git-log'
 
 'commit-diff'::
        Commits the diff of two tree-ish arguments from the
-       command-line.  This command is intended for interoperability with
-       'git-svnimport' and does not rely on being inside an `git-svn
+       command-line.  This command does not rely on being inside an `git-svn
        init`-ed repository.  This command takes three arguments, (a) the
        original tree to diff against, (b) the new tree result, (c) the
        URL of the target Subversion repository.  The final argument
@@ -317,8 +316,7 @@ config key: svn.findcopiesharder
 -A<filename>::
 --authors-file=<filename>::
 
-Syntax is compatible with the files used by 'git-svnimport' and
-'git-cvsimport':
+Syntax is compatible with the file used by 'git-cvsimport':
 
 ------------------------------------------------------------------------
        loginname = Joe User <user@example.com>
index ba837df4bc66e2b828fcd49c94f35957c27322df..84e70a02348105c98a004c080875ab8e85fe099c 100644 (file)
@@ -15,8 +15,8 @@ Validates the gpg signature created by 'git-tag'.
 
 OPTIONS
 -------
-<tag>::
-       SHA1 identifier of a git tag object.
+<tag>...::
+       SHA1 identifiers of git tag objects.
 
 Author
 ------
index 44ea35e949dbbc0e5785ba2831072059881058f8..3da5bf050c70b6b73ec72e192fa3fb5c1eb7641c 100644 (file)
@@ -602,7 +602,7 @@ contributors on the git-list <git@vger.kernel.org>.
 SEE ALSO
 --------
 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
-linkgit:everyday[7], linkgit:gitcvs-migration[7],
+link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual]
 
index e02ecf57444df14d61d82dcf2f9e0c3f6b990b91..6e827cd11c6d464e1369bf1ca23af0dd53b9be32 100644 (file)
@@ -58,7 +58,7 @@ frequently used options.
        For a more complete list of ways to spell object names, see
        "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
-<path>::
+<path>...::
 
        Limit commits to the ones touching files in the given paths. Note, to
        avoid ambiguity wrt. revision names use "--" to separate the paths
index 48ce747cf4dad592d642735856eb156e93d6cf30..00277e061313974a4f8fdb9333608902c7ef653f 100644 (file)
@@ -1,5 +1,5 @@
 merge.stat::
-       Whether to print the diffstat berween ORIG_HEAD and merge result
+       Whether to print the diffstat between ORIG_HEAD and merge result
        at the end of the merge.  True by default.
 
 merge.log::
@@ -16,7 +16,7 @@ merge.tool::
        linkgit:git-mergetool[1].  Valid built-in values are: "kdiff3",
        "tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", and
        "opendiff".  Any other value is treated is custom merge tool
-       and there must be a corresponing mergetool.<tool>.cmd option.
+       and there must be a corresponding mergetool.<tool>.cmd option.
 
 merge.verbosity::
        Controls the amount of output shown by the recursive merge
index c5641af19059f5531e43bd4d4ff495548030fe98..43f4e392fd01c14de3a1ed90af1de7795869d2b6 100644 (file)
@@ -479,10 +479,10 @@ Bisecting: 3537 revisions left to test after this
 -------------------------------------------------
 
 If you run "git branch" at this point, you'll see that git has
-temporarily moved you to a new branch named "bisect".  This branch
-points to a commit (with commit id 65934...) that is reachable from
-"master" but not from v2.6.18.  Compile and test it, and see whether
-it crashes.  Assume it does crash.  Then:
+temporarily moved you in "(no branch)". HEAD is now detached from any
+branch and points directly to a commit (with commit id 65934...) that
+is reachable from "master" but not from v2.6.18. Compile and test it,
+and see whether it crashes. Assume it does crash. Then:
 
 -------------------------------------------------
 $ git bisect bad
@@ -504,8 +504,7 @@ report with the commit id.  Finally, run
 $ git bisect reset
 -------------------------------------------------
 
-to return you to the branch you were on before and delete the
-temporary "bisect" branch.
+to return you to the branch you were on before.
 
 Note that the version which git-bisect checks out for you at each
 point is just a suggestion, and you're free to try a different
@@ -528,6 +527,22 @@ $ git reset --hard fb47ddb2db...
 then test, run "bisect good" or "bisect bad" as appropriate, and
 continue.
 
+Instead of "git bisect visualize" and then "git reset --hard
+fb47ddb2db...", you might just want to tell git that you want to skip
+the current commit:
+
+-------------------------------------------------
+$ git bisect skip
+-------------------------------------------------
+
+In this case, though, git may not eventually be able to tell the first
+bad one between some first skipped commits and a latter bad commit.
+
+There are also ways to automate the bisecting process if you have a
+test script that can tell a good from a bad commit. See
+linkgit:git-bisect[1] for more information about this and other "git
+bisect" features.
+
 [[naming-commits]]
 Naming commits
 --------------
@@ -3458,7 +3473,7 @@ $ cd super
 $ git init
 $ for i in a b c d
 do
-       git submodule add ~/git/$i
+       git submodule add ~/git/$i $i
 done
 -------------------------------------------------
 
@@ -3471,10 +3486,10 @@ $ ls -a
 .  ..  .git  .gitmodules  a  b  c  d
 -------------------------------------------------
 
-The `git-submodule add` command does a couple of things:
+The `git-submodule add <repo> <path>` command does a couple of things:
 
-- It clones the submodule under the current directory and by default checks out
-  the master branch.
+- It clones the submodule from <repo> to the given <path> under the
+  current directory and by default checks out the master branch.
 - It adds the submodule's clone path to the linkgit:gitmodules[5] file and
   adds this file to the index, ready to be committed.
 - It adds the submodule's current commit ID to the index, ready to be
diff --git a/INSTALL b/INSTALL
index 7d0c2c2f865d6ed969038e7543dbeb8933723ec3..2bae53fcbb990eded5626c2c47ebce8684d081cf 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -30,7 +30,7 @@ Issues of note:
    around 1997), it changed its name to gnuit and the name conflict is no
    longer a problem.
 
-   NOTE: When compiled with backward compatiblity option, the GNU
+   NOTE: When compiled with backward compatibility option, the GNU
    Interactive Tools package still can install "git", but you can build it
    with --disable-transition option to avoid this.
 
@@ -73,7 +73,7 @@ Issues of note:
        - "ssh" is used to push and pull over the net
 
        - "perl" and POSIX-compliant shells are needed to use most of
-         the barebone Porcelainish scripts.
+         the bare-bones Porcelainish scripts.
 
  - Some platform specific issues are dealt with Makefile rules,
    but depending on your specific installation, you may not
index 8b6b09b10b8f9dcda0b7224f31c860bb803945f0..4ea343189fdad035318e94ce0c6c2ec16b62ba7f 100644 (file)
@@ -2346,6 +2346,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 parse_done:
        argc = parse_options_end(&ctx);
 
+       if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
+               opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
+                       PICKAXE_BLAME_COPY_HARDER);
+
        if (!blame_move_score)
                blame_move_score = BLAME_DEFAULT_MOVE_SCORE;
        if (!blame_copy_score)
index e086a40b41810c30a4f5228daa4e38857dae84d5..8612d59dd22202bc8af3436bffcade2e2dba5fcf 100644 (file)
@@ -33,7 +33,7 @@ static const char * const builtin_clone_usage[] = {
        NULL
 };
 
-static int option_quiet, option_no_checkout, option_bare;
+static int option_quiet, option_no_checkout, option_bare, option_mirror;
 static int option_local, option_no_hardlinks, option_shared;
 static char *option_template, *option_reference, *option_depth;
 static char *option_origin = NULL;
@@ -45,6 +45,8 @@ static struct option builtin_clone_options[] = {
                    "don't create a checkout"),
        OPT_BOOLEAN(0, "bare", &option_bare, "create a bare repository"),
        OPT_BOOLEAN(0, "naked", &option_bare, "create a bare repository"),
+       OPT_BOOLEAN(0, "mirror", &option_mirror,
+                   "create a mirror repository (implies bare)"),
        OPT_BOOLEAN('l', "local", &option_local,
                    "to clone from a local repository"),
        OPT_BOOLEAN(0, "no-hardlinks", &option_no_hardlinks,
@@ -93,7 +95,7 @@ static char *get_repo_path(const char *repo, int *is_bundle)
        return NULL;
 }
 
-static char *guess_dir_name(const char *repo, int is_bundle)
+static char *guess_dir_name(const char *repo, int is_bundle, int is_bare)
 {
        const char *end = repo + strlen(repo), *start;
 
@@ -129,6 +131,12 @@ static char *guess_dir_name(const char *repo, int is_bundle)
                        end -= 4;
        }
 
+       if (is_bare) {
+               char *result = xmalloc(end - start + 5);
+               sprintf(result, "%.*s.git", (int)(end - start), start);
+               return result;
+       }
+
        return xstrndup(start, end - start);
 }
 
@@ -345,6 +353,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        char branch_top[256], key[256], value[256];
        struct strbuf reflog_msg;
        struct transport *transport = NULL;
+       char *src_ref_prefix = "refs/heads/";
 
        struct refspec refspec;
 
@@ -359,6 +368,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        if (option_no_hardlinks)
                use_local_hardlinks = 0;
 
+       if (option_mirror)
+               option_bare = 1;
+
        if (option_bare) {
                if (option_origin)
                        die("--bare and --origin %s options are incompatible.",
@@ -383,7 +395,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        if (argc == 2)
                dir = xstrdup(argv[1]);
        else
-               dir = guess_dir_name(repo_name, is_bundle);
+               dir = guess_dir_name(repo_name, is_bundle, option_bare);
 
        if (!stat(dir, &buf))
                die("destination directory '%s' already exists.", dir);
@@ -440,26 +452,36 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        git_config(git_default_config, NULL);
 
        if (option_bare) {
-               strcpy(branch_top, "refs/heads/");
+               if (option_mirror)
+                       src_ref_prefix = "refs/";
+               strcpy(branch_top, src_ref_prefix);
 
                git_config_set("core.bare", "true");
        } else {
                snprintf(branch_top, sizeof(branch_top),
                         "refs/remotes/%s/", option_origin);
+       }
 
+       if (option_mirror || !option_bare) {
                /* Configure the remote */
+               if (option_mirror) {
+                       snprintf(key, sizeof(key),
+                                       "remote.%s.mirror", option_origin);
+                       git_config_set(key, "true");
+               }
+
                snprintf(key, sizeof(key), "remote.%s.url", option_origin);
                git_config_set(key, repo);
 
                snprintf(key, sizeof(key), "remote.%s.fetch", option_origin);
                snprintf(value, sizeof(value),
-                               "+refs/heads/*:%s*", branch_top);
+                               "+%s*:%s*", src_ref_prefix, branch_top);
                git_config_set_multivar(key, value, "^$", 0);
        }
 
        refspec.force = 0;
        refspec.pattern = 1;
-       refspec.src = "refs/heads/";
+       refspec.src = src_ref_prefix;
        refspec.dst = branch_top;
 
        if (path && !is_bundle)
index 9a11ca0bcd402d9bd4488df6e3526e4a24617b30..b783e6eb46d2603d61d3260420c5dff48913d182 100644 (file)
@@ -554,13 +554,18 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
 
                fprintf(fp,
                        "\n"
-                       "# Please enter the commit message for your changes.\n"
-                       "# (Comment lines starting with '#' will ");
+                       "# Please enter the commit message for your changes.");
                if (cleanup_mode == CLEANUP_ALL)
-                       fprintf(fp, "not be included)\n");
+                       fprintf(fp,
+                               " Lines starting\n"
+                               "# with '#' will be ignored, and an empty"
+                               " message aborts the commit.\n");
                else /* CLEANUP_SPACE, that is. */
-                       fprintf(fp, "be kept.\n"
-                               "# You can remove them yourself if you want to)\n");
+                       fprintf(fp,
+                               " Lines starting\n"
+                               "# with '#' will be kept; you may remove them"
+                               " yourself if you want to.\n"
+                               "# An empty message aborts the commit.\n");
                if (only_include_assumed)
                        fprintf(fp, "# %s\n", only_include_assumed);
 
@@ -1003,7 +1008,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                stripspace(&sb, cleanup_mode == CLEANUP_ALL);
        if (sb.len < header_len || message_is_empty(&sb, header_len)) {
                rollback_index_files();
-               die("no commit message?  aborting commit.");
+               fprintf(stderr, "Aborting commit due to empty commit message.\n");
+               exit(1);
        }
        strbuf_addch(&sb, '\0');
        if (is_encoding_utf8(git_commit_encoding) && !is_utf8(sb.buf))
index e508ced6ba13954580632da50d789f221a132224..070971616dbb12d005c5c9a1f82cc5b0c5391f62 100644 (file)
@@ -132,10 +132,27 @@ static void show_filemodify(struct diff_queue_struct *q,
 {
        int i;
        for (i = 0; i < q->nr; i++) {
+               struct diff_filespec *ospec = q->queue[i]->one;
                struct diff_filespec *spec = q->queue[i]->two;
-               if (is_null_sha1(spec->sha1))
+
+               switch (q->queue[i]->status) {
+               case DIFF_STATUS_DELETED:
                        printf("D %s\n", spec->path);
-               else {
+                       break;
+
+               case DIFF_STATUS_COPIED:
+               case DIFF_STATUS_RENAMED:
+                       printf("%c \"%s\" \"%s\"\n", q->queue[i]->status,
+                              ospec->path, spec->path);
+
+                       if (!hashcmp(ospec->sha1, spec->sha1) &&
+                           ospec->mode == spec->mode)
+                               break;
+                       /* fallthrough */
+
+               case DIFF_STATUS_TYPE_CHANGED:
+               case DIFF_STATUS_MODIFIED:
+               case DIFF_STATUS_ADDED:
                        /*
                         * Links refer to objects in another repositories;
                         * output the SHA-1 verbatim.
@@ -148,6 +165,13 @@ static void show_filemodify(struct diff_queue_struct *q,
                                printf("M %06o :%d %s\n", spec->mode,
                                       get_object_mark(object), spec->path);
                        }
+                       break;
+
+               default:
+                       die("Unexpected comparison status '%c' for %s, %s",
+                               q->queue[i]->status,
+                               ospec->path ? ospec->path : "none",
+                               spec->path ? spec->path : "none");
                }
        }
 }
index 6eb7da88d3e8591a8c544acc61a42e00babff120..d3f3de9446a9184e9457fe4b743c4e43a9256597 100644 (file)
@@ -385,7 +385,7 @@ static void fsck_dir(int i, char *path)
                        add_sha1_list(sha1, DIRENT_SORT_HINT(de));
                        continue;
                }
-               if (prefixcmp(de->d_name, "tmp_obj_"))
+               if (!prefixcmp(de->d_name, "tmp_obj_"))
                        continue;
                fprintf(stderr, "bad sha1 file: %s/%s\n", path, de->d_name);
        }
index d25767a1f7eb0a8b45bc1eed6b9aa95de0847f18..cb61717685b09a2e409440206e27fce68831e04d 100644 (file)
@@ -66,17 +66,16 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
                /*
                 * Maybe we want to have some recursive version here?
                 *
-                * Something like:
+                * Something similar to this incomplete example:
                 *
                if (show_subprojects(base, baselen, pathname)) {
-                       if (fork()) {
-                               chdir(base);
-                               exec ls-tree;
-                       }
-                       waitpid();
+                       struct child_process ls_tree;
+
+                       ls_tree.dir = base;
+                       ls_tree.argv = ls-tree;
+                       start_command(&ls_tree);
                }
                 *
-                * ..or similar..
                 */
                type = commit_type;
        } else if (S_ISDIR(mode)) {
index e78fa18b3a68e2b7f041beab0524ce1a2b7e9365..dde0c7ed33118ff8d0cc421e8a0366e342c6d011 100644 (file)
@@ -396,12 +396,12 @@ static void merge_name(const char *remote, struct strbuf *msg)
                struct strbuf truname = STRBUF_INIT;
                strbuf_addstr(&truname, "refs/heads/");
                strbuf_addstr(&truname, remote);
-               strbuf_setlen(&truname, len+11);
+               strbuf_setlen(&truname, truname.len - len);
                if (resolve_ref(truname.buf, buf_sha, 0, 0)) {
                        strbuf_addf(msg,
                                    "%s\t\tbranch '%s'%s of .\n",
                                    sha1_to_hex(remote_head->sha1),
-                                   truname.buf,
+                                   truname.buf + 11,
                                    (early ? " (early part)" : ""));
                        return;
                }
index 85612c4dcb719b460623204046e35486e9d9fe97..08c8aabf9428447abad7def693d7b22c5330e180 100644 (file)
@@ -176,6 +176,48 @@ static char const * const name_rev_usage[] = {
        NULL
 };
 
+static void name_rev_line(char *p, struct name_ref_data *data)
+{
+       int forty = 0;
+       char *p_start;
+       for (p_start = p; *p; p++) {
+#define ishex(x) (isdigit((x)) || ((x) >= 'a' && (x) <= 'f'))
+               if (!ishex(*p))
+                       forty = 0;
+               else if (++forty == 40 &&
+                        !ishex(*(p+1))) {
+                       unsigned char sha1[40];
+                       const char *name = NULL;
+                       char c = *(p+1);
+                       int p_len = p - p_start + 1;
+
+                       forty = 0;
+
+                       *(p+1) = 0;
+                       if (!get_sha1(p - 39, sha1)) {
+                               struct object *o =
+                                       lookup_object(sha1);
+                               if (o)
+                                       name = get_rev_name(o);
+                       }
+                       *(p+1) = c;
+
+                       if (!name)
+                               continue;
+
+                       if (data->name_only)
+                               printf("%.*s%s", p_len - 40, p_start, name);
+                       else
+                               printf("%.*s (%s)", p_len, p_start, name);
+                       p_start = p + 1;
+               }
+       }
+
+       /* flush */
+       if (p_start != p)
+               fwrite(p_start, p - p_start, 1, stdout);
+}
+
 int cmd_name_rev(int argc, const char **argv, const char *prefix)
 {
        struct object_array revs = { 0, 0, NULL };
@@ -234,47 +276,12 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
 
        if (transform_stdin) {
                char buffer[2048];
-               char *p, *p_start;
 
                while (!feof(stdin)) {
-                       int forty = 0;
-                       p = fgets(buffer, sizeof(buffer), stdin);
+                       char *p = fgets(buffer, sizeof(buffer), stdin);
                        if (!p)
                                break;
-
-                       for (p_start = p; *p; p++) {
-#define ishex(x) (isdigit((x)) || ((x) >= 'a' && (x) <= 'f'))
-                               if (!ishex(*p))
-                                       forty = 0;
-                               else if (++forty == 40 &&
-                                               !ishex(*(p+1))) {
-                                       unsigned char sha1[40];
-                                       const char *name = NULL;
-                                       char c = *(p+1);
-
-                                       forty = 0;
-
-                                       *(p+1) = 0;
-                                       if (!get_sha1(p - 39, sha1)) {
-                                               struct object *o =
-                                                       lookup_object(sha1);
-                                               if (o)
-                                                       name = get_rev_name(o);
-                                       }
-                                       *(p+1) = c;
-
-                                       if (!name)
-                                               continue;
-
-                                       fwrite(p_start, p - p_start + 1, 1, stdout);
-                                       printf(" (%s)", name);
-                                       p_start = p + 1;
-                               }
-                       }
-
-                       /* flush */
-                       if (p_start != p)
-                               fwrite(p_start, p - p_start, 1, stdout);
+                       name_rev_line(p, &data);
                }
        } else if (all) {
                int i, max;
index 947de8cf258c73d8a327ef3a1daed417ba533f1b..c767a0ac8930166315c26d8ece2e72b4f1942d55 100644 (file)
@@ -69,11 +69,6 @@ static int prune_dir(int i, char *path)
                        if (de->d_name[0] != '.')
                                break;
                        continue;
-               case 14:
-                       if (prefixcmp(de->d_name, "tmp_obj_"))
-                               break;
-                       prune_tmp_object(path, de->d_name);
-                       continue;
                case 38:
                        sprintf(name, "%02x", i);
                        memcpy(name+2, de->d_name, len+1);
@@ -90,6 +85,10 @@ static int prune_dir(int i, char *path)
                        prune_object(path, de->d_name, sha1);
                        continue;
                }
+               if (!prefixcmp(de->d_name, "tmp_obj_")) {
+                       prune_tmp_object(path, de->d_name);
+                       continue;
+               }
                fprintf(stderr, "bad sha1 file: %s/%s\n", path, de->d_name);
        }
        if (!show_only)
index 54d1c3e3d16b2cebcff0c6c57d98756e48472b67..01945a8651c9a42f19fba850036ed2a1339675f1 100644 (file)
@@ -115,7 +115,7 @@ static int add(int argc, const char **argv)
        if (mirror) {
                strbuf_reset(&buf);
                strbuf_addf(&buf, "remote.%s.mirror", name);
-               if (git_config_set(buf.buf, "yes"))
+               if (git_config_set(buf.buf, "true"))
                        return 1;
        }
 
index e9da870d22c14c32a0e0a6cb71b933c79a2d8b53..27881e94937dd79b9a0524eb2d9770427ec4f4fb 100644 (file)
@@ -180,7 +180,7 @@ static void set_author_ident_env(const char *message)
                        email++;
                        timestamp = strchr(email, '>');
                        if (!timestamp)
-                               die ("Could not extract author email from %s",
+                               die ("Could not extract author time from %s",
                                        sha1_to_hex(commit->object.sha1));
                        *timestamp = '\0';
                        for (timestamp++; *timestamp && isspace(*timestamp);
index 290a9e6f822df97984b9f769508aab36419eaf02..a52e657c51916a0032908a87b4d4df259547f4e8 100644 (file)
@@ -228,9 +228,10 @@ char **env_setenv(char **env, const char *name);
  * A replacement of main() that ensures that argv[0] has a path
  */
 
-#define main(c,v) main(int argc, const char **argv) \
+#define main(c,v) dummy_decl_mingw_main(); \
+static int mingw_main(); \
+int main(int argc, const char **argv) \
 { \
-       static int mingw_main(); \
        argv[0] = xstrdup(_pgmptr); \
        return mingw_main(argc, argv); \
 } \
index 30d870187e64e33ed430dc1fab1ea37036a07f58..3396e35d76dd5acbe6901456bb3e68db03b780c0 100755 (executable)
@@ -561,6 +561,29 @@ _git_add ()
        COMPREPLY=()
 }
 
+_git_archive ()
+{
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --format=*)
+               __gitcomp "$(git archive --list)" "" "${cur##--format=}"
+               return
+               ;;
+       --remote=*)
+               __gitcomp "$(__git_remotes)" "" "${cur##--remote=}"
+               return
+               ;;
+       --*)
+               __gitcomp "
+                       --format= --list --verbose
+                       --prefix= --remote= --exec=
+                       "
+               return
+               ;;
+       esac
+       __git_complete_file
+}
+
 _git_bisect ()
 {
        __git_has_doubledash && return
@@ -667,6 +690,45 @@ _git_cherry_pick ()
        esac
 }
 
+_git_clean ()
+{
+       __git_has_doubledash && return
+
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "--dry-run --quiet"
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
+_git_clone ()
+{
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "
+                       --local
+                       --no-hardlinks
+                       --shared
+                       --reference
+                       --quiet
+                       --no-checkout
+                       --bare
+                       --mirror
+                       --origin
+                       --upload-pack
+                       --template=
+                       --depth
+                       "
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
 _git_commit ()
 {
        __git_has_doubledash && return
@@ -721,11 +783,6 @@ _git_diff ()
        __git_complete_file
 }
 
-_git_diff_tree ()
-{
-       __gitcomp "$(__git_refs)"
-}
-
 _git_fetch ()
 {
        local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -796,6 +853,29 @@ _git_gc ()
        COMPREPLY=()
 }
 
+_git_grep ()
+{
+       __git_has_doubledash && return
+
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "
+                       --cached
+                       --text --ignore-case --word-regexp --invert-match
+                       --full-name
+                       --extended-regexp --basic-regexp --fixed-strings
+                       --files-with-matches --name-only
+                       --files-without-match
+                       --count
+                       --and --or --not --all-match
+                       "
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
 _git_help ()
 {
        local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -808,6 +888,44 @@ _git_help ()
        __gitcomp "$(__git_all_commands)"
 }
 
+_git_init ()
+{
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --shared=*)
+               __gitcomp "
+                       false true umask group all world everybody
+                       " "" "${cur##--shared=}"
+               return
+               ;;
+       --*)
+               __gitcomp "--quiet --bare --template= --shared --shared="
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
+_git_ls_files ()
+{
+       __git_has_doubledash && return
+
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "--cached --deleted --modified --others --ignored
+                       --stage --directory --no-empty-directory --unmerged
+                       --killed --exclude= --exclude-from=
+                       --exclude-per-directory= --exclude-standard
+                       --error-unmatch --with-tree= --full-name
+                       --abbrev --ignored --exclude-per-directory
+                       "
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
 _git_ls_remote ()
 {
        __gitcomp "$(__git_remotes)"
@@ -853,6 +971,7 @@ _git_log ()
                        --stat --numstat --shortstat
                        --decorate --diff-filter=
                        --color-words --walk-reflogs
+                       --parents --children --full-history
                        "
                return
                ;;
@@ -887,6 +1006,18 @@ _git_merge_base ()
        __gitcomp "$(__git_refs)"
 }
 
+_git_mv ()
+{
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "--dry-run"
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
 _git_name_rev ()
 {
        __gitcomp "--tags --all --stdin"
@@ -1211,6 +1342,18 @@ _git_reset ()
        __gitcomp "$(__git_refs)"
 }
 
+_git_revert ()
+{
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "--edit --mainline --no-edit --no-commit --signoff"
+               return
+               ;;
+       esac
+       COMPREPLY=()
+}
+
 _git_rm ()
 {
        __git_has_doubledash && return
@@ -1283,7 +1426,7 @@ _git_show_branch ()
 
 _git_stash ()
 {
-       local subcommands='save list show apply clear drop pop create'
+       local subcommands='save list show apply clear drop pop create branch'
        local subcommand="$(__git_find_subcommand "$subcommands")"
        if [ -z "$subcommand" ]; then
                __gitcomp "$subcommands"
@@ -1293,6 +1436,16 @@ _git_stash ()
                save,--*)
                        __gitcomp "--keep-index"
                        ;;
+               apply,--*)
+                       __gitcomp "--index"
+                       ;;
+               show,--*|apply,--*|drop,--*|pop,--*|branch,--*)
+                       COMPREPLY=()
+                       ;;
+               show,*|apply,*|drop,*|pop,*|branch,*)
+                       __gitcomp "$(git --git-dir="$(__gitdir)" stash list \
+                                       | sed -n -e 's/:.*//p')"
+                       ;;
                *)
                        COMPREPLY=()
                        ;;
@@ -1473,12 +1626,15 @@ _git ()
        am)          _git_am ;;
        add)         _git_add ;;
        apply)       _git_apply ;;
+       archive)     _git_archive ;;
        bisect)      _git_bisect ;;
        bundle)      _git_bundle ;;
        branch)      _git_branch ;;
        checkout)    _git_checkout ;;
        cherry)      _git_cherry ;;
        cherry-pick) _git_cherry_pick ;;
+       clean)       _git_clean ;;
+       clone)       _git_clone ;;
        commit)      _git_commit ;;
        config)      _git_config ;;
        describe)    _git_describe ;;
@@ -1486,18 +1642,23 @@ _git ()
        fetch)       _git_fetch ;;
        format-patch) _git_format_patch ;;
        gc)          _git_gc ;;
+       grep)        _git_grep ;;
        help)        _git_help ;;
+       init)        _git_init ;;
        log)         _git_log ;;
+       ls-files)    _git_ls_files ;;
        ls-remote)   _git_ls_remote ;;
        ls-tree)     _git_ls_tree ;;
        merge)       _git_merge;;
        merge-base)  _git_merge_base ;;
+       mv)          _git_mv ;;
        name-rev)    _git_name_rev ;;
        pull)        _git_pull ;;
        push)        _git_push ;;
        rebase)      _git_rebase ;;
        remote)      _git_remote ;;
        reset)       _git_reset ;;
+       revert)      _git_revert ;;
        rm)          _git_rm ;;
        send-email)  _git_send_email ;;
        shortlog)    _git_shortlog ;;
index 2c4a4062a5317c51601fc4c644c96a7f75e1ef2c..5c72f655c7e4fb1bd18e979d33bd94062fce8c1a 100755 (executable)
@@ -443,7 +443,7 @@ fi | git stripspace >"$GIT_DIR"/COMMIT_EDITMSG
 
 case "$signoff" in
 t)
-       sign=$(git-var GIT_COMMITTER_IDENT | sed -e '
+       sign=$(git var GIT_COMMITTER_IDENT | sed -e '
                s/>.*/>/
                s/^/Signed-off-by: /
                ')
@@ -535,8 +535,8 @@ esac
 
 case "$no_edit" in
 '')
-       git-var GIT_AUTHOR_IDENT > /dev/null  || die
-       git-var GIT_COMMITTER_IDENT > /dev/null  || die
+       git var GIT_AUTHOR_IDENT > /dev/null  || die
+       git var GIT_COMMITTER_IDENT > /dev/null  || die
        git_editor "$GIT_DIR/COMMIT_EDITMSG"
        ;;
 esac
index e9f3a228af472c932f6cec5fa25ae49cd841b239..2c15bc955b5bdf64119cdef87ad7519900cdd35f 100755 (executable)
@@ -164,7 +164,7 @@ git check-ref-format "tags/$name" ||
 
 object=$(git rev-parse --verify --default HEAD "$@") || exit 1
 type=$(git cat-file -t $object) || exit 1
-tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
+tagger=$(git var GIT_COMMITTER_IDENT) || exit 1
 
 test -n "$username" ||
        username=$(git config user.signingkey) ||
diff --git a/diff.c b/diff.c
index a07812c5c75f1f579295df392efed27f6a5f6fc1..8746c60b9cb634bf78911c34cad1ba5a1f93d5ec 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -131,10 +131,6 @@ static int parse_funcname_pattern(const char *var, const char *ep, const char *v
  */
 int git_diff_ui_config(const char *var, const char *value, void *cb)
 {
-       if (!strcmp(var, "diff.renamelimit")) {
-               diff_rename_limit_default = git_config_int(var, value);
-               return 0;
-       }
        if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
                diff_use_color_default = git_config_colorbool(var, value, -1);
                return 0;
@@ -167,6 +163,11 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
 
 int git_diff_basic_config(const char *var, const char *value, void *cb)
 {
+       if (!strcmp(var, "diff.renamelimit")) {
+               diff_rename_limit_default = git_config_int(var, value);
+               return 0;
+       }
+
        if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) {
                int slot = parse_diff_color_slot(var, 11);
                if (!value)
@@ -1380,7 +1381,14 @@ static struct builtin_funcname_pattern {
                        "^[     ]*\\(\\([       ]*"
                        "[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
                        "[      ]*([^;]*\\)$" },
-       { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
+       { "pascal", "^\\(\\(procedure\\|function\\|constructor\\|"
+                       "destructor\\|interface\\|implementation\\|"
+                       "initialization\\|finalization\\)[ \t]*.*\\)$"
+                       "\\|"
+                       "^\\(.*=[ \t]*\\(class\\|record\\).*\\)$"
+                       },
+       { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\{0,1\\}{.*\\)$" },
+       { "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
 };
 
 static const char *diff_funcname_pattern(struct diff_filespec *one)
@@ -3223,11 +3231,10 @@ void diff_flush(struct diff_options *options)
 
        if (output_format & DIFF_FORMAT_PATCH) {
                if (separator) {
+                       putc(options->line_termination, options->file);
                        if (options->stat_sep) {
                                /* attach patch instead of inline */
                                fputs(options->stat_sep, options->file);
-                       } else {
-                               putc(options->line_termination, options->file);
                        }
                }
 
index 6aa819280ef99ccbbdeefde037e99fae3e6f0110..8f91a97eb3a07908b35de086d555822c928fd2e9 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -291,7 +291,7 @@ fi
 ws=`cat "$dotest/whitespace"`
 if test "$(cat "$dotest/sign")" = t
 then
-       SIGNOFF=`git-var GIT_COMMITTER_IDENT | sed -e '
+       SIGNOFF=`git var GIT_COMMITTER_IDENT | sed -e '
                        s/>.*/>/
                        s/^/Signed-off-by: /'
                `
index e2664ef01308fd0fb65d47b25e0ae73a65aa6262..e43920296182f320dac31b5832a30844ffaef38f 100755 (executable)
@@ -952,7 +952,7 @@ while (<CVS>) {
        } elsif (/^-+$/) { # end of unknown-line processing
                $state = 1;
        } elsif ($state != 11) { # ignore stuff when skipping
-               print "* UNKNOWN LINE * $_\n";
+               print STDERR "* UNKNOWN LINE * $_\n";
        }
 }
 commit() if $branch and $state != 11;
index b19fb2d64e777102fed94d485f869ad6695bbb62..55765c8a3aa6b3702b230e8efe3c2ab47a6e73e5 100644 (file)
@@ -34,8 +34,12 @@ ifndef gitexecdir
 endif
 
 ifndef sharedir
+ifeq (git-core,$(notdir $(gitexecdir)))
+       sharedir := $(dir $(patsubst %/,%,$(dir $(gitexecdir))))share
+else
        sharedir := $(dir $(gitexecdir))share
 endif
+endif
 
 ifndef INSTALL
        INSTALL = install
@@ -156,6 +160,7 @@ endif
 ifneq (,$(findstring MINGW,$(uname_S)))
        NO_MSGFMT=1
        GITGUI_WINDOWS_WRAPPER := YesPlease
+       GITGUI_RELATIVE := 1
 endif
 
 ifdef GITGUI_MACOSXAPP
index 7c27a43a5de5394d2d1a482c456c1123798b64fc..14b2d9aacd1d28084f195365b434747df2ddc95d 100755 (executable)
@@ -317,7 +317,7 @@ proc _git_cmd {name} {
        return $v
 }
 
-proc _which {what} {
+proc _which {what args} {
        global env _search_exe _search_path
 
        if {$_search_path eq {}} {
@@ -340,8 +340,14 @@ proc _which {what} {
                }
        }
 
+       if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
+               set suffix {}
+       } else {
+               set suffix $_search_exe
+       }
+
        foreach p $_search_path {
-               set p [file join $p $what$_search_exe]
+               set p [file join $p $what$suffix]
                if {[file exists $p]} {
                        return [file normalize $p]
                }
@@ -1686,7 +1692,7 @@ proc do_gitk {revs} {
        # -- Always start gitk through whatever we were loaded with.  This
        #    lets us bypass using shell process on Windows systems.
        #
-       set exe [_which gitk]
+       set exe [_which gitk -script]
        set cmd [list [info nameofexecutable] $exe]
        if {$exe eq {}} {
                error_popup [mc "Couldn't find gitk in PATH"]
@@ -2925,6 +2931,7 @@ if {[is_enabled transport]} {
        populate_fetch_menu
        set n [expr {[.mbar.remote index end] - $n}]
        if {$n > 0} {
+               if {[.mbar.remote type 0] eq "tearoff"} { incr n }
                .mbar.remote insert $n separator
        }
        unset n
index 77990c537c9d068fdcdf62a83b8c132399dff749..52b79e4a1f476c2ee9b65087f66a352a25ed0903 100644 (file)
@@ -19,6 +19,7 @@ proc clear_diff {} {
 proc reshow_diff {} {
        global file_states file_lists
        global current_diff_path current_diff_side
+       global ui_diff
 
        set p $current_diff_path
        if {$p eq {}} {
@@ -28,7 +29,8 @@ proc reshow_diff {} {
                || [lsearch -sorted -exact $file_lists($current_diff_side) $p] == -1} {
                clear_diff
        } else {
-               show_diff $p $current_diff_side
+               set save_pos [lindex [$ui_diff yview] 0]
+               show_diff $p $current_diff_side {} $save_pos
        }
 }
 
@@ -52,7 +54,7 @@ A rescan will be automatically started to find other files which may have the sa
        rescan ui_ready 0
 }
 
-proc show_diff {path w {lno {}}} {
+proc show_diff {path w {lno {}} {scroll_pos {}}} {
        global file_states file_lists
        global is_3way_diff diff_active repo_config
        global ui_diff ui_index ui_workdir
@@ -151,6 +153,10 @@ proc show_diff {path w {lno {}}} {
                $ui_diff conf -state disabled
                set diff_active 0
                unlock_index
+               if {$scroll_pos ne {}} {
+                       update
+                       $ui_diff yview moveto $scroll_pos
+               }
                ui_ready
                return
        }
@@ -190,10 +196,10 @@ proc show_diff {path w {lno {}}} {
                -blocking 0 \
                -encoding binary \
                -translation binary
-       fileevent $fd readable [list read_diff $fd]
+       fileevent $fd readable [list read_diff $fd $scroll_pos]
 }
 
-proc read_diff {fd} {
+proc read_diff {fd scroll_pos} {
        global ui_diff diff_active
        global is_3way_diff current_diff_header
 
@@ -282,6 +288,10 @@ proc read_diff {fd} {
                close $fd
                set diff_active 0
                unlock_index
+               if {$scroll_pos ne {}} {
+                       update
+                       $ui_diff yview moveto $scroll_pos
+               }
                ui_ready
 
                if {[$ui_diff index end] eq {2.0}} {
index 98f32c0a071146a202b3d8589576db26974ccbfa..53c3a94686813936445efbb055dc4f02885c70e9 100644 (file)
@@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
        incr argc -2
 }
 
-set gitguidir [file dirname [info script]]
-regsub -all ";" $gitguidir "\\;" gitguidir
-set env(PATH) "$gitguidir;$env(PATH)"
-unset gitguidir
+set bindir [file dirname \
+            [file dirname \
+             [file dirname [info script]]]]
+set bindir [file join $bindir bin]
+regsub -all ";" $bindir "\\;" bindir
+set env(PATH) "$bindir;$env(PATH)"
+unset bindir
 
 source [file join [file dirname [info script]] git-gui.tcl]
index d4609ed66e56dc6021c800d60286bec38615ff39..5ad2c4b7a33cf1be24ee85f17c8738ca05b98db0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright (c) 2007, Nanako Shiraishi
 
-USAGE='[  | save | list | show | apply | clear | drop | pop | create ]'
+USAGE='[  | save | list | show | apply | clear | drop | pop | create | branch ]'
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
index cf6dbbc42773fef394c27cd87109b69c3144753c..df0ed9027df2c3b8b8f9d7f4f4046f3a0b1ae7f1 100755 (executable)
@@ -796,8 +796,8 @@ sub cmd_commit_diff {
 }
 
 sub cmd_info {
-       my $path = canonicalize_path(shift or ".");
-       unless (scalar(@_) == 0) {
+       my $path = canonicalize_path(defined($_[0]) ? $_[0] : ".");
+       if (exists $_[1]) {
                die "Too many arguments specified\n";
        }
 
@@ -813,6 +813,10 @@ sub cmd_info {
                die "Unable to determine upstream SVN information from ",
                    "working tree history\n";
        }
+
+       # canonicalize_path() will return "" to make libsvn 1.5.x happy,
+       $path = "." if $path eq "";
+
        my $full_url = $url . ($path eq "." ? "" : "/$path");
 
        if ($_url) {
@@ -1420,8 +1424,12 @@ sub read_all_remotes {
            svn.useSvmProps/) };
        $use_svm_props = $use_svm_props eq 'true' if $use_svm_props;
        foreach (grep { s/^svn-remote\.// } command(qw/config -l/)) {
-               if (m!^(.+)\.fetch=\s*(.*)\s*:\s*refs/remotes/(.+)\s*$!) {
-                       my ($remote, $local_ref, $remote_ref) = ($1, $2, $3);
+               if (m!^(.+)\.fetch=\s*(.*)\s*:\s*(.+)\s*$!) {
+                       my ($remote, $local_ref, $_remote_ref) = ($1, $2, $3);
+                       die("svn-remote.$remote: remote ref '$_remote_ref' "
+                           . "must start with 'refs/remotes/'\n")
+                               unless $_remote_ref =~ m{^refs/remotes/(.+)};
+                       my $remote_ref = $1;
                        $local_ref =~ s{^/}{};
                        $r->{$remote}->{fetch}->{$local_ref} = $remote_ref;
                        $r->{$remote}->{svm} = {} if $use_svm_props;
diff --git a/ident.c b/ident.c
index b35504a8d25594a8d243ae7490733eae5a262712..09cf0c95c9bfc24fa3e4a8f9e212ec42b8a55eba 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -204,7 +204,7 @@ const char *fmt_ident(const char *name, const char *email,
                if ((warn_on_no_name || error_on_no_name) &&
                    name == git_default_name && env_hint) {
                        fprintf(stderr, env_hint, au_env, co_env);
-                       env_hint = NULL; /* warn only once, for "git-var -l" */
+                       env_hint = NULL; /* warn only once, for "git var -l" */
                }
                if (error_on_no_name)
                        die("empty ident %s <%s> not allowed", name, email);
index 5505606ed6a292cadf1a04ea0b1abc2ca93e3c09..bd8b9e45ab46b8664c8b7016b33bee22f86c9e0d 100644 (file)
@@ -198,7 +198,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name,
                extra_headers = subject_buffer;
 
                snprintf(buffer, sizeof(buffer) - 1,
-                        "--%s%s\n"
+                        "\n--%s%s\n"
                         "Content-Type: text/x-patch;"
                         " name=\"%s.diff\"\n"
                         "Content-Transfer-Encoding: 8bit\n"
index d99e7782002e01079b3866003cc8555b7e130e3f..e1ca5b4a2289c59aa54f013aff54ecf1385e3030 100644 (file)
@@ -90,7 +90,7 @@ TODO: In the future, we might also do
 Currently, the module merely wraps calls to external Git tools. In the future,
 it will provide a much faster way to interact with Git by linking directly
 to libgit. This should be completely opaque to the user, though (performance
-increate nonwithstanding).
+increase notwithstanding).
 
 =cut
 
@@ -417,6 +417,7 @@ have more complicated structure.
 =cut
 
 sub command_close_bidi_pipe {
+       local $?;
        my ($pid, $in, $out, $ctx) = @_;
        foreach my $fh ($in, $out) {
                unless (close $fh) {
@@ -730,7 +731,7 @@ This suite of functions retrieves and parses ident information, as stored
 in the commit and tag objects or produced by C<var GIT_type_IDENT> (thus
 C<TYPE> can be either I<author> or I<committer>; case is insignificant).
 
-The C<ident> method retrieves the ident information from C<git-var>
+The C<ident> method retrieves the ident information from C<git var>
 and either returns it as a scalar string or as an array with the fields parsed.
 Alternatively, it can take a prepared ident string (e.g. from the commit
 object) and just parse it.
@@ -839,8 +840,8 @@ sub _close_hash_and_insert_object {
 
        my @vars = map { 'hash_object_' . $_ } qw(pid in out ctx);
 
-       command_close_bidi_pipe($self->{@vars});
-       delete $self->{@vars};
+       command_close_bidi_pipe(@$self{@vars});
+       delete @$self{@vars};
 }
 
 =item cat_blob ( SHA1, FILEHANDLE )
@@ -928,8 +929,8 @@ sub _close_cat_blob {
 
        my @vars = map { 'cat_blob_' . $_ } qw(pid in out ctx);
 
-       command_close_bidi_pipe($self->{@vars});
-       delete $self->{@vars};
+       command_close_bidi_pipe(@$self{@vars});
+       delete @$self{@vars};
 }
 
 =back
index 1cae361c6c3066e0aedba7872ebda3766aa94a52..2c03ec3069decb20f7557af4ac7dbe295f2dcf9c 100644 (file)
@@ -147,7 +147,7 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st)
                break;
        case S_IFDIR:
                if (S_ISGITLINK(ce->ce_mode))
-                       return 0;
+                       return ce_compare_gitlink(ce) ? DATA_CHANGED : 0;
        default:
                return TYPE_CHANGED;
        }
@@ -187,6 +187,7 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
                        changed |= TYPE_CHANGED;
                break;
        case S_IFGITLINK:
+               /* We ignore most of the st_xxx fields for gitlinks */
                if (!S_ISDIR(st->st_mode))
                        changed |= TYPE_CHANGED;
                else if (ce_compare_gitlink(ce))
@@ -293,11 +294,22 @@ int ie_modified(const struct index_state *istate,
        if (changed & (MODE_CHANGED | TYPE_CHANGED))
                return changed;
 
-       /* Immediately after read-tree or update-index --cacheinfo,
-        * the length field is zero.  For other cases the ce_size
-        * should match the SHA1 recorded in the index entry.
+       /*
+        * Immediately after read-tree or update-index --cacheinfo,
+        * the length field is zero, as we have never even read the
+        * lstat(2) information once, and we cannot trust DATA_CHANGED
+        * returned by ie_match_stat() which in turn was returned by
+        * ce_match_stat_basic() to signal that the filesize of the
+        * blob changed.  We have to actually go to the filesystem to
+        * see if the contents match, and if so, should answer "unchanged".
+        *
+        * The logic does not apply to gitlinks, as ce_match_stat_basic()
+        * already has checked the actual HEAD from the filesystem in the
+        * subproject.  If ie_match_stat() already said it is different,
+        * then we know it is.
         */
-       if ((changed & DATA_CHANGED) && ce->ce_size != 0)
+       if ((changed & DATA_CHANGED) &&
+           (S_ISGITLINK(ce->ce_mode) || ce->ce_size != 0))
                return changed;
 
        changed_fs = ce_modified_check_fs(ce, st);
@@ -1326,6 +1338,11 @@ static void ce_smudge_racily_clean_entry(struct cache_entry *ce)
         * falsely clean entry due to touch-update-touch race, so we leave
         * everything else as they are.  We are called for entries whose
         * ce_mtime match the index file mtime.
+        *
+        * Note that this actually does not do much for gitlinks, for
+        * which ce_match_stat_basic() always goes to the actual
+        * contents.  The caller checks with is_racy_timestamp() which
+        * always says "no" for gitlinks, so we are not called for them ;-)
         */
        struct stat st;
 
index 3897fec53170c50921eb1952bc4bdf9c08480638..e75079a6e1316c74b4dff702170134dc7559898f 100644 (file)
@@ -1002,7 +1002,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
            !strcmp(arg, "--no-walk") || !strcmp(arg, "--do-walk"))
        {
                unkv[(*unkc)++] = arg;
-               return 0;
+               return 1;
        }
 
        if (!prefixcmp(arg, "--max-count=")) {
index a3b28a64dc2d1b888b0ba2a135be10fe04651201..bbb9c777e583c345d25a6651f9ddf7725c10f6af 100644 (file)
@@ -68,6 +68,7 @@ int start_command(struct child_process *cmd)
        trace_argv_printf(cmd->argv, "trace: run_command:");
 
 #ifndef __MINGW32__
+       fflush(NULL);
        cmd->pid = fork();
        if (!cmd->pid) {
                if (cmd->no_stdin)
@@ -304,6 +305,9 @@ int start_async(struct async *async)
        async->out = pipe_out[0];
 
 #ifndef __MINGW32__
+       /* Flush stdio before fork() to avoid cloning buffers */
+       fflush(NULL);
+
        async->pid = fork();
        if (async->pid < 0) {
                error("fork (async) failed: %s", strerror(errno));
index e281c14f01d37ab7623998c2990914aca49a7a3b..32e4664b1b52542bbd77218a4b88cef610f49649 100644 (file)
@@ -1929,11 +1929,18 @@ static int sha1_loose_object_info(const unsigned char *sha1, unsigned long *size
 int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)
 {
        struct pack_entry e;
+       int status;
 
        if (!find_pack_entry(sha1, &e, NULL)) {
+               /* Most likely it's a loose object. */
+               status = sha1_loose_object_info(sha1, sizep);
+               if (status >= 0)
+                       return status;
+
+               /* Not a loose object; someone else may have just packed it. */
                reprepare_packed_git();
                if (!find_pack_entry(sha1, &e, NULL))
-                       return sha1_loose_object_info(sha1, sizep);
+                       return status;
        }
        return packed_object_info(e.p, e.offset, sizep);
 }
index 03dbe00102626e05c37e45d8a3b1364b99644942..e38241c80a6625c9b5b89340b9d0c5a2667bf345 100755 (executable)
@@ -47,6 +47,7 @@ test_expect_success 'test help' '
 cat > expect << EOF
 boolean: 2
 integer: 1729
+timestamp: 0
 string: 123
 abbrev: 7
 verbose: 2
@@ -63,6 +64,7 @@ test_expect_success 'short options' '
 cat > expect << EOF
 boolean: 2
 integer: 1729
+timestamp: 0
 string: 321
 abbrev: 10
 verbose: 2
@@ -88,6 +90,7 @@ test_expect_success 'missing required value' '
 cat > expect << EOF
 boolean: 1
 integer: 13
+timestamp: 0
 string: 123
 abbrev: 7
 verbose: 0
@@ -108,6 +111,7 @@ test_expect_success 'intermingled arguments' '
 cat > expect << EOF
 boolean: 0
 integer: 2
+timestamp: 0
 string: (not set)
 abbrev: 7
 verbose: 0
@@ -135,6 +139,7 @@ test_expect_success 'ambiguously abbreviated option' '
 cat > expect << EOF
 boolean: 0
 integer: 0
+timestamp: 0
 string: 123
 abbrev: 7
 verbose: 0
@@ -161,6 +166,7 @@ test_expect_success 'detect possible typos' '
 cat > expect <<EOF
 boolean: 0
 integer: 0
+timestamp: 0
 string: (not set)
 abbrev: 7
 verbose: 0
@@ -177,7 +183,8 @@ test_expect_success 'keep some options as arguments' '
 
 cat > expect <<EOF
 boolean: 0
-integer: 1
+integer: 0
+timestamp: 1
 string: default
 abbrev: 7
 verbose: 0
@@ -197,6 +204,7 @@ cat > expect <<EOF
 Callback: "four", 0
 boolean: 5
 integer: 4
+timestamp: 0
 string: (not set)
 abbrev: 7
 verbose: 0
@@ -223,6 +231,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' '
 cat > expect <<EOF
 boolean: 1
 integer: 23
+timestamp: 0
 string: (not set)
 abbrev: 7
 verbose: 0
index cf6891f748009ad1dc381da16beb63f28c0025b4..43346b9ba443fe22b56f0874a7cc885461d2aa81 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit
  file1   |    3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)
  create mode 100644 file1
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
 Content-Transfer-Encoding: 8bit
@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit
  file3   |    4 ++++
  3 files changed, 9 insertions(+), 0 deletions(-)
  create mode 100644 file3
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
 Content-Transfer-Encoding: 8bit
index fe0258720ca5f2058a7f71f8417b5eece23b867a..d7490a9fd729890c80a4b8fc3da0783997f81a04 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit
  file1   |    3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)
  create mode 100644 file1
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
 Content-Transfer-Encoding: 8bit
index 9ff828ee9d1cbf59d637645b5946c82fe8af00e4..38f790290a41311e490c493bdaf71774853cc861 100644 (file)
@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit
  file3   |    4 ++++
  3 files changed, 9 insertions(+), 0 deletions(-)
  create mode 100644 file3
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
 Content-Transfer-Encoding: 8bit
index a8093be7ca43e0e2764ceeb853469184676cc992..fca5cce373767d96fd68a17a196889c8c9ea172f 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit
  file1   |    3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)
  create mode 100644 file1
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
 Content-Transfer-Encoding: 8bit
@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit
  file3   |    4 ++++
  3 files changed, 9 insertions(+), 0 deletions(-)
  create mode 100644 file3
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
 Content-Transfer-Encoding: 8bit
index aa110c0e7f72cbc9e5df711d0e29917c272a3f4b..6d6fac390849c964e75b56e48808a78dd3428ce1 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit
  file1   |    3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)
  create mode 100644 file1
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
 Content-Transfer-Encoding: 8bit
@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit
  file3   |    4 ++++
  3 files changed, 9 insertions(+), 0 deletions(-)
  create mode 100644 file3
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
 Content-Transfer-Encoding: 8bit
index 95e9ea4c59128d1e7611e86b0b1e49ce170f9c2a..18a1110def4bbe25c0bd7020d35df589ef6f528f 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit
  file1   |    3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)
  create mode 100644 file1
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
 Content-Transfer-Encoding: 8bit
index b8e81e15520aca1303e8a5acfbb9019c80b9973d..4f258b8858df79ecf475514b69df904e83e29ffa 100644 (file)
@@ -19,6 +19,8 @@ This is the second commit.
  file2   |    3 ---
  3 files changed, 5 insertions(+), 3 deletions(-)
  delete mode 100644 file2
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
 Content-Transfer-Encoding: 8bit
index 86ae923d7189639d48f382c6f498df878255102a..e86dce69a3a78d5cfe5cd82067df0381b0f635bd 100644 (file)
@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit
  file3   |    4 ++++
  3 files changed, 9 insertions(+), 0 deletions(-)
  create mode 100644 file3
+
+
 --------------g-i-t--v-e-r-s-i-o-n
 Content-Type: text/x-patch; name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
 Content-Transfer-Encoding: 8bit
index d785b3df78e8507d81ffa03ff694846791edfc87..a13b6f9d3d9c0735ce87c82150283727fab8e378 100755 (executable)
@@ -31,6 +31,12 @@ test_expect_success 'clone with excess parameters (2)' '
 
 '
 
+test_expect_success 'output from clone' '
+       rm -fr dst &&
+       git clone -n "file://$(pwd)/src" dst >output &&
+       test $(grep Initialized output | wc -l) = 1
+'
+
 test_expect_success 'clone does not keep pack' '
 
        rm -fr dst &&
@@ -70,4 +76,23 @@ test_expect_success 'clone creates intermediate directories for bare repo' '
 
 '
 
+test_expect_success 'clone --mirror' '
+
+       git clone --mirror src mirror &&
+       test -f mirror/HEAD &&
+       test ! -f mirror/file &&
+       FETCH="$(cd mirror && git config remote.origin.fetch)" &&
+       test "+refs/*:refs/*" = "$FETCH" &&
+       MIRROR="$(cd mirror && git config --bool remote.origin.mirror)" &&
+       test "$MIRROR" = true
+
+'
+
+test_expect_success 'clone --bare names the local repository <name>.git' '
+
+       git clone --bare src &&
+       test -d src.git
+
+'
+
 test_done
index 4f2682ea800df599d720108ef8f17de06fedc06c..3eb9faedcf75c7b8a535b369e5a19107c6e81026 100755 (executable)
@@ -141,8 +141,8 @@ test_expect_success 'cleanup commit messages (strip,-F)' '
 
 echo "sample
 
-# Please enter the commit message for your changes.
-# (Comment lines starting with '#' will not be included)" >expect
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit." >expect
 
 test_expect_success 'cleanup commit messages (strip,-F,-e)' '
 
index 8da8ce58eb1b29210a6ac95fdd3a3fcb547ca36f..ae78e334acac717a737b75bdc93af48542190b67 100755 (executable)
@@ -28,6 +28,7 @@ start_svnserve () {
 
 test_expect_success 'start tracking an empty repo' '
        svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
+       echo "[general]" > "$rawsvnrepo"/conf/svnserve.conf &&
        echo anon-access = write >> "$rawsvnrepo"/conf/svnserve.conf &&
        start_svnserve &&
        git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
index cc619115931cb74a85a171ade915ca2c47639c9b..5fd36a148304e4532f4e1b30deac781028c68271 100755 (executable)
@@ -5,20 +5,38 @@
 test_description='git-svn info'
 
 . ./lib-git-svn.sh
-say 'skipping svn-info test (has a race undiagnosed yet)'
-test_done
+
+set -e
+
+# Tested with: svn, version 1.4.4 (r25188)
+v=`svn --version | sed -n -e 's/^svn, version \(1\.4\.[0-9]\).*$/\1/p'`
+case $v in
+1.4.*)
+       ;;
+*)
+       say "skipping svn-info test (SVN version: $v not supported)"
+       test_done
+       ;;
+esac
 
 ptouch() {
        perl -w -e '
                use strict;
+               use POSIX qw(mktime);
                die "ptouch requires exactly 2 arguments" if @ARGV != 2;
-               die "$ARGV[0] does not exist" if ! -e $ARGV[0];
-               my @s = stat $ARGV[0];
-               utime $s[8], $s[9], $ARGV[1];
-       ' "$1" "$2"
+               my $text_last_updated = shift @ARGV;
+               my $git_file = shift @ARGV;
+               die "\"$git_file\" does not exist" if ! -e $git_file;
+               if ($text_last_updated
+                   =~ /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/) {
+                       my $mtime = mktime($6, $5, $4, $3, $2 - 1, $1 - 1900);
+                       my $atime = $mtime;
+                       utime $atime, $mtime, $git_file;
+               }
+       ' "`svn info $2 | grep '^Text Last Updated:'`" "$1"
 }
 
-test_expect_success 'setup repository and import' "
+test_expect_success 'setup repository and import' '
        mkdir info &&
        cd info &&
                echo FIRST > A &&
@@ -27,19 +45,19 @@ test_expect_success 'setup repository and import' "
                mkdir directory &&
                touch directory/.placeholder &&
                ln -s directory symlink-directory &&
-               svn import -m 'initial' . $svnrepo &&
+               svn import -m "initial" . "$svnrepo" &&
        cd .. &&
        mkdir gitwc &&
        cd gitwc &&
-               git-svn init $svnrepo &&
+               git-svn init "$svnrepo" &&
                git-svn fetch &&
        cd .. &&
-       svn co $svnrepo svnwc &&
+       svn co "$svnrepo" svnwc &&
        ptouch svnwc/file gitwc/file &&
        ptouch svnwc/directory gitwc/directory &&
        ptouch svnwc/symlink-file gitwc/symlink-file &&
        ptouch svnwc/symlink-directory gitwc/symlink-directory
-       "
+       '
 
 test_expect_success 'info' "
        (cd svnwc; svn info) > expected.info &&
@@ -48,7 +66,7 @@ test_expect_success 'info' "
        "
 
 test_expect_success 'info --url' '
-       test $(cd gitwc; git-svn info --url) = $svnrepo
+       test "$(cd gitwc; git-svn info --url)" = "$svnrepo"
        '
 
 test_expect_success 'info .' "
@@ -58,7 +76,7 @@ test_expect_success 'info .' "
        "
 
 test_expect_success 'info --url .' '
-       test $(cd gitwc; git-svn info --url .) = $svnrepo
+       test "$(cd gitwc; git-svn info --url .)" = "$svnrepo"
        '
 
 test_expect_success 'info file' "
@@ -68,7 +86,7 @@ test_expect_success 'info file' "
        "
 
 test_expect_success 'info --url file' '
-       test $(cd gitwc; git-svn info --url file) = "$svnrepo/file"
+       test "$(cd gitwc; git-svn info --url file)" = "$svnrepo/file"
        '
 
 test_expect_success 'info directory' "
@@ -78,7 +96,7 @@ test_expect_success 'info directory' "
        "
 
 test_expect_success 'info --url directory' '
-       test $(cd gitwc; git-svn info --url directory) = "$svnrepo/directory"
+       test "$(cd gitwc; git-svn info --url directory)" = "$svnrepo/directory"
        '
 
 test_expect_success 'info symlink-file' "
@@ -88,7 +106,7 @@ test_expect_success 'info symlink-file' "
        "
 
 test_expect_success 'info --url symlink-file' '
-       test $(cd gitwc; git-svn info --url symlink-file) \
+       test "$(cd gitwc; git-svn info --url symlink-file)" \
             = "$svnrepo/symlink-file"
        '
 
@@ -101,7 +119,7 @@ test_expect_success 'info symlink-directory' "
        "
 
 test_expect_success 'info --url symlink-directory' '
-       test $(cd gitwc; git-svn info --url symlink-directory) \
+       test "$(cd gitwc; git-svn info --url symlink-directory)" \
             = "$svnrepo/symlink-directory"
        '
 
@@ -121,7 +139,7 @@ test_expect_success 'info added-file' "
        "
 
 test_expect_success 'info --url added-file' '
-       test $(cd gitwc; git-svn info --url added-file) \
+       test "$(cd gitwc; git-svn info --url added-file)" \
             = "$svnrepo/added-file"
        '
 
@@ -143,7 +161,7 @@ test_expect_success 'info added-directory' "
        "
 
 test_expect_success 'info --url added-directory' '
-       test $(cd gitwc; git-svn info --url added-directory) \
+       test "$(cd gitwc; git-svn info --url added-directory)" \
             = "$svnrepo/added-directory"
        '
 
@@ -166,7 +184,7 @@ test_expect_success 'info added-symlink-file' "
        "
 
 test_expect_success 'info --url added-symlink-file' '
-       test $(cd gitwc; git-svn info --url added-symlink-file) \
+       test "$(cd gitwc; git-svn info --url added-symlink-file)" \
             = "$svnrepo/added-symlink-file"
        '
 
@@ -189,7 +207,7 @@ test_expect_success 'info added-symlink-directory' "
        "
 
 test_expect_success 'info --url added-symlink-directory' '
-       test $(cd gitwc; git-svn info --url added-symlink-directory) \
+       test "$(cd gitwc; git-svn info --url added-symlink-directory)" \
             = "$svnrepo/added-symlink-directory"
        '
 
@@ -215,7 +233,7 @@ test_expect_success 'info deleted-file' "
        "
 
 test_expect_success 'info --url file (deleted)' '
-       test $(cd gitwc; git-svn info --url file) \
+       test "$(cd gitwc; git-svn info --url file)" \
             = "$svnrepo/file"
        '
 
@@ -236,7 +254,7 @@ test_expect_success 'info deleted-directory' "
        "
 
 test_expect_success 'info --url directory (deleted)' '
-       test $(cd gitwc; git-svn info --url directory) \
+       test "$(cd gitwc; git-svn info --url directory)" \
             = "$svnrepo/directory"
        '
 
@@ -258,7 +276,7 @@ test_expect_success 'info deleted-symlink-file' "
        "
 
 test_expect_success 'info --url symlink-file (deleted)' '
-       test $(cd gitwc; git-svn info --url symlink-file) \
+       test "$(cd gitwc; git-svn info --url symlink-file)" \
             = "$svnrepo/symlink-file"
        '
 
@@ -280,7 +298,7 @@ test_expect_success 'info deleted-symlink-directory' "
        "
 
 test_expect_success 'info --url symlink-directory (deleted)' '
-       test $(cd gitwc; git-svn info --url symlink-directory) \
+       test "$(cd gitwc; git-svn info --url symlink-directory)" \
             = "$svnrepo/symlink-directory"
        '
 
@@ -297,8 +315,8 @@ test_expect_success 'info unknown-file' "
        "
 
 test_expect_success 'info --url unknown-file' '
-       test -z $(cd gitwc; git-svn info --url unknown-file \
-                       2> ../actual.info--url-unknown-file) &&
+       test -z "$(cd gitwc; git-svn info --url unknown-file \
+                       2> ../actual.info--url-unknown-file)" &&
        git-diff expected.info-unknown-file actual.info--url-unknown-file
        '
 
@@ -314,8 +332,8 @@ test_expect_success 'info unknown-directory' "
        "
 
 test_expect_success 'info --url unknown-directory' '
-       test -z $(cd gitwc; git-svn info --url unknown-directory \
-                       2> ../actual.info--url-unknown-directory) &&
+       test -z "$(cd gitwc; git-svn info --url unknown-directory \
+                       2> ../actual.info--url-unknown-directory)" &&
        git-diff expected.info-unknown-directory \
                 actual.info--url-unknown-directory
        '
@@ -337,8 +355,8 @@ test_expect_success 'info unknown-symlink-file' "
        "
 
 test_expect_success 'info --url unknown-symlink-file' '
-       test -z $(cd gitwc; git-svn info --url unknown-symlink-file \
-                       2> ../actual.info--url-unknown-symlink-file) &&
+       test -z "$(cd gitwc; git-svn info --url unknown-symlink-file \
+                       2> ../actual.info--url-unknown-symlink-file)" &&
        git-diff expected.info-unknown-symlink-file \
                 actual.info--url-unknown-symlink-file
        '
@@ -361,8 +379,8 @@ test_expect_success 'info unknown-symlink-directory' "
        "
 
 test_expect_success 'info --url unknown-symlink-directory' '
-       test -z $(cd gitwc; git-svn info --url unknown-symlink-directory \
-                       2> ../actual.info--url-unknown-symlink-directory) &&
+       test -z "$(cd gitwc; git-svn info --url unknown-symlink-directory \
+                       2> ../actual.info--url-unknown-symlink-directory)" &&
        git-diff expected.info-unknown-symlink-directory \
                 actual.info--url-unknown-symlink-directory
        '
index 8324f6e3bd214e6c735051b52ca095970d9f61f1..c19b4a2bab586b21da43c7a838ba85626f913568 100755 (executable)
@@ -185,4 +185,50 @@ test_expect_success 'submodule fast-export | fast-import' '
 
 '
 
+export GIT_AUTHOR_NAME='A U Thor'
+export GIT_COMMITTER_NAME='C O Mitter'
+
+test_expect_success 'setup copies' '
+
+       git config --unset i18n.commitencoding &&
+       git checkout -b copy rein &&
+       git mv file file3 &&
+       git commit -m move1 &&
+       test_tick &&
+       cp file2 file4 &&
+       git add file4 &&
+       git mv file2 file5 &&
+       git commit -m copy1 &&
+       test_tick &&
+       cp file3 file6 &&
+       git add file6 &&
+       git commit -m copy2 &&
+       test_tick &&
+       echo more text >> file6 &&
+       echo even more text >> file6 &&
+       git add file6 &&
+       git commit -m modify &&
+       test_tick &&
+       cp file6 file7 &&
+       echo test >> file7 &&
+       git add file7 &&
+       git commit -m copy_modify
+
+'
+
+test_expect_success 'fast-export -C -C | fast-import' '
+
+       ENTRY=$(git rev-parse --verify copy) &&
+       rm -rf new &&
+       mkdir new &&
+       git --git-dir=new/.git init &&
+       git fast-export -C -C --signed-tags=strip --all > output &&
+       grep "^C \"file6\" \"file7\"\$" output &&
+       cat output |
+       (cd new &&
+        git fast-import &&
+        test $ENTRY = $(git rev-parse --verify refs/heads/copy))
+
+'
+
 test_done
index 2a79e729a4018ddb2da9ff633f4bf3b102fa8f88..6e18083a7d1655e9eabef197c58d92a910d2f67b 100644 (file)
@@ -2,7 +2,8 @@
 #include "parse-options.h"
 
 static int boolean = 0;
-static unsigned long integer = 0;
+static int integer = 0;
+static unsigned long timestamp;
 static int abbrev = 7;
 static int verbose = 0, dry_run = 0, quiet = 0;
 static char *string = NULL;
@@ -32,7 +33,7 @@ int main(int argc, const char **argv)
                OPT_INTEGER('i', "integer", &integer, "get a integer"),
                OPT_INTEGER('j', NULL, &integer, "get a integer, too"),
                OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23),
-               OPT_DATE('t', NULL, &integer, "get timestamp of <time>"),
+               OPT_DATE('t', NULL, &timestamp, "get timestamp of <time>"),
                OPT_CALLBACK('L', "length", &integer, "str",
                        "get length of <str>", length_callback),
                OPT_GROUP("String options"),
@@ -56,7 +57,8 @@ int main(int argc, const char **argv)
        argc = parse_options(argc, argv, options, usage, 0);
 
        printf("boolean: %d\n", boolean);
-       printf("integer: %lu\n", integer);
+       printf("integer: %u\n", integer);
+       printf("timestamp: %lu\n", timestamp);
        printf("string: %s\n", string ? string : "(not set)");
        printf("abbrev: %d\n", abbrev);
        printf("verbose: %d\n", verbose);
diff --git a/var.c b/var.c
index 724ba87a7c9ccb16bc506fc3f25710a4b78e3006..f1eb314e899c518b8dea54b4ff8f3923da7b12cf 100644 (file)
--- a/var.c
+++ b/var.c
@@ -5,7 +5,7 @@
  */
 #include "cache.h"
 
-static const char var_usage[] = "git-var [-l | <variable>]";
+static const char var_usage[] = "git var [-l | <variable>]";
 
 struct git_var {
        const char *name;