Merge branch 'kh/update-ref'
authorJunio C Hamano <gitster@pobox.com>
Sun, 22 Jun 2008 21:31:57 +0000 (14:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Jun 2008 21:31:57 +0000 (14:31 -0700)
* kh/update-ref:
Make old sha1 optional with git update-ref -d
Clean up builtin-update-ref's option parsing

222 files changed:
Documentation/.gitignore
Documentation/Makefile
Documentation/RelNotes-1.5.5.4.txt [new file with mode: 0644]
Documentation/RelNotes-1.5.6.txt
Documentation/SubmittingPatches
Documentation/blame-options.txt
Documentation/cat-texi.perl
Documentation/diff-options.txt
Documentation/diffcore.txt [deleted file]
Documentation/fetch-options.txt
Documentation/git-add.txt
Documentation/git-am.txt
Documentation/git-annotate.txt
Documentation/git-apply.txt
Documentation/git-archimport.txt
Documentation/git-archive.txt
Documentation/git-bisect.txt
Documentation/git-blame.txt
Documentation/git-branch.txt
Documentation/git-bundle.txt
Documentation/git-cat-file.txt
Documentation/git-check-attr.txt
Documentation/git-check-ref-format.txt
Documentation/git-checkout-index.txt
Documentation/git-checkout.txt
Documentation/git-cherry-pick.txt
Documentation/git-cherry.txt
Documentation/git-citool.txt
Documentation/git-clean.txt
Documentation/git-clone.txt
Documentation/git-commit-tree.txt
Documentation/git-commit.txt
Documentation/git-config.txt
Documentation/git-count-objects.txt
Documentation/git-cvsexportcommit.txt
Documentation/git-cvsimport.txt
Documentation/git-cvsserver.txt
Documentation/git-daemon.txt
Documentation/git-describe.txt
Documentation/git-diff-files.txt
Documentation/git-diff-index.txt
Documentation/git-diff-tree.txt
Documentation/git-diff.txt
Documentation/git-fast-export.txt
Documentation/git-fast-import.txt
Documentation/git-fetch-pack.txt
Documentation/git-fetch.txt
Documentation/git-filter-branch.txt
Documentation/git-fmt-merge-msg.txt
Documentation/git-for-each-ref.txt
Documentation/git-format-patch.txt
Documentation/git-fsck.txt
Documentation/git-gc.txt
Documentation/git-get-tar-commit-id.txt
Documentation/git-grep.txt
Documentation/git-gui.txt
Documentation/git-hash-object.txt
Documentation/git-help.txt
Documentation/git-http-fetch.txt
Documentation/git-http-push.txt
Documentation/git-imap-send.txt
Documentation/git-index-pack.txt
Documentation/git-init.txt
Documentation/git-instaweb.txt
Documentation/git-log.txt
Documentation/git-lost-found.txt
Documentation/git-ls-files.txt
Documentation/git-ls-remote.txt
Documentation/git-ls-tree.txt
Documentation/git-mailinfo.txt
Documentation/git-mailsplit.txt
Documentation/git-merge-base.txt
Documentation/git-merge-file.txt
Documentation/git-merge-index.txt
Documentation/git-merge-one-file.txt
Documentation/git-merge-tree.txt
Documentation/git-merge.txt
Documentation/git-mergetool.txt
Documentation/git-mktag.txt
Documentation/git-mktree.txt
Documentation/git-mv.txt
Documentation/git-name-rev.txt
Documentation/git-pack-objects.txt
Documentation/git-pack-redundant.txt
Documentation/git-pack-refs.txt
Documentation/git-parse-remote.txt
Documentation/git-patch-id.txt
Documentation/git-peek-remote.txt
Documentation/git-prune-packed.txt
Documentation/git-prune.txt
Documentation/git-pull.txt
Documentation/git-push.txt
Documentation/git-quiltimport.txt
Documentation/git-read-tree.txt
Documentation/git-rebase.txt
Documentation/git-receive-pack.txt
Documentation/git-reflog.txt
Documentation/git-relink.txt
Documentation/git-remote.txt
Documentation/git-repack.txt
Documentation/git-request-pull.txt
Documentation/git-rerere.txt
Documentation/git-reset.txt
Documentation/git-rev-list.txt
Documentation/git-rev-parse.txt
Documentation/git-revert.txt
Documentation/git-rm.txt
Documentation/git-send-email.txt
Documentation/git-send-pack.txt
Documentation/git-sh-setup.txt
Documentation/git-shell.txt
Documentation/git-shortlog.txt
Documentation/git-show-branch.txt
Documentation/git-show-index.txt
Documentation/git-show-ref.txt
Documentation/git-show.txt
Documentation/git-stash.txt
Documentation/git-status.txt
Documentation/git-stripspace.txt
Documentation/git-submodule.txt
Documentation/git-svn.txt
Documentation/git-symbolic-ref.txt
Documentation/git-tag.txt
Documentation/git-tar-tree.txt
Documentation/git-unpack-file.txt
Documentation/git-unpack-objects.txt
Documentation/git-update-index.txt
Documentation/git-update-ref.txt
Documentation/git-update-server-info.txt
Documentation/git-upload-archive.txt
Documentation/git-upload-pack.txt
Documentation/git-var.txt
Documentation/git-verify-pack.txt
Documentation/git-verify-tag.txt
Documentation/git-web--browse.txt
Documentation/git-whatchanged.txt
Documentation/git-write-tree.txt
Documentation/git.txt
Documentation/gitattributes.txt
Documentation/gitcli.txt
Documentation/gitcore-tutorial.txt
Documentation/gitcvs-migration.txt
Documentation/gitdiffcore.txt [new file with mode: 0644]
Documentation/gitglossary.txt
Documentation/githooks.txt
Documentation/gitignore.txt
Documentation/gitk.txt
Documentation/gitmodules.txt
Documentation/gitrepository-layout.txt [new file with mode: 0644]
Documentation/gittutorial-2.txt
Documentation/gittutorial.txt
Documentation/howto/setup-git-server-over-http.txt
Documentation/merge-options.txt
Documentation/pretty-formats.txt
Documentation/repository-layout.txt [deleted file]
Documentation/rev-list-options.txt
Documentation/technical/api-path-list.txt
Documentation/technical/api-run-command.txt
Documentation/technical/api-strbuf.txt
Documentation/user-manual.txt
GIT-VERSION-GEN
INSTALL
Makefile
attr.c
builtin-add.c
builtin-cat-file.c
builtin-clone.c
builtin-commit.c
builtin-describe.c
builtin-fast-export.c [changed mode: 0755->0644]
builtin-merge-recursive.c
builtin-name-rev.c
builtin-reflog.c
builtin-remote.c
builtin-rerere.c
builtin.h
cache.h
commit.c
configure.ac
contrib/completion/git-completion.bash
contrib/emacs/git.el
contrib/thunderbird-patch-inline/README [new file with mode: 0644]
contrib/thunderbird-patch-inline/appp.sh [new file with mode: 0755]
date.c
diff.c
git-am.sh
git-compat-util.h
git-cvsimport.perl
git-instaweb.sh
git-merge.sh
git-rebase--interactive.sh
git-send-email.perl
git-submodule.sh
git-svn.perl
git.c
git.spec.in
gitk-git/gitk
gitweb/README
gitweb/gitweb.perl
graph.c
help.c
http-push.c
http.c
path.c
progress.c
remote.c
sha1_file.c
t/.gitattributes
t/README
t/t0003-attributes.sh
t/t1006-cat-file.sh
t/t1301-shared-repo.sh
t/t4126-apply-empty.sh
t/t5505-remote.sh
t/t5510-fetch.sh
t/t5516-fetch-push.sh
t/t6033-merge-crlf.sh [new file with mode: 0755]
t/t6120-describe.sh
t/t7502-commit.sh
t/t9122-git-svn-author.sh
t/test-lib.sh
walker.c
index 2f938f471a647f387355290695d54433def16e46..d8edd904065fbc4bd06365ce378f57d4cd8f9f0d 100644 (file)
@@ -2,7 +2,9 @@
 *.html
 *.[1-8]
 *.made
+*.texi
 git.info
+gitman.info
 howto-index.txt
 doc.dep
 cmds-*.txt
index ca4dadf940a9e0228348c5793beaddcd2483461d..62269e39c4edf95b2cf2e6a60bff2a33b239b07e 100644 (file)
@@ -1,10 +1,12 @@
 MAN1_TXT= \
        $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
                $(wildcard git-*.txt)) \
-       gitk.txt
-MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt
-MAN7_TXT=git.txt gitcli.txt gittutorial.txt gittutorial-2.txt \
-       gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt
+       gitk.txt git.txt
+MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
+       gitrepository-layout.txt
+MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
+       gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
+       gitdiffcore.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
@@ -12,9 +14,7 @@ MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
 
 DOC_HTML=$(MAN_HTML)
 
-ARTICLES = diffcore
-ARTICLES += howto-index
-ARTICLES += repository-layout
+ARTICLES = howto-index
 ARTICLES += everyday
 ARTICLES += git-tools
 # with their own formatting rules.
@@ -139,8 +139,6 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
        $(PERL_PATH) ./cmd-list.perl ../command-list.txt
        date >$@
 
-git.7 git.html: git.txt
-
 clean:
        $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
        $(RM) *.texi *.texi+ git.info gitman.info
diff --git a/Documentation/RelNotes-1.5.5.4.txt b/Documentation/RelNotes-1.5.5.4.txt
new file mode 100644 (file)
index 0000000..2d0279e
--- /dev/null
@@ -0,0 +1,7 @@
+GIT v1.5.5.4 Release Notes
+==========================
+
+Fixes since v1.5.5.4
+--------------------
+
+ * "git name-rev --all" used to segfault.
index 32af18b5723a445b7532d1321bbb79df8b530bf6..e143d8d61be1bb2fac024b5d5f270b33f4f898d4 100644 (file)
@@ -18,6 +18,16 @@ Updates since v1.5.5
 * "git init" now autodetects the case sensitivity of the filesystem and
   sets core.ignorecase accordingly.
 
+* cpio is no longer used; neither "curl" binary (libcurl is still used).
+
+(documentation)
+
+* Many freestanding documentation pages have been converted and made
+  available to "git help" (aka "man git<something>") as section 7 of
+  the manual pages. This means bookmarks to some HTML documentation
+  files may need to be updated (eg "tutorial.html" became
+  "gittutorial.html").
+
 (performance)
 
 * "git clone" was rewritten in C.  This will hopefully help cloning a
@@ -62,7 +72,9 @@ Updates since v1.5.5
   changes (i.e. cannot be used to propagate the whole changes) meant only
   for reviewing.
 
-* "git gc --auto" honors a new pre-aut-gc hook to temporarily disable it.
+* "git init --bare" is a synonym for "git --bare init" now.
+
+* "git gc --auto" honors a new pre-auto-gc hook to temporarily disable it.
 
 * "git log --pretty=tformat:<custom format>" gives a LF after each entry,
   instead of giving a LF between each pair of entries which is how
@@ -84,6 +96,8 @@ Updates since v1.5.5
 * "git svn" learned --add-author-from option to propagate the authorship
   by munging the commit log message.
 
+* new object creation and looking up in "git svn" has been optimized.
+
 * "gitweb" can read from a system-wide configuration file.
 
 (internal)
@@ -98,9 +112,4 @@ Fixes since v1.5.5
 All of the fixes in v1.5.5 maintenance series are included in
 this release, unless otherwise noted.
 
-
---
-exec >/var/tmp/1
-O=v1.5.6-rc0
-echo O=`git describe refs/heads/master`
-git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint
+And there are too numerous small fixes to otherwise note here ;-)
index 0e155c936c25255706bc6d47651c2b336c628417..b1164753e13dbe015d073346bc0b7c992532efe8 100644 (file)
@@ -419,6 +419,11 @@ settings but I haven't tried, yet.
        mail.identity.default.compose_html      => false
        mail.identity.id?.compose_html          => false
 
+(Lukas Sandström)
+
+There is a script in contrib/thunderbird-patch-inline which can help
+you include patches with Thunderbird in an easy way. To use it, do the
+steps above and then use the script as the external editor.
 
 Gnus
 ----
index c11bb7d36c39899d782f8c2d3f87b5a59178840a..5428111d732cb38dbb257ddfa860ebd04088b4e9 100644 (file)
@@ -41,7 +41,8 @@ of lines before or after the line given by <start>.
 -S <revs-file>::
        Use revs from revs-file instead of calling linkgit:git-rev-list[1].
 
--p, --porcelain::
+-p::
+--porcelain::
        Show in a format designed for machine consumption.
 
 --incremental::
@@ -83,5 +84,6 @@ alphanumeric characters that git must detect as moving
 between files for it to associate those lines with the parent
 commit.
 
--h, --help::
+-h::
+--help::
        Show help message.
index e3d8e9faa8c4b64c757080b89f304f78d30fbc17..dbc133cd3c1f19dd507014477e68b8ada78eab5e 100755 (executable)
@@ -11,7 +11,7 @@
        if (s/^\@top (.*)/\@node $1,,,Top/) {
                push @menu, $1;
        }
-       s/\(\@pxref{\[URLS\]}\)//;
+       s/\(\@pxref{\[(URLS|REMOTES)\]}\)//;
        print TMP;
 }
 close TMP;
index 859d67990a62049c2f328dfd676cf21da8ff9a27..572154834b35675ccf56920efd540bf872d1ab25 100644 (file)
@@ -241,4 +241,4 @@ endif::git-format-patch[]
        Do not show any source or destination prefix.
 
 For more detailed explanation on these common options, see also
-link:diffcore.html[diffcore documentation].
+linkgit:gitdiffcore[7][diffcore documentation].
diff --git a/Documentation/diffcore.txt b/Documentation/diffcore.txt
deleted file mode 100644 (file)
index c6a983a..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-Tweaking diff output
-====================
-June 2005
-
-
-Introduction
-------------
-
-The diff commands git-diff-index, git-diff-files, and git-diff-tree
-can be told to manipulate differences they find in
-unconventional ways before showing diff(1) output.  The manipulation
-is collectively called "diffcore transformation".  This short note
-describes what they are and how to use them to produce diff outputs
-that are easier to understand than the conventional kind.
-
-
-The chain of operation
-----------------------
-
-The git-diff-* family works by first comparing two sets of
-files:
-
- - git-diff-index compares contents of a "tree" object and the
-   working directory (when '\--cached' flag is not used) or a
-   "tree" object and the index file (when '\--cached' flag is
-   used);
-
- - git-diff-files compares contents of the index file and the
-   working directory;
-
- - git-diff-tree compares contents of two "tree" objects;
-
-In all of these cases, the commands themselves compare
-corresponding paths in the two sets of files.  The result of
-comparison is passed from these commands to what is internally
-called "diffcore", in a format similar to what is output when
-the -p option is not used.  E.g.
-
-------------------------------------------------
-in-place edit  :100644 100644 bcd1234... 0123456... M file0
-create         :000000 100644 0000000... 1234567... A file4
-delete         :100644 000000 1234567... 0000000... D file5
-unmerged       :000000 000000 0000000... 0000000... U file6
-------------------------------------------------
-
-The diffcore mechanism is fed a list of such comparison results
-(each of which is called "filepair", although at this point each
-of them talks about a single file), and transforms such a list
-into another list.  There are currently 6 such transformations:
-
-- diffcore-pathspec
-- diffcore-break
-- diffcore-rename
-- diffcore-merge-broken
-- diffcore-pickaxe
-- diffcore-order
-
-These are applied in sequence.  The set of filepairs git-diff-\*
-commands find are used as the input to diffcore-pathspec, and
-the output from diffcore-pathspec is used as the input to the
-next transformation.  The final result is then passed to the
-output routine and generates either diff-raw format (see Output
-format sections of the manual for git-diff-\* commands) or
-diff-patch format.
-
-
-diffcore-pathspec: For Ignoring Files Outside Our Consideration
----------------------------------------------------------------
-
-The first transformation in the chain is diffcore-pathspec, and
-is controlled by giving the pathname parameters to the
-git-diff-* commands on the command line.  The pathspec is used
-to limit the world diff operates in.  It removes the filepairs
-outside the specified set of pathnames.  E.g. If the input set
-of filepairs included:
-
-------------------------------------------------
-:100644 100644 bcd1234... 0123456... M junkfile
-------------------------------------------------
-
-but the command invocation was "git-diff-files myfile", then the
-junkfile entry would be removed from the list because only "myfile"
-is under consideration.
-
-Implementation note.  For performance reasons, git-diff-tree
-uses the pathname parameters on the command line to cull set of
-filepairs it feeds the diffcore mechanism itself, and does not
-use diffcore-pathspec, but the end result is the same.
-
-
-diffcore-break: For Splitting Up "Complete Rewrites"
-----------------------------------------------------
-
-The second transformation in the chain is diffcore-break, and is
-controlled by the -B option to the git-diff-* commands.  This is
-used to detect a filepair that represents "complete rewrite" and
-break such filepair into two filepairs that represent delete and
-create.  E.g.  If the input contained this filepair:
-
-------------------------------------------------
-:100644 100644 bcd1234... 0123456... M file0
-------------------------------------------------
-
-and if it detects that the file "file0" is completely rewritten,
-it changes it to:
-
-------------------------------------------------
-:100644 000000 bcd1234... 0000000... D file0
-:000000 100644 0000000... 0123456... A file0
-------------------------------------------------
-
-For the purpose of breaking a filepair, diffcore-break examines
-the extent of changes between the contents of the files before
-and after modification (i.e. the contents that have "bcd1234..."
-and "0123456..." as their SHA1 content ID, in the above
-example).  The amount of deletion of original contents and
-insertion of new material are added together, and if it exceeds
-the "break score", the filepair is broken into two.  The break
-score defaults to 50% of the size of the smaller of the original
-and the result (i.e. if the edit shrinks the file, the size of
-the result is used; if the edit lengthens the file, the size of
-the original is used), and can be customized by giving a number
-after "-B" option (e.g. "-B75" to tell it to use 75%).
-
-
-diffcore-rename: For Detection Renames and Copies
--------------------------------------------------
-
-This transformation is used to detect renames and copies, and is
-controlled by the -M option (to detect renames) and the -C option
-(to detect copies as well) to the git-diff-* commands.  If the
-input contained these filepairs:
-
-------------------------------------------------
-:100644 000000 0123456... 0000000... D fileX
-:000000 100644 0000000... 0123456... A file0
-------------------------------------------------
-
-and the contents of the deleted file fileX is similar enough to
-the contents of the created file file0, then rename detection
-merges these filepairs and creates:
-
-------------------------------------------------
-:100644 100644 0123456... 0123456... R100 fileX file0
-------------------------------------------------
-
-When the "-C" option is used, the original contents of modified files,
-and deleted files (and also unmodified files, if the
-"\--find-copies-harder" option is used) are considered as candidates
-of the source files in rename/copy operation.  If the input were like
-these filepairs, that talk about a modified file fileY and a newly
-created file file0:
-
-------------------------------------------------
-:100644 100644 0123456... 1234567... M fileY
-:000000 100644 0000000... bcd3456... A file0
-------------------------------------------------
-
-the original contents of fileY and the resulting contents of
-file0 are compared, and if they are similar enough, they are
-changed to:
-
-------------------------------------------------
-:100644 100644 0123456... 1234567... M fileY
-:100644 100644 0123456... bcd3456... C100 fileY file0
-------------------------------------------------
-
-In both rename and copy detection, the same "extent of changes"
-algorithm used in diffcore-break is used to determine if two
-files are "similar enough", and can be customized to use
-a similarity score different from the default of 50% by giving a
-number after the "-M" or "-C" option (e.g. "-M8" to tell it to use
-8/10 = 80%).
-
-Note.  When the "-C" option is used with `\--find-copies-harder`
-option, git-diff-\* commands feed unmodified filepairs to
-diffcore mechanism as well as modified ones.  This lets the copy
-detector consider unmodified files as copy source candidates at
-the expense of making it slower.  Without `\--find-copies-harder`,
-git-diff-\* commands can detect copies only if the file that was
-copied happened to have been modified in the same changeset.
-
-
-diffcore-merge-broken: For Putting "Complete Rewrites" Back Together
---------------------------------------------------------------------
-
-This transformation is used to merge filepairs broken by
-diffcore-break, and not transformed into rename/copy by
-diffcore-rename, back into a single modification.  This always
-runs when diffcore-break is used.
-
-For the purpose of merging broken filepairs back, it uses a
-different "extent of changes" computation from the ones used by
-diffcore-break and diffcore-rename.  It counts only the deletion
-from the original, and does not count insertion.  If you removed
-only 10 lines from a 100-line document, even if you added 910
-new lines to make a new 1000-line document, you did not do a
-complete rewrite.  diffcore-break breaks such a case in order to
-help diffcore-rename to consider such filepairs as candidate of
-rename/copy detection, but if filepairs broken that way were not
-matched with other filepairs to create rename/copy, then this
-transformation merges them back into the original
-"modification".
-
-The "extent of changes" parameter can be tweaked from the
-default 80% (that is, unless more than 80% of the original
-material is deleted, the broken pairs are merged back into a
-single modification) by giving a second number to -B option,
-like these:
-
-* -B50/60 (give 50% "break score" to diffcore-break, use 60%
-  for diffcore-merge-broken).
-
-* -B/60 (the same as above, since diffcore-break defaults to 50%).
-
-Note that earlier implementation left a broken pair as a separate
-creation and deletion patches.  This was an unnecessary hack and
-the latest implementation always merges all the broken pairs
-back into modifications, but the resulting patch output is
-formatted differently for easier review in case of such
-a complete rewrite by showing the entire contents of old version
-prefixed with '-', followed by the entire contents of new
-version prefixed with '+'.
-
-
-diffcore-pickaxe: For Detecting Addition/Deletion of Specified String
----------------------------------------------------------------------
-
-This transformation is used to find filepairs that represent
-changes that touch a specified string, and is controlled by the
--S option and the `\--pickaxe-all` option to the git-diff-*
-commands.
-
-When diffcore-pickaxe is in use, it checks if there are
-filepairs whose "original" side has the specified string and
-whose "result" side does not.  Such a filepair represents "the
-string appeared in this changeset".  It also checks for the
-opposite case that loses the specified string.
-
-When `\--pickaxe-all` is not in effect, diffcore-pickaxe leaves
-only such filepairs that touch the specified string in its
-output.  When `\--pickaxe-all` is used, diffcore-pickaxe leaves all
-filepairs intact if there is such a filepair, or makes the
-output empty otherwise.  The latter behaviour is designed to
-make reviewing of the changes in the context of the whole
-changeset easier.
-
-
-diffcore-order: For Sorting the Output Based on Filenames
----------------------------------------------------------
-
-This is used to reorder the filepairs according to the user's
-(or project's) taste, and is controlled by the -O option to the
-git-diff-* commands.
-
-This takes a text file each of whose lines is a shell glob
-pattern.  Filepairs that match a glob pattern on an earlier line
-in the file are output before ones that match a later line, and
-filepairs that do not match any glob pattern are output last.
-
-As an example, a typical orderfile for the core git probably
-would look like this:
-
-------------------------------------------------
-README
-Makefile
-Documentation
-*.h
-*.c
-t
-------------------------------------------------
index b6759114804e89d6f92e48b8dfe4d93b1f8202d0..85c87180db59906f5401eafbe6460f49a60ee9dc 100644 (file)
@@ -1,22 +1,26 @@
--q, \--quiet::
+-q::
+--quiet::
        Pass --quiet to git-fetch-pack and silence any other internally
        used programs.
 
--v, \--verbose::
+-v::
+--verbose::
        Be verbose.
 
--a, \--append::
+-a::
+--append::
        Append ref names and object names of fetched refs to the
        existing contents of `.git/FETCH_HEAD`.  Without this
        option old data in `.git/FETCH_HEAD` will be overwritten.
 
-\--upload-pack <upload-pack>::
+--upload-pack <upload-pack>::
        When given, and the repository to fetch from is handled
        by 'git-fetch-pack', '--exec=<upload-pack>' is passed to
        the command to specify non-default path for the command
        run on the other end.
 
--f, \--force::
+-f::
+--force::
        When `git-fetch` is used with `<rbranch>:<lbranch>`
        refspec, it refuses to update the local branch
        `<lbranch>` unless the remote branch `<rbranch>` it
        overrides that check.
 
 ifdef::git-pull[]
-\--no-tags::
+--no-tags::
 endif::git-pull[]
 ifndef::git-pull[]
--n, \--no-tags::
+-n::
+--no-tags::
 endif::git-pull[]
        By default, tags that point at objects that are downloaded
        from the remote repository are fetched and stored locally.
        This option disables this automatic tag following.
 
--t, \--tags::
+-t::
+--tags::
        Most of the tags are fetched automatically as branch
        heads are downloaded, but tags that do not point at
        objects reachable from the branch heads that are being
@@ -41,10 +47,12 @@ endif::git-pull[]
        flag lets all tags and their associated objects be
        downloaded.
 
--k, \--keep::
+-k::
+--keep::
        Keep downloaded pack.
 
--u, \--update-head-ok::
+-u::
+--update-head-ok::
        By default `git-fetch` refuses to update the head which
        corresponds to the current branch.  This flag disables the
        check.  This is purely for the internal use for `git-pull`
@@ -52,7 +60,7 @@ endif::git-pull[]
        implementing your own Porcelain you are not supposed to
        use it.
 
-\--depth=<depth>::
+--depth=<depth>::
        Deepen the history of a 'shallow' repository created by
        `git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
        by the specified number of commits.
index 1afd0c69ed823f419f52951c3c02dcc50f1a44d1..b8e3fa67598037bc5d0de30818b977048bbada72 100644 (file)
@@ -8,8 +8,9 @@ git-add - Add file contents to the index
 SYNOPSIS
 --------
 [verse]
-'git-add' [-n] [-v] [-f] [--interactive | -i] [--patch | -p] [-u] [--refresh]
-         [--ignore-errors] [--] <filepattern>...
+'git-add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
+         [--update | -u] [--refresh] [--ignore-errors] [--]
+         <filepattern>...
 
 DESCRIPTION
 -----------
@@ -50,27 +51,33 @@ OPTIONS
        and `dir/file2`) can be given to add all files in the
        directory, recursively.
 
--n, \--dry-run::
+-n::
+--dry-run::
         Don't actually add the file(s), just show if they exist.
 
--v, \--verbose::
+-v::
+--verbose::
         Be verbose.
 
 -f::
+--force::
        Allow adding otherwise ignored files.
 
--i, \--interactive::
+-i::
+--interactive::
        Add modified contents in the working tree interactively to
        the index. Optional path arguments may be supplied to limit
        operation to a subset of the working tree. See ``Interactive
        mode'' for details.
 
--p, \--patch::
+-p::
+--patch::
        Similar to Interactive mode but the initial command loop is
        bypassed and the 'patch' subcommand is invoked using each of
        the specified filepatterns before exiting.
 
 -u::
+--update::
        Update only files that git already knows about, staging modified
        content for commit and marking deleted files for removal. This
        is similar
@@ -79,11 +86,11 @@ OPTIONS
        command line. If no paths are specified, all tracked files in the
        current directory and its subdirectories are updated.
 
-\--refresh::
+--refresh::
        Don't add the file(s), but only refresh their stat()
        information in the index.
 
-\--ignore-errors::
+--ignore-errors::
        If some files could not be added because of errors indexing
        them, do not abort the operation, but continue adding the
        others. The command shall still exit with non-zero status.
@@ -100,7 +107,7 @@ Configuration
 The optional configuration variable 'core.excludesfile' indicates a path to a
 file containing patterns of file names to exclude from git-add, similar to
 $GIT_DIR/info/exclude.  Patterns in the exclude file are used in addition to
-those in info/exclude.  See link:repository-layout.html[repository layout].
+those in info/exclude.  See linkgit:gitrepository-layout[5][repository layout].
 
 
 EXAMPLES
@@ -265,4 +272,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 2387a8d6c2472fa87136cd18c0a1145e4dc23bd2..46544a07694a90db908729b6badf92370f37226b 100644 (file)
@@ -28,14 +28,17 @@ OPTIONS
        supply this argument, reads from the standard input. If you supply
        directories, they'll be treated as Maildirs.
 
--s, --signoff::
+-s::
+--signoff::
        Add `Signed-off-by:` line to the commit message, using
        the committer identity of yourself.
 
--k, --keep::
+-k::
+--keep::
        Pass `-k` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
 
--u, --utf8::
+-u::
+--utf8::
        Pass `-u` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
        The proposed commit log message taken from the e-mail
        is re-coded into UTF-8 encoding (configuration variable
@@ -49,13 +52,15 @@ default.   You could use `--no-utf8` to override this.
        Pass `-n` flag to `git-mailinfo` (see
        linkgit:git-mailinfo[1]).
 
--3, --3way::
+-3::
+--3way::
        When the patch does not apply cleanly, fall back on
        3-way merge, if the patch records the identity of blobs
        it is supposed to apply to, and we have those blobs
        available locally.
 
--b, --binary::
+-b::
+--binary::
        Pass `--allow-binary-replacement` flag to `git-apply`
        (see linkgit:git-apply[1]).
 
@@ -64,19 +69,22 @@ default.   You could use `--no-utf8` to override this.
        program that applies
        the patch.
 
--C<n>, -p<n>::
+-C<n>::
+-p<n>::
        These flags are passed to the `git-apply` (see linkgit:git-apply[1])
        program that applies
        the patch.
 
--i, --interactive::
+-i::
+--interactive::
        Run interactively.
 
 --skip::
        Skip the current patch.  This is only meaningful when
        restarting an aborted patch.
 
--r, --resolved::
+-r::
+--resolved::
        After a patch failure (e.g. attempting to apply
        conflicting patch), the user has applied it by hand and
        the index file stores the result of the application.
@@ -153,4 +161,4 @@ Documentation by Petr Baudis, Junio C Hamano and the git-list <git@vger.kernel.o
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 45a6a7251ea7acc88e3036402e11a787a7880d66..da15379ae53046b2c6384e505c9e28595171fa66 100644 (file)
@@ -28,4 +28,4 @@ Written by Ryan Anderson <ryan@michonline.com>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 2dec2ec1cffddfc4ad9f3a5547cc350ab67132c2..c8347637da55e32ec4c637280d7027dc8883c264 100644 (file)
@@ -73,7 +73,8 @@ OPTIONS
 When a pure mode change is encountered (which has no index information),
 the information is read from the current index instead.
 
--R, --reverse::
+-R::
+--reverse::
        Apply the patch in reverse.
 
 --reject::
@@ -124,7 +125,8 @@ discouraged.
        the result with this option, which would apply the
        deletion part but not addition part.
 
---allow-binary-replacement, --binary::
+--allow-binary-replacement::
+--binary::
        Historically we did not allow binary patch applied
        without an explicit permission from the user, and this
        flag was the way to do so.  Currently we always allow binary
@@ -169,7 +171,8 @@ behavior:
        correctly. This option adds support for applying such patches by
        working around this bug.
 
--v, --verbose::
+-v::
+--verbose::
        Report progress to stderr. By default, only a message about the
        current patch being applied will be printed. This option will cause
        additional information to be reported.
@@ -206,4 +209,4 @@ Documentation by Junio C Hamano
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index bd20fd82060613d66734b061e7daca16dbd5dc52..603117c796619ba9c1ed93ae0646bd242cbd37b2 100644 (file)
@@ -117,4 +117,4 @@ Documentation by Junio C Hamano, Martin Langhoff and the git-list <git@vger.kern
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index d3eaa16af122b8f048d09ba6f7ba5a1932f59e80..9b5f3ae5ed8cf6b79545f09d68797490c69f6596 100644 (file)
@@ -36,10 +36,12 @@ OPTIONS
        Format of the resulting archive: 'tar' or 'zip'.  The default
        is 'tar'.
 
---list, -l::
+-l::
+--list::
        Show all available formats.
 
---verbose, -v::
+-v::
+--verbose::
        Report progress to stderr.
 
 --prefix=<prefix>/::
@@ -118,4 +120,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0b8b0ebba758871ac9c79e729664b5057128e9ac..3ca0d330ad06e76d73657189c5f90e0994ba4505 100644 (file)
@@ -85,10 +85,9 @@ Oh, and then after you want to reset to the original head, do a
 $ git bisect reset
 ------------------------------------------------
 
-to get back to the original branch, instead of being in one of the
-bisection branches ("git bisect start" will do that for you too,
-actually: it will reset the bisection state, and before it does that
-it checks that you're not using some old bisection branch).
+to get back to the original branch, instead of being on the bisection
+commit ("git bisect start" will do that for you too, actually: it will
+reset the bisection state).
 
 Bisect visualize
 ~~~~~~~~~~~~~~~~
@@ -283,4 +282,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 14163b65f9d891206335c7cc3369201ccd023a08..8f4fb46685624d07f5940eb973a7fd03aefb5aa0 100644 (file)
@@ -52,12 +52,14 @@ include::blame-options.txt[]
        a certain threshold for git-blame to consider those lines
        of code to have been moved.
 
--f, --show-name::
+-f::
+--show-name::
        Show filename in the original commit.  By default
        filename is shown if there is any line that came from a
        file with different name, due to rename detection.
 
--n, --show-number::
+-n::
+--show-number::
        Show line number in the original commit (Default: off).
 
 -s::
@@ -192,4 +194,4 @@ Written by Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c824d887420754f98db0553a006865d31d01cf1d..0fd58083eb2afdb7fed7ebf01bab3b5e1cae1421 100644 (file)
@@ -95,7 +95,8 @@ OPTIONS
 -a::
        List both remote-tracking branches and local branches.
 
--v, --verbose::
+-v::
+--verbose::
        Show sha1 and commit subject line for each head.
 
 --abbrev=<length>::
@@ -209,4 +210,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 18330cdcd2cda94c9c16c02d70229fa16d4aeb33..f6a06129abfbd79a9cbb2b7d8f2d5902923ef594 100644 (file)
@@ -171,4 +171,4 @@ Written by Mark Levedahl <mdl123@verizon.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f6c394c48240314298dd67716c6d96e6d9704c11..f58013ca605631437e5a4806cdd07dba18d8a982 100644 (file)
@@ -8,6 +8,7 @@ git-cat-file - Provide content or type/size information for repository objects
 
 SYNOPSIS
 --------
+[verse]
 'git-cat-file' [-t | -s | -e | -p | <type>] <object>
 'git-cat-file' [--batch | --batch-check] < <list-of-objects>
 
@@ -103,4 +104,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 290f10f169b55aec37068f170ddf0a2c9a851624..ef16b93982f92dd0bc567a3c9bdeaa7703eeac3a 100644 (file)
@@ -38,4 +38,4 @@ Documentation by James Bowes.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a676880429086a7f65cf3264bf98b379bc9c22ec..c560c0aa6de5d01de7e954b10e3e170b94641d5b 100644 (file)
@@ -52,4 +52,4 @@ refname expressions (see linkgit:git-rev-parse[1]).  Namely:
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index cbbb0b5099ffee234e5773877cd3bb19c7bc4a3d..676203b2ebcc1261dc5ad8d0ab8caa0bc730112c 100644 (file)
@@ -22,21 +22,26 @@ Will copy all files listed from the index to the working directory
 
 OPTIONS
 -------
--u|--index::
+-u::
+--index::
        update stat information for the checked out entries in
        the index file.
 
--q|--quiet::
+-q::
+--quiet::
        be quiet if files exist or are not in the index
 
--f|--force::
+-f::
+--force::
        forces overwrite of existing files
 
--a|--all::
+-a::
+--all::
        checks out all files in the index.  Cannot be used
        together with explicit filenames.
 
--n|--no-create::
+-n::
+--no-create::
        Don't checkout new files, only refresh files already checked
        out.
 
@@ -181,4 +186,4 @@ Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a644173e15da7e3203fa8de8a6cb917f138f93c2..3ad9760a4d6949837c1e186402c9810b59a0138d 100644 (file)
@@ -47,7 +47,8 @@ OPTIONS
        by linkgit:git-check-ref-format[1].  Some of these checks
        may restrict the characters allowed in a branch name.
 
--t, --track::
+-t::
+--track::
        When creating a new branch, set up configuration so that git-pull
        will automatically retrieve data from the start point, which must be
        a branch. Use this if you always pull from the same upstream branch
@@ -215,4 +216,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ca048f46f664a52eb5b0174ff4177eba5b20e702..5ac9cfb0ef2e2eb26ebe5cce6a5c7ed54d4e39ec 100644 (file)
@@ -22,7 +22,8 @@ OPTIONS
        For a more complete list of ways to spell commits, see
        "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
--e|--edit::
+-e::
+--edit::
        With this option, `git-cherry-pick` will let you edit the commit
        message prior to committing.
 
@@ -44,14 +45,16 @@ OPTIONS
        described above, and `-r` was to disable it.  Now the
        default is not to do `-x` so this option is a no-op.
 
--m parent-number|--mainline parent-number::
+-m parent-number::
+--mainline parent-number::
        Usually you cannot cherry-pick a merge because you do not know which
        side of the merge should be considered the mainline.  This
        option specifies the parent number (starting from 1) of
        the mainline and allows cherry-pick to replay the change
        relative to the specified parent.
 
--n|--no-commit::
+-n::
+--no-commit::
        Usually the command automatically creates a commit with
        a commit log message stating which commit was
        cherry-picked.  This flag applies the change necessary
@@ -64,7 +67,8 @@ OPTIONS
 This is useful when cherry-picking more than one commits'
 effect to your working tree in a row.
 
--s|--signoff::
+-s::
+--signoff::
        Add Signed-off-by line at the end of the commit message.
 
 
@@ -78,4 +82,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index d8e0a5b843d8c8d02df2150a05f4d9c5928596f4..ef7caf61e1d344ea447b0b874063cabc0a83fdec 100644 (file)
@@ -72,4 +72,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index aca1d75e50d1e933d616f392b576acb202f5d3e6..09108d0e6617fd3b2383ec48cd48fe921ed98a29 100644 (file)
@@ -29,4 +29,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5e9da036ba5ce14c0b7fb6f1b9ff8389af4770e4..37a82ee4b8ed2dc939e56140821a42d452e1b4b5 100644 (file)
@@ -30,9 +30,11 @@ OPTIONS
        git-clean will refuse to run unless given -f or -n.
 
 -n::
+--dry-run::
        Don't actually remove anything, just show what would be done.
 
 -q::
+--quiet::
        Be quiet, only report errors, but not the files that are
        successfully removed.
 
@@ -54,4 +56,4 @@ Written by Pavel Roskin <proski@gnu.org>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 9b564420c53e33616c605b6564e2f1f227725805..7973e6af4c2aa31ea9ae9b91b4c4cd5ee2256762 100644 (file)
@@ -205,4 +205,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 700840d41fad963cca14ea00052dae341788ab92..728c2fae892f0a4a66e9fb1854a7e31f4a5f4917 100644 (file)
@@ -103,4 +103,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c3c9f5b9021e60f815d41a0454b0238865251175..7e8b4ff72c0192f01523118b9a8caeddbcbda09c 100644 (file)
@@ -8,9 +8,9 @@ git-commit - Record changes to the repository
 SYNOPSIS
 --------
 [verse]
-'git-commit' [-a | --interactive] [-s] [-v] [-u]
-          [(-c | -C) <commit> | -F <file> | -m <msg> | --amend]
-          [--allow-empty] [--no-verify] [-e] [--author <author>]
+'git-commit' [-a | --interactive] [-s] [-v] [-u] [--amend]
+          [(-c | -C) <commit>] [-F <file> | -m <msg>]
+          [--allow-empty] [--no-verify] [-e] [--author=<author>]
           [--cleanup=<mode>] [--] [[-i | -o ]<file>...]
 
 DESCRIPTION
@@ -52,39 +52,49 @@ that, you can recover from it with linkgit:git-reset[1].
 
 OPTIONS
 -------
--a|--all::
+-a::
+--all::
        Tell the command to automatically stage files that have
        been modified and deleted, but new files you have not
        told git about are not affected.
 
--c or -C <commit>::
-       Take existing commit object, and reuse the log message
+-C <commit>::
+--reuse-message=<commit>::
+       Take an existing commit object, and reuse the log message
        and the authorship information (including the timestamp)
-       when creating the commit.  With '-C', the editor is not
-       invoked; with '-c' the user can further edit the commit
-       message.
+       when creating the commit.
+
+-c <commit>::
+--reedit-message=<commit>::
+       Like '-C', but with '-c' the editor is invoked, so that
+       the user can further edit the commit message.
 
 -F <file>::
+--file=<file>::
        Take the commit message from the given file.  Use '-' to
        read the message from the standard input.
 
---author <author>::
+--author=<author>::
        Override the author name used in the commit.  Use
        `A U Thor <author@example.com>` format.
 
--m <msg>|--message=<msg>::
+-m <msg>::
+--message=<msg>::
        Use the given <msg> as the commit message.
 
--t <file>|--template=<file>::
+-t <file>::
+--template=<file>::
        Use the contents of the given file as the initial version
        of the commit message. The editor is invoked and you can
        make subsequent changes. If a message is specified using
        the `-m` or `-F` options, this option has no effect. This
        overrides the `commit.template` configuration variable.
 
--s|--signoff::
+-s::
+--signoff::
        Add Signed-off-by line at the end of the commit message.
 
+-n::
 --no-verify::
        This option bypasses the pre-commit and commit-msg hooks.
        See also linkgit:githooks[5][hooks].
@@ -105,14 +115,14 @@ OPTIONS
        'whitespace' removes just leading/trailing whitespace lines
        and 'strip' removes both whitespace and commentary.
 
--e|--edit::
+-e::
+--edit::
        The message taken from file with `-F`, command line with
        `-m`, and from file with `-C` are usually used as the
        commit log message unmodified.  This option lets you
        further edit the message taken from these sources.
 
 --amend::
-
        Used to amend the tip of the current branch. Prepare the tree
        object you would want to replace the latest commit as usual
        (this includes the usual -i/-o and explicit paths), and the
@@ -133,13 +143,15 @@ It is a rough equivalent for:
 but can be used to amend a merge commit.
 --
 
--i|--include::
+-i::
+--include::
        Before making a commit out of staged contents so far,
        stage the contents of paths given on the command line
        as well.  This is usually not what you want unless you
        are concluding a conflicted merge.
 
--o|--only::
+-o::
+--only::
        Make a commit only from the paths specified on the
        command line, disregarding any contents that have been
        staged so far. This is the default mode of operation of
@@ -150,20 +162,23 @@ but can be used to amend a merge commit.
        the last commit without committing changes that have
        already been staged.
 
--u|--untracked-files::
+-u::
+--untracked-files::
        Show all untracked files, also those in uninteresting
        directories, in the "Untracked files:" section of commit
        message template.  Without this option only its name and
        a trailing slash are displayed for each untracked
        directory.
 
--v|--verbose::
+-v::
+--verbose::
        Show unified diff between the HEAD commit and what
        would be committed at the bottom of the commit message
        template.  Note that this diff output doesn't have its
        lines prefixed with '#'.
 
--q|--quiet::
+-q::
+--quiet::
        Suppress commit summary message.
 
 \--::
@@ -312,4 +327,4 @@ Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5de5d051b7917daabd0ef7c0681c6b75307a931a..c90421ee7f3b6a3fe1f08c4868b5652d4d7db569 100644 (file)
@@ -101,7 +101,8 @@ rather than from all available files.
 +
 See also <<FILES>>.
 
--f config-file, --file config-file::
+-f config-file::
+--file config-file::
        Use the given config file instead of the one specified by GIT_CONFIG.
 
 --remove-section::
@@ -116,7 +117,8 @@ See also <<FILES>>.
 --unset-all::
        Remove all lines matching the key from config file.
 
--l, --list::
+-l::
+--list::
        List all variables set in config file.
 
 --bool::
@@ -128,7 +130,8 @@ See also <<FILES>>.
        in the config file will cause the value to be multiplied
        by 1024, 1048576, or 1073741824 prior to output.
 
--z, --null::
+-z::
+--null::
        For all options that output values and/or keys, always
        end values with the null character (instead of a
        newline). Use newline instead as a delimiter between
@@ -334,4 +337,4 @@ Documentation by Johannes Schindelin, Petr Baudis and the git-list <git@vger.ker
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 7fb08e93485b9e4bf0a1e249944ab814b00abb27..1ba85a259a2d8896b5634f3496542b5561dbf2de 100644 (file)
@@ -18,6 +18,7 @@ them, to help you decide when it is a good time to repack.
 OPTIONS
 -------
 -v::
+--verbose::
        In addition to the number of loose objects and disk
        space consumed, it reports the number of in-pack
        objects, number of packs, and number of objects that can be
@@ -34,4 +35,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f75afaaadc435653822d7851a5bec5a774ff10a3..5fa91e51ad70c3fed2bf3170bf14268f410aec5f 100644 (file)
@@ -117,4 +117,4 @@ Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 58eefd42e504cf34178719080fd4f75a0b9ea621..2f9b35f6229143f566f31e1ef6de290572181608 100644 (file)
@@ -170,4 +170,4 @@ Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a33382ec2d0baf89c57d65f246fcbe50630b676c..3310ae25ff75c302e6b9088a0807aee340ad69c7 100644 (file)
@@ -41,10 +41,13 @@ Don't allow recursing into subdirectories
 Don't check for `gitcvs.enabled` in config. You also have to specify a list
 of allowed directories (see below) if you want to use this option.
 
---version, -V::
+-V::
+--version::
 Print version information and exit
 
---help, -h, -H::
+-h::
+-H::
+--help::
 Print usage information and exit
 
 <directory>::
@@ -352,4 +355,4 @@ Documentation by Martyn Smith <martyn@catalyst.net.nz>, Martin Langhoff <martin@
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index cf261dd40d98a95d8eda4ee1008451ca67029bd3..344f24ea59a7f85473da4e865219bcdc0fb9db33 100644 (file)
@@ -103,7 +103,8 @@ OPTIONS
        Log to syslog instead of stderr. Note that this option does not imply
        --verbose, thus by default only error conditions will be logged.
 
---user-path, --user-path=path::
+--user-path::
+--user-path=path::
        Allow ~user notation to be used in requests.  When
        specified with no parameter, requests to
        git://host/~alice/foo is taken as a request to access
@@ -127,7 +128,8 @@ OPTIONS
        Save the process id in 'file'.  Ignored when the daemon
        is run under `--inetd`.
 
---user=user, --group=group::
+--user=user::
+--group=group::
        Change daemon's uid and gid before entering the service loop.
        When only `--user` is given without `--group`, the
        primary group ID for the user is used.  The values of
@@ -138,14 +140,16 @@ Giving these options is an error when used with `--inetd`; use
 the facility of inet daemon to achieve the same before spawning
 `git-daemon` if needed.
 
---enable=service, --disable=service::
+--enable=service::
+--disable=service::
        Enable/disable the service site-wide per default.  Note
        that a service disabled site-wide can still be enabled
        per repository if it is marked overridable and the
        repository enables the service with an configuration
        item.
 
---allow-override=service, --forbid-override=service::
+--allow-override=service::
+--forbid-override=service::
        Allow/forbid overriding the site-wide default with per
        repository configuration.  By default, all the services
        are overridable.
@@ -272,4 +276,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 69e1ab750d99defc98f671317ae6ae65debd92b0..9f6f4831864a3112119bc7d7fec22aa7a72225e5 100644 (file)
@@ -70,6 +70,9 @@ OPTIONS
        Only consider tags matching the given pattern (can be used to avoid
        leaking private tags made from the repository).
 
+--always::
+       Show uniquely abbreviated commit object as fallback.
+
 EXAMPLES
 --------
 
@@ -142,4 +145,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ca1bb6a8ee9ccb6ffa5a01c7e13af7c8caa83cdf..8a64869d2705071afe3d1a122b6b85a086413a0a 100644 (file)
@@ -30,7 +30,8 @@ The default is to diff against our branch (-2) and the
 cleanly resolved paths.  The option -0 can be given to
 omit diff output for unmerged entries and just show "Unmerged".
 
--c,--cc::
+-c::
+--cc::
        This compares stage 2 (our branch), stage 3 (their
        branch) and the working tree file and outputs a combined
        diff, similar to the way 'diff-tree' shows a merge
@@ -54,4 +55,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index e8677785902009fadd391b37974c8bc16f2c89c0..f6e844fe61f66c02a448e7d8e48e9fecc6393bd0 100644 (file)
@@ -129,4 +129,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 58d02c6a20d324c4cec90cf06be5a1b04f569043..56caeb2d26f2f8eab1234be6f146201ded5b098a 100644 (file)
@@ -165,4 +165,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 57c28628bbfb86b7fa190f7530583fc6ac665d9e..7acd428964a9e6ffc4b876ce01731c1daf3a72bc 100644 (file)
@@ -168,4 +168,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 6dac475a0be0a259895e6407279689dffb6b5708..332346cc5dfd7fffa3e80ad6ca6b413bbbfdb0c2 100644 (file)
@@ -80,4 +80,4 @@ Documentation by Johannes E. Schindelin <johannes.schindelin@gmx.de>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c29a4f8126442e06873eab18c96a093c6bd9f373..395c055f9571bfe66edd335ca84ac2c515ad2b86 100644 (file)
@@ -1119,4 +1119,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 57598eb0566c8eabc3537fb67b7841c65bcf5c2c..282fcaf17fed50ac51129dde8fcf105c1b9c11d9 100644 (file)
@@ -28,30 +28,32 @@ have a common ancestor commit.
 
 OPTIONS
 -------
-\--all::
+--all::
        Fetch all remote refs.
 
-\--quiet, \-q::
+-q::
+--quiet::
        Pass '-q' flag to 'git-unpack-objects'; this makes the
        cloning process less verbose.
 
-\--keep, \-k::
+-k::
+--keep::
        Do not invoke 'git-unpack-objects' on received data, but
        create a single packfile out of it instead, and store it
        in the object database. If provided twice then the pack is
        locked against repacking.
 
-\--thin::
+--thin::
        Spend extra cycles to minimize the number of objects to be sent.
        Use it on slower connection.
 
-\--include-tag::
+--include-tag::
        If the remote side supports it, annotated tags objects will
        be downloaded on the same connection as the other objects if
        the object the tag references is downloaded.  The caller must
        otherwise determine the tags this option made available.
 
-\--upload-pack=<git-upload-pack>::
+--upload-pack=<git-upload-pack>::
        Use this to specify the path to 'git-upload-pack' on the
        remote side, if is not found on your $PATH.
        Installations of sshd ignores the user's environment
@@ -63,16 +65,16 @@ OPTIONS
        shells by having a lean .bashrc file (they set most of
        the things up in .bash_profile).
 
-\--exec=<git-upload-pack>::
+--exec=<git-upload-pack>::
        Same as \--upload-pack=<git-upload-pack>.
 
-\--depth=<n>::
+--depth=<n>::
        Limit fetching to ancestor-chains not longer than n.
 
-\--no-progress::
+--no-progress::
        Do not show the progress.
 
-\-v::
+-v::
        Run verbosely.
 
 <host>::
@@ -99,4 +101,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index d982f961fc5111ce0e37dd571530652fca147d01..489b2b17e69c0a0f6b2df0ce4b2da6f38f809546 100644 (file)
@@ -53,4 +53,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 506c37af7021e2e16caab5ffe72bca9bc2f28927..ea77f1fce505fbb9c1691f7e75aa014e7a1d5be5 100644 (file)
@@ -113,7 +113,7 @@ OPTIONS
        stdin.  The commit id is expected on stdout.
 +
 As a special extension, the commit filter may emit multiple
-commit ids; in that case, ancestors of the original commit will
+commit ids; in that case, the rewritten children of the original commit will
 have all of them as parents.
 +
 You can use the 'map' convenience function in this filter, and other
@@ -161,7 +161,8 @@ to other tags will be rewritten to point to the underlying commit.
        does this in the '.git-rewrite/' directory but you can override
        that choice by this parameter.
 
--f|--force::
+-f::
+--force::
        `git filter-branch` refuses to start with an existing temporary
        directory or when there are already refs starting with
        'refs/original/', unless forced.
@@ -317,4 +318,4 @@ Documentation by Petr Baudis and the git list.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 457cf425619dc1680fae510aceb20574b02be602..2a7cfb980b7f0b6fa2bd741b3601467f07025691 100644 (file)
@@ -33,11 +33,13 @@ OPTIONS
        Do not list one-line descriptions from the actual commits being
        merged.
 
---summary,--no-summary::
+--summary::
+--no-summary::
        Synonyms to --log and --no-log; these are deprecated and will be
        removed in the future.
 
---file <file>, -F <file>::
+-F <file>::
+--file <file>::
        Take the list of merged objects from <file> instead of
        stdin.
 
@@ -67,4 +69,4 @@ Documentation by Petr Baudis, Junio C Hamano and the git-list <git@vger.kernel.o
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f1f90cca62f61327a13b5ab41862596ca24a9b8f..b347bfbb14784a4292124a4575086411a4697527 100644 (file)
@@ -8,9 +8,8 @@ git-for-each-ref - Output information on each ref
 SYNOPSIS
 --------
 [verse]
-'git-for-each-ref' [--count=<count>]\*
-                   [--shell|--perl|--python|--tcl]
-                   [--sort=<key>]\* [--format=<format>] [<pattern>]
+'git-for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
+                  [--sort=<key>]\* [--format=<format>] [<pattern>...]
 
 DESCRIPTION
 -----------
@@ -32,8 +31,9 @@ OPTIONS
 <key>::
        A field name to sort on.  Prefix `-` to sort in
        descending order of the value.  When unspecified,
-       `refname` is used.  More than one sort keys can be
-       given.
+       `refname` is used.  You may use the --sort=<key> option
+       multiple times, in which case the last key becomes the primary
+       key.
 
 <format>::
        A string that interpolates `%(fieldname)` from the
@@ -48,11 +48,15 @@ OPTIONS
        `%09` to `\t` (TAB) and `%0a` to `\n` (LF).
 
 <pattern>::
-       If given, the name of the ref is matched against this
-       using fnmatch(3).  Refs that do not match the pattern
-       are not shown.
-
---shell, --perl, --python, --tcl::
+       If one or more patterns are given, only refs are shown that
+       match againt at least one pattern, either using fnmatch(3) or
+       literally, in the latter case matching completely or from the
+       beginning up to a slash.
+
+--shell::
+--perl::
+--python::
+--tcl::
        If given, strings that substitute `%(fieldname)`
        placeholders are quoted as string literals suitable for
        the specified host language.  This is meant to produce
index fefcd269c6658903f892a3356431599790a0f844..4dafa39a9211d9d35498f4c88418713b1aa33284 100644 (file)
@@ -74,14 +74,17 @@ include::diff-options.txt[]
 -<n>::
        Limits the number of patches to prepare.
 
--o|--output-directory <dir>::
+-o <dir>::
+--output-directory <dir>::
        Use <dir> to store the resulting files, instead of the
        current working directory.
 
--n|--numbered::
+-n::
+--numbered::
        Name output in '[PATCH n/m]' format.
 
--N|--no-numbered::
+-N::
+--no-numbered::
        Name output in '[PATCH]' format.
 
 --start-number <n>::
@@ -92,11 +95,13 @@ include::diff-options.txt[]
        without the default first line of the commit appended.
        Mutually exclusive with the --stdout option.
 
--k|--keep-subject::
+-k::
+--keep-subject::
        Do not strip/add '[PATCH]' from the first line of the
        commit log message.
 
--s|--signoff::
+-s::
+--signoff::
        Add `Signed-off-by:` line to the commit message, using
        the committer identity of yourself.
 
@@ -238,4 +243,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 4cc26fb744e892115d8bfa099e48acc102a8689b..9846c859cf3f4c76525aae124e0ef516fa55779f 100644 (file)
@@ -151,4 +151,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f4097007ff3a2b0a2fe915a1078df96ba7f9e49a..6ace615d807e3afe91800094e13797fc15d2bae4 100644 (file)
@@ -132,4 +132,4 @@ Written by Shawn O. Pearce <spearce@spearce.org>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index dea41490c4415537ca4f87d182873e9dd218963a..c13bf98697e8e4aef236583f1dbcab21780b5013 100644 (file)
@@ -33,4 +33,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a97f0557f4aa6cf1d795470d7bbe94ce35abc56a..1b646b73f069e72bc6faa3a058d61ace77c9934c 100644 (file)
@@ -33,25 +33,30 @@ OPTIONS
        Instead of searching in the working tree files, check
        the blobs registered in the index file.
 
--a | --text::
+-a::
+--text::
        Process binary files as if they were text.
 
--i | --ignore-case::
+-i::
+--ignore-case::
        Ignore case differences between the patterns and the
        files.
 
 -I::
        Don't match the pattern in binary files.
 
--w | --word-regexp::
+-w::
+--word-regexp::
        Match the pattern only at word boundary (either begin at the
        beginning of a line, or preceded by a non-word character; end at
        the end of a line or followed by a non-word character).
 
--v | --invert-match::
+-v::
+--invert-match::
        Select non-matching lines.
 
--h | -H::
+-h::
+-H::
        By default, the command shows the filename for each
        match.  `-h` option is used to suppress this output.
        `-H` is there for completeness and does not do anything
@@ -64,24 +69,33 @@ OPTIONS
        option forces paths to be output relative to the project
        top directory.
 
--E | --extended-regexp | -G | --basic-regexp::
+-E::
+--extended-regexp::
+-G::
+--basic-regexp::
        Use POSIX extended/basic regexp for patterns.  Default
        is to use basic regexp.
 
--F | --fixed-strings::
+-F::
+--fixed-strings::
        Use fixed strings for patterns (don't interpret pattern
        as a regex).
 
 -n::
        Prefix the line number to matching lines.
 
--l | --files-with-matches | --name-only | -L | --files-without-match::
+-l::
+--files-with-matches::
+--name-only::
+-L::
+--files-without-match::
        Instead of showing every matched line, show only the
        names of files that contain (or do not contain) matches.
        For better compatibility with git-diff, --name-only is a
        synonym for --files-with-matches.
 
--c | --count::
+-c::
+--count::
        Instead of showing every matched line, show the number of
        lines that match.
 
@@ -103,7 +117,10 @@ OPTIONS
        scripts passing user input to grep.  Multiple patterns are
        combined by 'or'.
 
---and | --or | --not | ( | )::
+--and::
+--or::
+--not::
+( ... )::
        Specify how multiple patterns are combined using Boolean
        expressions.  `--or` is the default operator.  `--and` has
        higher precedence than `--or`.  `-e` has to be used for all
@@ -145,4 +162,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index bd5fe67b32f396ed53e11370d6e8d35819d049d4..105397f2bdb6c947498d27e9926dbbe6e069056d 100644 (file)
@@ -112,4 +112,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 99a21434b53a40a1b317e9d3da1728ca22d76b53..cf3dce8a4a77d480a719260b7c8549c16f7c8e17 100644 (file)
@@ -45,4 +45,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index bfbba9e235495b0a7e31b4d3ed558bef105ad02d..faecd6bb907b9622aa0a6a3a9fab2665c867354e 100644 (file)
@@ -28,15 +28,18 @@ former is internally converted into the latter.
 
 OPTIONS
 -------
--a|--all::
+-a::
+--all::
        Prints all the available commands on the standard output. This
        option supersedes any other option.
 
--i|--info::
+-i::
+--info::
        Display manual page for the command in the 'info' format. The
        'info' program will be used for that purpose.
 
--m|--man::
+-m::
+--man::
        Display manual page for the command in the 'man' format. This
        option may be used to override a value set in the
        'help.format' configuration variable.
@@ -45,7 +48,8 @@ By default the 'man' program will be used to display the manual page,
 but the 'man.viewer' configuration variable may be used to choose
 other display programs (see below).
 
--w|--web::
+-w::
+--web::
        Display manual page for the command in the 'web' (HTML)
        format. A web browser will be used for that purpose.
 +
@@ -172,10 +176,10 @@ Written by Junio C Hamano <gitster@pobox.com> and the git-list
 
 Documentation
 -------------
-Initial documentation was part of the linkgit:git[7] man page.
+Initial documentation was part of the linkgit:git[1] man page.
 Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
 little. Maintenance is done by the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index b784a9d07ed284c4e39b374e1b52c0cb5ee9f417..70fb635291876e20acbc75451c875dcecffa9056 100644 (file)
@@ -53,4 +53,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0b827223429f61ebd7fff7a1ab85ab6d25dda04a..d69b20549bf956a5c7c3f64f5315a17ec71af038 100644 (file)
@@ -15,8 +15,8 @@ DESCRIPTION
 Sends missing objects to remote repository, and updates the
 remote branch.
 
-*NOTE*: This command is temporarily disabled if your cURL
-library is older than 7.16, as the combination has been reported
+*NOTE*: This command is temporarily disabled if your libcurl
+is older than 7.16, as the combination has been reported
 not to work and sometimes corrupts repository.
 
 OPTIONS
@@ -40,7 +40,8 @@ OPTIONS
        Report the list of objects being walked locally and the
        list of objects successfully sent to the remote repository.
 
--d, -D::
+-d::
+-D::
        Remove <ref> from remote repository.  The specified branch
        cannot be the remote HEAD.  If -d is specified the following
        other conditions must also be met:
@@ -101,4 +102,4 @@ Documentation by Nick Hengeveld
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 522b73c12f4a5336c45882826d5599fe807590df..f4fdc242839d52ea97a32780526b133655ef9762 100644 (file)
@@ -59,4 +59,4 @@ Documentation by Mike McCormack
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a7825b6144b67d486b5b81be0217b57db5197e65..6409363ae5e80264b5b45d50bd9a0180ec68e05b 100644 (file)
@@ -100,4 +100,4 @@ Documentation by Sergey Vlasov
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index b48c31289923345d8f50342780d30dbcb4e01399..792643c80916f4b72704f046c0de89d8d55fa17c 100644 (file)
@@ -16,7 +16,8 @@ OPTIONS
 
 --
 
--q, \--quiet::
+-q::
+--quiet::
 
 Only print error and warning messages, all other output will be suppressed.
 
@@ -122,4 +123,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 51f1532ef7ce34786ec0dcae32b9e60b710cc9c4..7da5b8d9a9af04a5bf2188523587b086301bfd67 100644 (file)
@@ -20,24 +20,29 @@ repository.
 OPTIONS
 -------
 
--l|--local::
+-l::
+--local::
        Only bind the web server to the local IP (127.0.0.1).
 
--d|--httpd::
+-d::
+--httpd::
        The HTTP daemon command-line that will be executed.
        Command-line options may be specified here, and the
        configuration file will be added at the end of the command-line.
        Currently lighttpd, apache2 and webrick are supported.
        (Default: lighttpd)
 
--m|--module-path::
+-m::
+--module-path::
        The module path (only needed if httpd is Apache).
        (Default: /usr/lib/apache2/modules)
 
--p|--port::
+-p::
+--port::
        The port number to bind the httpd to.  (Default: 1234)
 
--b|--browser::
+-b::
+--browser::
        The web browser that should be used to view the gitweb
        page. This will be passed to the 'git-web--browse' helper
        script along with the URL of the gitweb instance. See
@@ -86,4 +91,4 @@ Documentation by Eric Wong <normalperson@yhbt.net>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ebaee4b3348ce9f7a4fcac6d9726a0251c51df72..db61bc96c7e23132c41bb75724d669a6224a3d76 100644 (file)
@@ -112,4 +112,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index b1c797f1097b4d89eb2ef7eefd5726bc840428fc..4dc475e0de14ea5daf8594f023dd6f6d1993c867 100644 (file)
@@ -78,4 +78,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 4be45b001a0794b7955b9a4c1848c41dbea26e27..560594e25fdb4ef73aaaba55576c41d704f9ef8b 100644 (file)
@@ -30,23 +30,29 @@ shown:
 
 OPTIONS
 -------
--c|--cached::
+-c::
+--cached::
        Show cached files in the output (default)
 
--d|--deleted::
+-d::
+--deleted::
        Show deleted files in the output
 
--m|--modified::
+-m::
+--modified::
        Show modified files in the output
 
--o|--others::
+-o::
+--others::
        Show other files in the output
 
--i|--ignored::
+-i::
+--ignored::
        Show ignored files in the output.
        Note that this also reverses any exclude list present.
 
--s|--stage::
+-s::
+--stage::
        Show stage files in the output
 
 --directory::
@@ -56,10 +62,12 @@ OPTIONS
 --no-empty-directory::
        Do not list empty directories. Has no effect without --directory.
 
--u|--unmerged::
+-u::
+--unmerged::
        Show unmerged files in the output (forces --stage)
 
--k|--killed::
+-k::
+--killed::
        Show files on the filesystem that need to be removed due
        to file/directory conflicts for checkout-index to
        succeed.
@@ -67,11 +75,13 @@ OPTIONS
 -z::
        \0 line termination on output.
 
--x|--exclude=<pattern>::
+-x <pattern>::
+--exclude=<pattern>::
        Skips files matching pattern.
        Note that pattern is a shell wildcard pattern.
 
--X|--exclude-from=<file>::
+-X <file>::
+--exclude-from=<file>::
        exclude patterns are read from <file>; 1 per line.
 
 --exclude-per-directory=<file>::
@@ -192,4 +202,4 @@ Documentation by David Greaves, Junio C Hamano, Josh Triplett, and the git-list
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c5ba0aad13c35f63da821192f6ae3fa1f81e9e32..f92f3ca1860f9d3e0d5b3f21674a9c2baf61b4d9 100644 (file)
@@ -20,13 +20,17 @@ commit IDs.
 
 OPTIONS
 -------
--h|--heads, -t|--tags::
+-h::
+--heads::
+-t::
+--tags::
        Limit to only refs/heads and refs/tags, respectively.
        These options are _not_ mutually exclusive; when given
        both, references stored in refs/heads and refs/tags are
        displayed.
 
--u <exec>, --upload-pack=<exec>::
+-u <exec>::
+--upload-pack=<exec>::
        Specify the full path of linkgit:git-upload-pack[1] on the remote
        host. This allows listing references from repositories accessed via
        SSH and where the SSH daemon does not use the PATH configured by the
@@ -69,4 +73,4 @@ Written by Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 360c0a1b98698a8532ceb4969831d1038fde9acc..d9881fbbbedb84f400bf0b630dcb60acd5ad4e9e 100644 (file)
@@ -91,4 +91,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 3846f0e6ebc7f7eb1144e7bfcf50690bd3257a68..183dc1dd75c1268b199257496ac778e0d5dd7743 100644 (file)
@@ -66,4 +66,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 8243f691138be33c6d9d037a15fabc6786ab385f..9a2aedd480c24018d12bde419b69f865be2b8825 100644 (file)
@@ -27,7 +27,7 @@ OPTIONS
        Root of the Maildir to split. This directory should contain the cur, tmp
        and new subdirectories.
 
-<directory>::
+-o<directory>::
        Directory in which to place the individual messages.
 
 -b::
@@ -55,4 +55,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 07f78b4ae090a8d3d4b717dc64e84d6067218e5f..bbe85123977e3fc11abc2fc9f16489215b4bd7a3 100644 (file)
@@ -39,4 +39,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c513184ba07ae83073232cc54a0007a3cda66412..149f1310519bb5b732fca0926f786f80a153f8da 100644 (file)
@@ -89,4 +89,4 @@ with parts copied from the original documentation of RCS merge.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 19ee017aede4bf8fa0a0046b2bf347e3d75c4a12..a0ead2bbf33d7b244ec94e6f7dc06c062e52cb8d 100644 (file)
@@ -84,4 +84,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ee95df3bc07874bb74b77899f113830b943066f6..5c9ce641ec814a980b9a5d32291cccba32a0cc8b 100644 (file)
@@ -26,4 +26,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 4cc0964e78b0719e0711214943f2ae2824cdbcce..b785e0f6e0c02ef688d4c6a60e19939aafd1a8d3 100644 (file)
@@ -33,4 +33,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ef1f055c8574e928c8e05c820f2f1cc962e3d422..55bc3674797366496d7c1ca1f5b6564b06c01de1 100644 (file)
@@ -168,4 +168,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 8ed44947ef877d2f960b1506a39ab0c166cce514..83525609c6ff3e4d82c9e8021b3107517c682496 100644 (file)
@@ -70,4 +70,4 @@ Documentation by Theodore Y Ts'o.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 82db9f5d8fa060bfbb19dabf8d2a6f3fb4db5c42..232bc1a338468274f4304bea684f148b5b58aee8 100644 (file)
@@ -43,4 +43,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f312036ab5deb645ce45b83e47c83605c34b83a6..1ddbf00afccf93d2c31d3c6d0deabd82ff4fe779 100644 (file)
@@ -31,4 +31,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index bff3fbe7459dec090ddb5e5df5ff94cf4b030046..339190600a292eca9b56771316118481236d46fb 100644 (file)
@@ -34,7 +34,8 @@ OPTIONS
        condition. An error happens when a source is neither existing nor
         controlled by GIT, or when it would overwrite an existing
         file unless '-f' is given.
--n, \--dry-run::
+-n::
+--dry-run::
        Do nothing; only show what would happen
 
 
@@ -50,4 +51,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index efcabdc27267a80827d9cc22649e6855e3ce3ae9..ffac3f8f564bf5f5e2ca317b986db9b01f5dc026 100644 (file)
@@ -41,6 +41,13 @@ OPTIONS
        of linkgit:git-describe[1] more closely.  This option
        cannot be combined with --stdin.
 
+--no-undefined::
+       Die with error code != 0 when a reference is undefined,
+       instead of printing `undefined`.
+
+--always::
+       Show uniquely abbreviated commit object as fallback.
+
 EXAMPLE
 -------
 
@@ -75,4 +82,4 @@ Documentation by Johannes Schindelin.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 35d1856b55edc9feb87eb162a56ffd7c9fe15f2f..f4d8d68e34b223f6ed06bceca706f9b91232c15f 100644 (file)
@@ -79,7 +79,8 @@ base-name::
        reference was included in the resulting packfile.  This
        can be useful to send new tags to native git clients.
 
---window=[N], --depth=[N]::
+--window=[N]::
+--depth=[N]::
        These two options affect how the objects contained in
        the pack are stored using delta compression.  The
        objects are first internally sorted by type, size and
@@ -208,4 +209,4 @@ linkgit:git-prune-packed[1]
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c7bc7b33625d6d8f11826a95046375a25e8e82e2..6737326f0b63108a9ecbd746824363e20f9a2ae2 100644 (file)
@@ -54,4 +54,4 @@ linkgit:git-prune-packed[1]
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index e4ff93471186533a6ce2084ee710deee71ad2aab..c0718468d563e7ee5f8bd37c5f583ec7dc9d3d62 100644 (file)
@@ -42,7 +42,7 @@ unpacked.
 OPTIONS
 -------
 
-\--all::
+--all::
 
 The command by default packs all tags and refs that are already
 packed, and leaves other refs
@@ -51,7 +51,7 @@ developed and packing their tips does not help performance.
 This option causes branch tips to be packed as well.  Useful for
 a repository with many branches of historical interests.
 
-\--no-prune::
+--no-prune::
 
 The command usually removes loose refs under `$GIT_DIR/refs`
 hierarchy after packing them.  This option tells it not to.
@@ -63,4 +63,4 @@ Written by Linus Torvalds <torvalds@osdl.org>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index deb8b2f01e7f31112e595e521ece27836b0b6885..951dbd6c830a15cafaa7281cb1c6de357d97b4cc 100644 (file)
@@ -47,4 +47,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 894852a78b9c63e0be80af2c3b86c22f998a2b01..bb8a079254e7fed097504cd181eee71a888d2280 100644 (file)
@@ -39,4 +39,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0001710072c5f0f708323d99e1bb632d7911c842..ffbf93a7993cee0386c42bef1c827a8488f04d8e 100644 (file)
@@ -16,7 +16,7 @@ This command is deprecated; use `git-ls-remote` instead.
 
 OPTIONS
 -------
-\--upload-pack=<git-upload-pack>::
+--upload-pack=<git-upload-pack>::
        Use this to specify the path to 'git-upload-pack' on the
        remote side, if it is not found on your $PATH. Some
        installations of sshd ignores the user's environment
@@ -47,4 +47,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 3219eb3ddc4b81291081c8bce2f78e70b608303a..f330b8a5b9bbd89414571456659fefcbf812254f 100644 (file)
@@ -49,4 +49,4 @@ linkgit:git-repack[1]
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 82a03e3766651f5e85c2157085e80bdcd2c12056..ec335d6fab6e9639a7f7d93c5b88002e2192fd4c 100644 (file)
@@ -37,7 +37,7 @@ OPTIONS
 \--::
        Do not interpret any more arguments as options.
 
-\--expire <time>::
+--expire <time>::
        Only expire loose objects older than <time>.
 
 <head>...::
@@ -83,4 +83,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 66304f02557bf57721af215e6593db16ae0c40dc..d0f1595f7e9051b5d58d1dba030ea3a7d80bdab5 100644 (file)
@@ -30,7 +30,7 @@ include::merge-options.txt[]
 
 :git-pull: 1
 
-\--rebase::
+--rebase::
        Instead of a merge, perform a rebase after fetching.  If
        there is a remote ref for the upstream branch, and this branch
        was rebased since last fetched, the rebase uses that information
@@ -38,13 +38,14 @@ include::merge-options.txt[]
        for branch `<name>`, set configuration `branch.<name>.rebase`
        to `true`.
 +
-*NOTE:* This is a potentially _dangerous_ mode of operation.
+[NOTE]
+This is a potentially _dangerous_ mode of operation.
 It rewrites history, which does not bode well when you
 published that history already.  Do *not* use this option
 unless you have read linkgit:git-rebase[1] carefully.
 
-\--no-rebase::
-       Override earlier \--rebase.
+--no-rebase::
+       Override earlier --rebase.
 
 include::fetch-options.txt[]
 
@@ -203,4 +204,4 @@ Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0cc44d79993735a8978af9e191e6846c6ceddb74..f3d5d883a7e4e42c47670eeeef41799b1cb0c228 100644 (file)
@@ -61,13 +61,14 @@ already exists on the remote side.  This is the default operation mode
 if no explicit refspec is found (that is neither on the command line
 nor in any Push line of the corresponding remotes file---see below).
 
-\--all::
+--all::
        Instead of naming each ref to push, specifies that all
        refs under `$GIT_DIR/refs/heads/` be pushed.
 
-\--mirror::
+--mirror::
        Instead of naming each ref to push, specifies that all
-       refs under `$GIT_DIR/refs/heads/` and `$GIT_DIR/refs/tags/`
+       refs under `$GIT_DIR/refs/` (which includes but is not
+       limited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)
        be mirrored to the remote repository.  Newly created local
        refs will be pushed to the remote end, locally updated refs
        will be force updated on the remote end, and deleted refs
@@ -75,39 +76,42 @@ nor in any Push line of the corresponding remotes file---see below).
        if the configuration option `remote.<remote>.mirror` is
        set.
 
-\--dry-run::
+--dry-run::
        Do everything except actually send the updates.
 
-\--tags::
+--tags::
        All refs under `$GIT_DIR/refs/tags` are pushed, in
        addition to refspecs explicitly listed on the command
        line.
 
-\--receive-pack=<git-receive-pack>::
+--receive-pack=<git-receive-pack>::
        Path to the 'git-receive-pack' program on the remote
        end.  Sometimes useful when pushing to a remote
        repository over ssh, and you do not have the program in
        a directory on the default $PATH.
 
-\--exec=<git-receive-pack>::
+--exec=<git-receive-pack>::
        Same as \--receive-pack=<git-receive-pack>.
 
--f, \--force::
+-f::
+--force::
        Usually, the command refuses to update a remote ref that is
        not an ancestor of the local ref used to overwrite it.
        This flag disables the check.  This can cause the
        remote repository to lose commits; use it with care.
 
-\--repo=<repo>::
+--repo=<repo>::
        When no repository is specified the command defaults to
        "origin"; this overrides it.
 
-\--thin, \--no-thin::
+--thin::
+--no-thin::
        These options are passed to `git-send-pack`.  Thin
        transfer spends extra cycles to minimize the number of
        objects to be sent and meant to be used on slower connection.
 
--v, \--verbose::
+-v::
+--verbose::
        Run verbosely.
 
 include::urls-remotes.txt[]
@@ -200,4 +204,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0fc2b56c12b0ca97b8868f27d2f4ac149ead04d6..0600379394ee7c2b00743379170b9a4718bf7db6 100644 (file)
@@ -29,6 +29,8 @@ preserved as the 1 line subject in the git description.
 
 OPTIONS
 -------
+
+-n::
 --dry-run::
        Walk through the patches in the series and warn
        if we cannot find all of the necessary information to commit
@@ -57,4 +59,4 @@ Documentation by Eric Biederman <ebiederm@lnxi.com>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 2e097a140c3e09375bd851d73f2680800745e187..58fb906ef68e8b800b0616a5655aa757a362ed6e 100644 (file)
@@ -50,6 +50,9 @@ OPTIONS
        trees that are not directly related to the current
        working tree status into a temporary index file.
 
+-v::
+       Show the progress of checking files out.
+
 --trivial::
        Restrict three-way merge by `git-read-tree` to happen
        only if there is no file-level merging required, instead
@@ -361,4 +364,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index e0412e0866db8f80e8bbc8f33caaa659461d90aa..7166414355e7469c5aeae0262f3902ce7398c989 100644 (file)
@@ -213,19 +213,22 @@ OPTIONS
 --skip::
        Restart the rebasing process by skipping the current patch.
 
--m, \--merge::
+-m::
+--merge::
        Use merging strategies to rebase.  When the recursive (default) merge
        strategy is used, this allows rebase to be aware of renames on the
        upstream side.
 
--s <strategy>, \--strategy=<strategy>::
+-s <strategy>::
+--strategy=<strategy>::
        Use the given merge strategy; can be supplied more than
        once to specify them in the order they should be tried.
        If there is no `-s` option, a built-in list of strategies
        is used instead (`git-merge-recursive` when merging a single
        head, `git-merge-octopus` otherwise).  This implies --merge.
 
--v, \--verbose::
+-v::
+--verbose::
        Display a diffstat of what changed upstream since the last rebase.
 
 -C<n>::
@@ -238,12 +241,14 @@ OPTIONS
        This flag is passed to the `git-apply` program
        (see linkgit:git-apply[1]) that applies the patch.
 
--i, \--interactive::
+-i::
+--interactive::
        Make a list of the commits which are about to be rebased.  Let the
        user edit that list before rebasing.  This mode can also be used to
        split commits (see SPLITTING COMMITS below).
 
--p, \--preserve-merges::
+-p::
+--preserve-merges::
        Instead of ignoring merges, try to recreate them.  This option
        only works in interactive mode.
 
@@ -401,4 +406,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 4111434bb6f1ba148737c91b7c5a9ba40cb4811d..a70c7168f60f8cbb6666a34334114e2759424ccd 100644 (file)
@@ -162,4 +162,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 047e3ce14dfac6f1848fa8f1772202c26efa1055..8492aeacf1823bed947d4dc318f45e2488cac574 100644 (file)
@@ -102,4 +102,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 1b024ded33d1480179630cddaab13e0375bf2120..f6dafd4495f8f24d1f6759c5c2e7ee5d387e31a5 100644 (file)
@@ -34,4 +34,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5c55290ee59ec071c5514401aa5e3073da09c8cb..345943a26466dab73034b41698c54ca317cc4d75 100644 (file)
@@ -9,11 +9,11 @@ git-remote - manage set of tracked repositories
 SYNOPSIS
 --------
 [verse]
-'git-remote'
+'git-remote' [-v | --verbose]
 'git-remote' add [-t <branch>] [-m <master>] [-f] [--mirror] <name> <url>
 'git-remote' rm <name>
-'git-remote' show <name>
-'git-remote' prune <name>
+'git-remote' show [-n] <name>
+'git-remote' prune [-n | --dry-run] <name>
 'git-remote' update [group]
 
 DESCRIPTION
@@ -22,6 +22,14 @@ DESCRIPTION
 Manage the set of repositories ("remotes") whose branches you track.
 
 
+OPTIONS
+-------
+
+-v::
+--verbose::
+       Be a little more verbose and show remote url after name.
+
+
 COMMANDS
 --------
 
@@ -72,9 +80,8 @@ These stale branches have already been removed from the remote repository
 referenced by <name>, but are still locally available in
 "remotes/<name>".
 +
-With `-n` option, the remote heads are not confirmed first with `git
-ls-remote <name>`; cached information is used instead.  Use with
-caution.
+With `--dry-run` option, report what branches will be pruned, but do no
+actually prune them.
 
 'update'::
 
@@ -146,4 +153,4 @@ Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ef578f0f8b1280f8acd9de4048633be4edbbbe8e..04d6f1fbc445efc8046e09fa70e9340d1374ea65 100644 (file)
@@ -73,7 +73,8 @@ OPTIONS
        this repository (or a direct copy of it)
        over HTTP or FTP.  See gitlink:git-update-server-info[1].
 
---window=[N], --depth=[N]::
+--window=[N]::
+--depth=[N]::
        These two options affect how the objects contained in the pack are
        stored using delta compression. The objects are first internally
        sorted by type, size and optionally names and compared against the
@@ -129,4 +130,4 @@ linkgit:git-prune-packed[1]
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 9a14c04e39bd6c5c41de988f7dd9d18477e92c85..c71d86985ea2136e7c7da5e4ca758ca7ef675409 100644 (file)
@@ -36,4 +36,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a53858e2503f52b68739264f026c6532ba733d1f..8030ec4d01de8cf2c7a62a7b1fd8d917e6d14b53 100644 (file)
@@ -208,4 +208,4 @@ Written by Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index fac59c972659111aa2bba365c6aba94577d95702..12ea9b23c5b55366f142319451bb45db4e10affe 100644 (file)
@@ -203,4 +203,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index d80cdf55024e4c8d67178aabd24b055d53a70438..c9b09503210cd23a3528bd67cbbf8577d1e670e2 100644 (file)
@@ -109,4 +109,4 @@ and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5641d995180b7aed563872b2403dbd29870a2185..9e273bc5a6ee091ad7b81254228d33fd4df5541e 100644 (file)
@@ -52,7 +52,8 @@ OPTIONS
        The parameter given must be usable as a single, valid
        object name.  Otherwise barf and abort.
 
--q, --quiet::
+-q::
+--quiet::
        Only meaningful in `--verify` mode. Do not output an error
        message if the first argument is not a valid object name;
        instead exit with non-zero status silently.
@@ -119,16 +120,19 @@ OPTIONS
 --is-bare-repository::
        When the repository is bare print "true", otherwise "false".
 
---short, --short=number::
+--short::
+--short=number::
        Instead of outputting the full SHA1 values of object names try to
        abbreviate them to a shorter unique name. When no length is specified
        7 is used. The minimum length is 4.
 
---since=datestring, --after=datestring::
+--since=datestring::
+--after=datestring::
        Parses the date string, and outputs corresponding
        --max-age= parameter for git-rev-list command.
 
---until=datestring, --before=datestring::
+--until=datestring::
+--before=datestring::
        Parses the date string, and outputs corresponding
        --min-age= parameter for git-rev-list command.
 
@@ -417,4 +421,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 13ceabbcc8851344e54e13773a2a553360f931c4..5b49b813862c5318701e40f1a798ca04cd1d3a63 100644 (file)
@@ -22,12 +22,14 @@ OPTIONS
        For a more complete list of ways to spell commit names, see
        "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
--e|--edit::
+-e::
+--edit::
        With this option, `git-revert` will let you edit the commit
        message prior to committing the revert. This is the default if
        you run the command from a terminal.
 
--m parent-number|--mainline parent-number::
+-m parent-number::
+--mainline parent-number::
        Usually you cannot revert a merge because you do not know which
        side of the merge should be considered the mainline.  This
        option specifies the parent number (starting from 1) of
@@ -38,7 +40,8 @@ OPTIONS
        With this option, `git-revert` will not start the commit
        message editor.
 
--n|--no-commit::
+-n::
+--no-commit::
        Usually the command automatically creates a commit with
        a commit log message stating which commit was reverted.
        This flag applies the change necessary to revert the
@@ -51,7 +54,8 @@ OPTIONS
 This is useful when reverting more than one commits'
 effect to your working tree in a row.
 
--s|--signoff::
+-s::
+--signoff::
        Add Signed-off-by line at the end of the commit message.
 
 
@@ -65,4 +69,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 6481f4ae5211b1c460299673a281a69e3f59c7f8..d88554bedcaa9acdf8828e9abe6d5169e32446a3 100644 (file)
@@ -38,7 +38,8 @@ OPTIONS
 -f::
        Override the up-to-date check.
 
--n, \--dry-run::
+-n::
+--dry-run::
        Don't actually remove any file(s).  Instead, just show
        if they exist in the index and would otherwise be removed
        by the command.
@@ -52,15 +53,16 @@ OPTIONS
        the list of files, (useful when filenames might be mistaken
        for command-line options).
 
-\--cached::
+--cached::
        Use this option to unstage and remove paths only from the index.
        Working tree files, whether modified or not, will be
        left alone.
 
-\--ignore-unmatch::
+--ignore-unmatch::
        Exit with a zero status even if no files matched.
 
--q, \--quiet::
+-q::
+--quiet::
        git-rm normally outputs one line (in the form of an "rm" command)
        for each file removed. This option suppresses that output.
 
@@ -107,4 +109,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 9d0a10c562c40f0992eb1105cf7543b8813f11b5..251d661afd9fc93b556e2673b202523dd30383c6 100644 (file)
@@ -40,7 +40,8 @@ The --cc option must be repeated for each user you want on the cc list.
        Output of this command must be single email address per line.
        Default is the value of 'sendemail.cccmd' configuration value.
 
---chain-reply-to, --no-chain-reply-to::
+--chain-reply-to::
+--no-chain-reply-to::
        If this is set, each email will be sent as a reply to the previous
        email sent.  If disabled with "--no-chain-reply-to", all emails after
        the first will be sent as replies to the first email sent.  When using
@@ -65,7 +66,8 @@ The --cc option must be repeated for each user you want on the cc list.
        Only necessary if --compose is also set.  If --compose
        is not set, this will be prompted for.
 
---signed-off-by-cc, --no-signed-off-by-cc::
+--signed-off-by-cc::
+--no-signed-off-by-cc::
         If this is set, add emails found in Signed-off-by: or Cc: lines to the
         cc list.
         Default is the value of 'sendemail.signedoffcc' configuration value;
@@ -141,7 +143,8 @@ user is prompted for a password while the input is masked for privacy.
        Only necessary if --compose is also set.  If --compose
        is not set, this will be prompted for.
 
---suppress-from, --no-suppress-from::
+--suppress-from::
+--no-suppress-from::
         If this is set, do not add the From: address to the cc: list.
         Default is the value of 'sendemail.suppressfrom' configuration value;
         if that is unspecified, default to --no-suppress-from.
@@ -157,7 +160,8 @@ user is prompted for a password while the input is masked for privacy.
        if that is unspecified, default to 'self' if --suppress-from is
        specified, as well as 'sob' if --no-signed-off-cc is specified.
 
---thread, --no-thread::
+--thread::
+--no-thread::
        If this is set, the In-Reply-To header will be set on each email sent.
        If disabled with "--no-thread", no emails will have the In-Reply-To
        header set.
@@ -241,4 +245,4 @@ Documentation by Ryan Anderson
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 777515b12e5e3b276285d3b034f91aab5c1e34cc..ba2fdaec08913e921189395e7feb2ed4d229ece5 100644 (file)
@@ -21,33 +21,33 @@ updates it from the current repository, sending named refs.
 
 OPTIONS
 -------
-\--receive-pack=<git-receive-pack>::
+--receive-pack=<git-receive-pack>::
        Path to the 'git-receive-pack' program on the remote
        end.  Sometimes useful when pushing to a remote
        repository over ssh, and you do not have the program in
        a directory on the default $PATH.
 
-\--exec=<git-receive-pack>::
+--exec=<git-receive-pack>::
        Same as \--receive-pack=<git-receive-pack>.
 
-\--all::
+--all::
        Instead of explicitly specifying which refs to update,
        update all heads that locally exist.
 
-\--dry-run::
+--dry-run::
        Do everything except actually send the updates.
 
-\--force::
+--force::
        Usually, the command refuses to update a remote ref that
        is not an ancestor of the local ref used to overwrite it.
        This flag disables the check.  What this means is that
        the remote repository can lose commits; use it with
        care.
 
-\--verbose::
+--verbose::
        Run verbosely.
 
-\--thin::
+--thin::
        Spend extra cycles to minimize the number of objects to be sent.
        Use it on slower connection.
 
@@ -125,4 +125,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 16b8b75146145698268618cf6f71e7918d01c19a..c543170342030e318e87e75c29f23334655ee7ce 100644 (file)
@@ -77,4 +77,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index bc031e0cc2ed29c6226a92d8b71be50afc8c86a7..bd09196acccf75ecde10d6965e3f59fdcc1c2e21 100644 (file)
@@ -31,4 +31,4 @@ Documentation by Petr Baudis and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index d7cb4c0468e713543042d41ff57a638a7fda2881..daa64d4d8165a0dfe5d87f54cd44c4bb6b476eba 100644 (file)
@@ -22,17 +22,21 @@ Additionally, "[PATCH]" will be stripped from the commit description.
 OPTIONS
 -------
 
--h, \--help::
+-h::
+--help::
        Print a short usage message and exit.
 
--n, \--numbered::
+-n::
+--numbered::
        Sort output according to the number of commits per author instead
        of author alphabetic order.
 
--s, \--summary::
+-s::
+--summary::
        Suppress commit description and provide a commit count summary only.
 
--e, \--email::
+-e::
+--email::
        Show the email address of each author.
 
 -w[<width>[,<indent1>[,<indent2>]]]::
@@ -65,4 +69,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0bb8250b202de93bac6b5cef957454cda2648a13..de9e8f885f794692bcc45b871e791ebbd7c806cd 100644 (file)
@@ -38,10 +38,12 @@ OPTIONS
        branches under $GIT_DIR/refs/heads/topic, giving
        `topic/*` would show all of them.
 
--r|--remotes::
+-r::
+--remotes::
        Show the remote-tracking branches.
 
--a|--all::
+-a::
+--all::
        Show both remote-tracking branches and local branches.
 
 --current::
@@ -190,4 +192,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 535a884642b7a2088729c5a085e08e2487f79c7d..891f0eff27557acddd1212eae62aca293525d5dd 100644 (file)
@@ -31,4 +31,4 @@ Documentation by Junio C Hamano
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ce0e643fbe684f28e30372f404dafd01e4656828..6b99529b6bb659ec1e1ffd741208ef03762c0356 100644 (file)
@@ -29,22 +29,26 @@ in the `.git` directory.
 OPTIONS
 -------
 
--h, --head::
+-h::
+--head::
 
        Show the HEAD reference.
 
---tags, --heads::
+--tags::
+--heads::
 
        Limit to only "refs/heads" and "refs/tags", respectively.  These
        options are not mutually exclusive; when given both, references stored
        in "refs/heads" and "refs/tags" are displayed.
 
--d, --dereference::
+-d::
+--dereference::
 
        Dereference tags into object IDs as well. They will be shown with "^{}"
        appended.
 
--s, --hash::
+-s::
+--hash::
 
        Only show the SHA1 hash, not the reference name. When also using
        --dereference the dereferenced tag will still be shown after the SHA1.
@@ -55,17 +59,20 @@ OPTIONS
        Aside from returning an error code of 1, it will also print an error
        message if '--quiet' was not specified.
 
---abbrev, --abbrev=len::
+--abbrev::
+--abbrev=len::
 
        Abbreviate the object name.  When using `--hash`, you do
        not have to say `--hash --abbrev`; `--hash=len` would do.
 
--q, --quiet::
+-q::
+--quiet::
 
        Do not print any results to stdout. When combined with '--verify' this
        can be used to silently check if a reference exists.
 
---exclude-existing, --exclude-existing=pattern::
+--exclude-existing::
+--exclude-existing=pattern::
 
        Make git-show-ref act as a filter that reads refs from stdin of the
        form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
@@ -169,4 +176,4 @@ Man page by Jonas Fonseca <fonseca@diku.dk>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 29ed0acc62156a743db2741d1f576fca87eebff1..baaf2bc8feefe4fb88a1ec43d2f70bbfdfe6fbf6 100644 (file)
@@ -81,4 +81,4 @@ Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.or
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 8dc35d493e81bc0c5515ec279dbe95c464c57469..baa4f55b48ac2fad72b18651a98bc542d1f38f5c 100644 (file)
@@ -182,4 +182,4 @@ Written by Nanako Shiraishi <nanako3@bluebottle.com>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 057e2a167e3769d7f03fcfe0208a5c80a6c5ea10..fef62b16df365301f01f4c129fdba02fef84234a 100644 (file)
@@ -72,4 +72,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index fc5687502e519f55b3be0dec5d89778e8b8d4d13..8421a39f26ac4807afd42e8f3ac084686b170871 100644 (file)
@@ -16,7 +16,8 @@ Remove multiple empty lines, and empty lines at beginning and end.
 
 OPTIONS
 -------
--s|--strip-comments::
+-s::
+--strip-comments::
        In addition to empty lines, also strip lines starting with '#'.
 
 <stream>::
@@ -32,4 +33,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 0668f295eee14facf0f9c4dd6ed2830cb6a348f8..441ae1483bf57aca849c0470c6e19e963c9ebf19 100644 (file)
@@ -61,10 +61,12 @@ summary::
 
 OPTIONS
 -------
--q, --quiet::
+-q::
+--quiet::
        Only print error messages.
 
--b, --branch::
+-b::
+--branch::
        Branch of repository to add as submodule.
 
 --cached::
@@ -72,7 +74,8 @@ OPTIONS
        commands typically use the commit found in the submodule HEAD, but
        with this option, the commit stored in the index is used instead.
 
--n, --summary-limit::
+-n::
+--summary-limit::
        This option is only valid for the summary command.
        Limit the summary size (number of commits shown in total).
        Giving 0 will disable the summary; a negative number means unlimited
@@ -98,4 +101,4 @@ Written by Lars Hjemli <hjemli@gmail.com>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index f4cbd2f212e544f0a17c761a4c870a925db5802b..97bed54fbde18a1e7c5516382a54b341fc81668e 100644 (file)
@@ -448,6 +448,8 @@ svn-remote.<name>.rewriteRoot::
        the repository with a public http:// or svn:// URL in the
        metadata so users of it will see the public URL.
 
+--
+
 Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
 options all affect the metadata generated and used by git-svn; they
 *must* be set in the configuration file before any history is imported
@@ -456,7 +458,6 @@ and these settings should never be changed once they are set.
 Additionally, only one of these four options can be used per-svn-remote
 section because they affect the 'git-svn-id:' metadata line.
 
---
 
 BASIC EXAMPLES
 --------------
index a5b40f3e85b19ce855caddd83b69dd4b1cf1d7bb..3d3a059c5e2e91bff2de173c5d6f8107d10b7e62 100644 (file)
@@ -26,7 +26,8 @@ a regular file whose contents is `ref: refs/heads/master`.
 OPTIONS
 -------
 
--q, --quiet::
+-q::
+--quiet::
        Do not issue an error message if the <name> is not a
        symbolic ref but a detached HEAD; instead exit with
        non-zero status silently.
@@ -58,4 +59,4 @@ Written by Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 9712392f7946366129056ed8a0b7b8fab83c0ed5..8f40f4bf0df8bb8db58830e32d85964542d6cd6a 100644 (file)
@@ -255,4 +255,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 65c68176e57349f8f9ec672906a8ea70e6516cd0..74ed06525e8f920017469301f9773e4b36080ee9 100644 (file)
@@ -86,4 +86,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 1864d13ed8b22d06df1e559d77f3bb42be9d1691..d0552b2c74b25c12e99ba071bb91f12ccd29681a 100644 (file)
@@ -32,4 +32,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 50947c50df1fe05b7eac8e046556c6ee070c7327..b9c4279a880c722a1e751469244f79323e618eb8 100644 (file)
@@ -54,4 +54,4 @@ Documentation by Junio C Hamano
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 77d312adcad74955186f70ba13048ea21a7b1dbc..bbb0a6ad57187c4387412a08ff301ddfc7173726 100644 (file)
@@ -76,7 +76,8 @@ OPTIONS
 --chmod=(+|-)x::
         Set the execute permissions on the updated files.
 
---assume-unchanged, --no-assume-unchanged::
+--assume-unchanged::
+--no-assume-unchanged::
        When these flags are specified, the object name recorded
        for the paths are not updated.  Instead, these options
        sets and unsets the "assume unchanged" bit for the
@@ -88,7 +89,8 @@ OPTIONS
        filesystem that has very slow lstat(2) system call
        (e.g. cifs).
 
---again, -g::
+-g::
+--again::
        Runs `git-update-index` itself on the paths whose index
        entries are different from those from the `HEAD` commit.
 
@@ -328,4 +330,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 80b94c36d914756cdf052355e5a63ea2014ae181..bae2c8b7eced2042af0437b1e92cc73636c7cfa5 100644 (file)
@@ -90,4 +90,4 @@ Written by Linus Torvalds <torvalds@osdl.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 1cf89fd79e2fe65b2cc116c54cbe893bbd5d1283..d21be41d0646c80e7ec9aeb1ed46ce617022e3cc 100644 (file)
@@ -22,7 +22,8 @@ generates such auxiliary files.
 OPTIONS
 -------
 
--f|--force::
+-f::
+--force::
        Update the info files from scratch.
 
 
@@ -30,8 +31,8 @@ OUTPUT
 ------
 
 Currently the command updates the following files.  Please see
-link:repository-layout.html[repository-layout] for description
-of what they are for:
+linkgit:gitrepository-layout[5][repository-layout] for description of
+what they are for:
 
 * objects/info/packs
 
@@ -54,4 +55,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index c1ef1440bc726403bcd126df82301ff3c4e475cd..e49f68f68e490d7230963eec06b91ab09c34e19a 100644 (file)
@@ -34,4 +34,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 2330d13814ee20d0de3743a8f309f6ecfebe5515..bac465e13f2b2d0aaadaedf00fd03ab6f3f9a62c 100644 (file)
@@ -24,10 +24,10 @@ repository.  For push operations, see 'git-send-pack'.
 OPTIONS
 -------
 
-\--strict::
+--strict::
        Do not try <directory>/.git/ if <directory> is no git directory.
 
-\--timeout=<n>::
+--timeout=<n>::
        Interrupt transfer after <n> seconds of inactivity.
 
 <directory>::
@@ -43,4 +43,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 242a1d9bb632f848ffaaa5ad2476584313e05412..67e8e1f93a37d19183a41b1119569d980cc43eea 100644 (file)
@@ -61,4 +61,4 @@ Documentation by Eric Biederman and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index ba2a157299566b4dcc88f8ecb6f0eaed755f95bb..478f236996eac55c8142d48de8bda1456b426d4a 100644 (file)
@@ -50,4 +50,4 @@ Documentation by Junio C Hamano
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 7e9c1ed15b6f8a9bf80166ca732d91620694a9f4..dffba8906ae27bbb305f14732c390eea39bbdca5 100644 (file)
@@ -28,4 +28,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5ba0b9f1c9214b33948354f6b85c2b343674cbe5..e80a7c1cc4c1b62bc4fbdb0a91f063022542d38d 100644 (file)
@@ -31,14 +31,17 @@ Custom commands may also be specified.
 
 OPTIONS
 -------
--b BROWSER|--browser=BROWSER::
+-b BROWSER::
+--browser=BROWSER::
        Use the specified BROWSER. It must be in the list of supported
        browsers.
 
--t BROWSER|--tool=BROWSER::
+-t BROWSER::
+--tool=BROWSER::
        Same as above.
 
--c CONF.VAR|--config=CONF.VAR::
+-c CONF.VAR::
+--config=CONF.VAR::
        CONF.VAR is looked up in the git config files. If it's set,
        then its value specify the browser that should be used.
 
@@ -118,4 +121,4 @@ git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index a6e7bd4c8b99ad2d6a19acf4a412b81580ef3027..f5d39c7870b9f6d07c8fadd3823df5d56da2dfe0 100644 (file)
@@ -76,4 +76,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 461c813f5ad19ac718b09cfae247eaac74d4d845..8744f6535d4c411b620e1504c92a04791f0246df 100644 (file)
@@ -46,4 +46,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index dae1b4031c12e1bf5b49c42bf4530f865efd656f..7414238fe52819689615e57d10f53dd2b29a3cbe 100644 (file)
@@ -1,4 +1,4 @@
-git(7)
+git(1)
 ======
 
 NAME
@@ -43,15 +43,21 @@ unreleased) version of git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
+* link:v1.5.6/git.html[documentation for release 1.5.6]
+
+* release notes for
+  link:RelNotes-1.5.6.txt[1.5.6],
+
 * link:v1.5.5/git.html[documentation for release 1.5.5]
 
 * release notes for
+  link:RelNotes-1.5.5.4.txt[1.5.5.4],
   link:RelNotes-1.5.5.3.txt[1.5.5.3],
   link:RelNotes-1.5.5.2.txt[1.5.5.2],
   link:RelNotes-1.5.5.1.txt[1.5.5.1],
   link:RelNotes-1.5.5.txt[1.5.5].
 
-* link:v1.5.5.3/git.html[documentation for release 1.5.5.3]
+* link:v1.5.5.4/git.html[documentation for release 1.5.5.4]
 
 * link:v1.5.4.5/git.html[documentation for release 1.5.4.5]
 
@@ -137,7 +143,8 @@ help ...'.
        environment variable. If no path is given 'git' will print
        the current setting and then exit.
 
--p|--paginate::
+-p::
+--paginate::
        Pipe all output into 'less' (or if set, $PAGER).
 
 --no-pager::
@@ -364,7 +371,8 @@ For a more complete list of ways to spell object names, see
 File/Directory Structure
 ------------------------
 
-Please see the link:repository-layout.html[repository layout] document.
+Please see the linkgit:gitrepository-layout[5][repository layout]
+document.
 
 Read linkgit:githooks[5][hooks] for more details about each hook.
 
@@ -588,4 +596,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 04ca63ca3d8b1c35c849750e66348e42a6b823a0..471754eb12afa5862aa9c5e88ed3bfd2ee5cac7f 100644 (file)
@@ -265,7 +265,7 @@ When git needs to show you a diff for the path with `diff`
 attribute set to `jcdiff`, it calls the command you specified
 with the above configuration, i.e. `j-c-diff`, with 7
 parameters, just like `GIT_EXTERNAL_DIFF` program is called.
-See linkgit:git[7] for details.
+See linkgit:git[1] for details.
 
 
 Defining a custom hunk-header
@@ -518,4 +518,4 @@ commit hash.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 835cb05f9655de943b7b65178c933fc5d39c52f8..8fb5d889e5757ad5c25717c4d9ed0a3ef378f794 100644 (file)
@@ -110,4 +110,4 @@ Documentation by Pierre Habouzit.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 5995a2e1525eeee764b5c141b8c558ccba0a953b..cb4ec4044092961a925bd954d0aa3199c0001620 100644 (file)
@@ -109,7 +109,7 @@ populating your tree.
 
 [NOTE]
 An advanced user may want to take a look at the
-link:repository-layout.html[repository layout] document
+linkgit:gitrepository-layout[5][repository layout] document
 after finishing this tutorial.
 
 You have now created your first git repository. Of course, since it's
@@ -1696,4 +1696,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite.
+Part of the linkgit:git[1] suite.
index de02a4268eae5213a257cf70a04916baaeb32e62..1db3f5294527e07576d44cb3a7bff384871fc24e 100644 (file)
@@ -193,4 +193,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite.
+Part of the linkgit:git[1] suite.
diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
new file mode 100644 (file)
index 0000000..4d56c85
--- /dev/null
@@ -0,0 +1,292 @@
+gitdiffcore(7)
+==============
+
+NAME
+----
+gitdiffcore - Tweaking diff output (June 2005)
+
+SYNOPSIS
+--------
+git diff *
+
+DESCRIPTION
+-----------
+
+The diff commands git-diff-index, git-diff-files, and git-diff-tree
+can be told to manipulate differences they find in
+unconventional ways before showing diff(1) output.  The manipulation
+is collectively called "diffcore transformation".  This short note
+describes what they are and how to use them to produce diff outputs
+that are easier to understand than the conventional kind.
+
+
+The chain of operation
+----------------------
+
+The git-diff-* family works by first comparing two sets of
+files:
+
+ - git-diff-index compares contents of a "tree" object and the
+   working directory (when '\--cached' flag is not used) or a
+   "tree" object and the index file (when '\--cached' flag is
+   used);
+
+ - git-diff-files compares contents of the index file and the
+   working directory;
+
+ - git-diff-tree compares contents of two "tree" objects;
+
+In all of these cases, the commands themselves compare
+corresponding paths in the two sets of files.  The result of
+comparison is passed from these commands to what is internally
+called "diffcore", in a format similar to what is output when
+the -p option is not used.  E.g.
+
+------------------------------------------------
+in-place edit  :100644 100644 bcd1234... 0123456... M file0
+create         :000000 100644 0000000... 1234567... A file4
+delete         :100644 000000 1234567... 0000000... D file5
+unmerged       :000000 000000 0000000... 0000000... U file6
+------------------------------------------------
+
+The diffcore mechanism is fed a list of such comparison results
+(each of which is called "filepair", although at this point each
+of them talks about a single file), and transforms such a list
+into another list.  There are currently 6 such transformations:
+
+- diffcore-pathspec
+- diffcore-break
+- diffcore-rename
+- diffcore-merge-broken
+- diffcore-pickaxe
+- diffcore-order
+
+These are applied in sequence.  The set of filepairs git-diff-\*
+commands find are used as the input to diffcore-pathspec, and
+the output from diffcore-pathspec is used as the input to the
+next transformation.  The final result is then passed to the
+output routine and generates either diff-raw format (see Output
+format sections of the manual for git-diff-\* commands) or
+diff-patch format.
+
+
+diffcore-pathspec: For Ignoring Files Outside Our Consideration
+---------------------------------------------------------------
+
+The first transformation in the chain is diffcore-pathspec, and
+is controlled by giving the pathname parameters to the
+git-diff-* commands on the command line.  The pathspec is used
+to limit the world diff operates in.  It removes the filepairs
+outside the specified set of pathnames.  E.g. If the input set
+of filepairs included:
+
+------------------------------------------------
+:100644 100644 bcd1234... 0123456... M junkfile
+------------------------------------------------
+
+but the command invocation was "git-diff-files myfile", then the
+junkfile entry would be removed from the list because only "myfile"
+is under consideration.
+
+Implementation note.  For performance reasons, git-diff-tree
+uses the pathname parameters on the command line to cull set of
+filepairs it feeds the diffcore mechanism itself, and does not
+use diffcore-pathspec, but the end result is the same.
+
+
+diffcore-break: For Splitting Up "Complete Rewrites"
+----------------------------------------------------
+
+The second transformation in the chain is diffcore-break, and is
+controlled by the -B option to the git-diff-* commands.  This is
+used to detect a filepair that represents "complete rewrite" and
+break such filepair into two filepairs that represent delete and
+create.  E.g.  If the input contained this filepair:
+
+------------------------------------------------
+:100644 100644 bcd1234... 0123456... M file0
+------------------------------------------------
+
+and if it detects that the file "file0" is completely rewritten,
+it changes it to:
+
+------------------------------------------------
+:100644 000000 bcd1234... 0000000... D file0
+:000000 100644 0000000... 0123456... A file0
+------------------------------------------------
+
+For the purpose of breaking a filepair, diffcore-break examines
+the extent of changes between the contents of the files before
+and after modification (i.e. the contents that have "bcd1234..."
+and "0123456..." as their SHA1 content ID, in the above
+example).  The amount of deletion of original contents and
+insertion of new material are added together, and if it exceeds
+the "break score", the filepair is broken into two.  The break
+score defaults to 50% of the size of the smaller of the original
+and the result (i.e. if the edit shrinks the file, the size of
+the result is used; if the edit lengthens the file, the size of
+the original is used), and can be customized by giving a number
+after "-B" option (e.g. "-B75" to tell it to use 75%).
+
+
+diffcore-rename: For Detection Renames and Copies
+-------------------------------------------------
+
+This transformation is used to detect renames and copies, and is
+controlled by the -M option (to detect renames) and the -C option
+(to detect copies as well) to the git-diff-* commands.  If the
+input contained these filepairs:
+
+------------------------------------------------
+:100644 000000 0123456... 0000000... D fileX
+:000000 100644 0000000... 0123456... A file0
+------------------------------------------------
+
+and the contents of the deleted file fileX is similar enough to
+the contents of the created file file0, then rename detection
+merges these filepairs and creates:
+
+------------------------------------------------
+:100644 100644 0123456... 0123456... R100 fileX file0
+------------------------------------------------
+
+When the "-C" option is used, the original contents of modified files,
+and deleted files (and also unmodified files, if the
+"\--find-copies-harder" option is used) are considered as candidates
+of the source files in rename/copy operation.  If the input were like
+these filepairs, that talk about a modified file fileY and a newly
+created file file0:
+
+------------------------------------------------
+:100644 100644 0123456... 1234567... M fileY
+:000000 100644 0000000... bcd3456... A file0
+------------------------------------------------
+
+the original contents of fileY and the resulting contents of
+file0 are compared, and if they are similar enough, they are
+changed to:
+
+------------------------------------------------
+:100644 100644 0123456... 1234567... M fileY
+:100644 100644 0123456... bcd3456... C100 fileY file0
+------------------------------------------------
+
+In both rename and copy detection, the same "extent of changes"
+algorithm used in diffcore-break is used to determine if two
+files are "similar enough", and can be customized to use
+a similarity score different from the default of 50% by giving a
+number after the "-M" or "-C" option (e.g. "-M8" to tell it to use
+8/10 = 80%).
+
+Note.  When the "-C" option is used with `\--find-copies-harder`
+option, git-diff-\* commands feed unmodified filepairs to
+diffcore mechanism as well as modified ones.  This lets the copy
+detector consider unmodified files as copy source candidates at
+the expense of making it slower.  Without `\--find-copies-harder`,
+git-diff-\* commands can detect copies only if the file that was
+copied happened to have been modified in the same changeset.
+
+
+diffcore-merge-broken: For Putting "Complete Rewrites" Back Together
+--------------------------------------------------------------------
+
+This transformation is used to merge filepairs broken by
+diffcore-break, and not transformed into rename/copy by
+diffcore-rename, back into a single modification.  This always
+runs when diffcore-break is used.
+
+For the purpose of merging broken filepairs back, it uses a
+different "extent of changes" computation from the ones used by
+diffcore-break and diffcore-rename.  It counts only the deletion
+from the original, and does not count insertion.  If you removed
+only 10 lines from a 100-line document, even if you added 910
+new lines to make a new 1000-line document, you did not do a
+complete rewrite.  diffcore-break breaks such a case in order to
+help diffcore-rename to consider such filepairs as candidate of
+rename/copy detection, but if filepairs broken that way were not
+matched with other filepairs to create rename/copy, then this
+transformation merges them back into the original
+"modification".
+
+The "extent of changes" parameter can be tweaked from the
+default 80% (that is, unless more than 80% of the original
+material is deleted, the broken pairs are merged back into a
+single modification) by giving a second number to -B option,
+like these:
+
+* -B50/60 (give 50% "break score" to diffcore-break, use 60%
+  for diffcore-merge-broken).
+
+* -B/60 (the same as above, since diffcore-break defaults to 50%).
+
+Note that earlier implementation left a broken pair as a separate
+creation and deletion patches.  This was an unnecessary hack and
+the latest implementation always merges all the broken pairs
+back into modifications, but the resulting patch output is
+formatted differently for easier review in case of such
+a complete rewrite by showing the entire contents of old version
+prefixed with '-', followed by the entire contents of new
+version prefixed with '+'.
+
+
+diffcore-pickaxe: For Detecting Addition/Deletion of Specified String
+---------------------------------------------------------------------
+
+This transformation is used to find filepairs that represent
+changes that touch a specified string, and is controlled by the
+-S option and the `\--pickaxe-all` option to the git-diff-*
+commands.
+
+When diffcore-pickaxe is in use, it checks if there are
+filepairs whose "original" side has the specified string and
+whose "result" side does not.  Such a filepair represents "the
+string appeared in this changeset".  It also checks for the
+opposite case that loses the specified string.
+
+When `\--pickaxe-all` is not in effect, diffcore-pickaxe leaves
+only such filepairs that touch the specified string in its
+output.  When `\--pickaxe-all` is used, diffcore-pickaxe leaves all
+filepairs intact if there is such a filepair, or makes the
+output empty otherwise.  The latter behaviour is designed to
+make reviewing of the changes in the context of the whole
+changeset easier.
+
+
+diffcore-order: For Sorting the Output Based on Filenames
+---------------------------------------------------------
+
+This is used to reorder the filepairs according to the user's
+(or project's) taste, and is controlled by the -O option to the
+git-diff-* commands.
+
+This takes a text file each of whose lines is a shell glob
+pattern.  Filepairs that match a glob pattern on an earlier line
+in the file are output before ones that match a later line, and
+filepairs that do not match any glob pattern are output last.
+
+As an example, a typical orderfile for the core git probably
+would look like this:
+
+------------------------------------------------
+README
+Makefile
+Documentation
+*.h
+*.c
+t
+------------------------------------------------
+
+SEE ALSO
+--------
+linkgit:git-diff[1],
+linkgit:git-diff-files[1],
+linkgit:git-diff-index[1],
+linkgit:git-diff-tree[1],
+linkgit:git-format-patch[1],
+linkgit:git-log[1],
+linkgit:gitglossary[7],
+link:user-manual.html[The Git User's Manual]
+
+GIT
+---
+Part of the linkgit:git[1] suite.
index e8475a042ca5866842550545f434a2071b1992a7..5c5c31d31c6057d9f3c6da7a5f6d6cdc40c023f6 100644 (file)
@@ -22,4 +22,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite.
+Part of the linkgit:git[1] suite.
index 53747febd2042e147fac8f98431cf6d9b06bb08e..4f06ae0ed4bd625bf5a33fca215c90fb1b5810c9 100644 (file)
@@ -300,4 +300,4 @@ to abort.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index 613dca006fe2855a4600d7150e7281c9bde24238..2881c9cb92941a24d44d5a9f0d6a71cb06a01c23 100644 (file)
@@ -138,4 +138,4 @@ Frank Lichtenheld, and the git-list <git@vger.kernel.org>.
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index b88fd9566a845ed888065af24ab98934b8dc65c3..f843f39bf2f0d42f568595e1b29192d203b3e403 100644 (file)
@@ -25,7 +25,8 @@ To control which revisions to shown, the command takes options applicable to
 the linkgit:git-rev-list[1] command. This manual page describes only the most
 frequently used options.
 
--n <number>, --max-count=<number>::
+-n <number>::
+--max-count=<number>::
 
        Limits the number of commits to show.
 
@@ -109,4 +110,4 @@ Documentation by Junio C Hamano, Jonas Fonseca, and the git-list
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
index cc95b69f27c3d4b5437fa15e3d1e825a7ae8576e..f8d122a8b90ca7cb4920768ca23fd9a27574ffdf 100644 (file)
@@ -59,4 +59,4 @@ Documentation by Lars Hjemli <hjemli@gmail.com>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite
diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt
new file mode 100644 (file)
index 0000000..03c52ff
--- /dev/null
@@ -0,0 +1,208 @@
+gitrepository-layout(5)
+=======================
+
+NAME
+----
+gitrepository-layout - Git Repository Layout
+
+SYNOPSIS
+--------
+$GIT_DIR/*
+
+DESCRIPTION
+-----------
+
+You may find these things in your git repository (`.git`
+directory for a repository associated with your working tree, or
+`<project>.git` directory for a public 'bare' repository. It is
+also possible to have a working tree where `.git` is a plain
+ascii file containing `gitdir: <path>`, i.e. the path to the
+real git repository).
+
+objects::
+       Object store associated with this repository.  Usually
+       an object store is self sufficient (i.e. all the objects
+       that are referred to by an object found in it are also
+       found in it), but there are couple of ways to violate
+       it.
++
+. You could populate the repository by running a commit walker
+without `-a` option.  Depending on which options are given, you
+could have only commit objects without associated blobs and
+trees this way, for example.  A repository with this kind of
+incomplete object store is not suitable to be published to the
+outside world but sometimes useful for private repository.
+. You also could have an incomplete but locally usable repository
+by cloning shallowly.  See linkgit:git-clone[1].
+. You can be using `objects/info/alternates` mechanism, or
+`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
+objects from other object stores.  A repository with this kind
+of incomplete object store is not suitable to be published for
+use with dumb transports but otherwise is OK as long as
+`objects/info/alternates` points at the right object stores
+it borrows from.
+
+objects/[0-9a-f][0-9a-f]::
+       Traditionally, each object is stored in its own file.
+       They are split into 256 subdirectories using the first
+       two letters from its object name to keep the number of
+       directory entries `objects` directory itself needs to
+       hold.  Objects found here are often called 'unpacked'
+       (or 'loose') objects.
+
+objects/pack::
+       Packs (files that store many object in compressed form,
+       along with index files to allow them to be randomly
+       accessed) are found in this directory.
+
+objects/info::
+       Additional information about the object store is
+       recorded in this directory.
+
+objects/info/packs::
+       This file is to help dumb transports discover what packs
+       are available in this object store.  Whenever a pack is
+       added or removed, `git update-server-info` should be run
+       to keep this file up-to-date if the repository is
+       published for dumb transports.  `git repack` does this
+       by default.
+
+objects/info/alternates::
+       This file records paths to alternate object stores that
+       this object store borrows objects from, one pathname per
+       line. Note that not only native Git tools use it locally,
+       but the HTTP fetcher also tries to use it remotely; this
+       will usually work if you have relative paths (relative
+       to the object database, not to the repository!) in your
+       alternates file, but it will not work if you use absolute
+       paths unless the absolute path in filesystem and web URL
+       is the same. See also 'objects/info/http-alternates'.
+
+objects/info/http-alternates::
+       This file records URLs to alternate object stores that
+       this object store borrows objects from, to be used when
+       the repository is fetched over HTTP.
+
+refs::
+       References are stored in subdirectories of this
+       directory.  The `git prune` command knows to keep
+       objects reachable from refs found in this directory and
+       its subdirectories.
+
+refs/heads/`name`::
+       records tip-of-the-tree commit objects of branch `name`
+
+refs/tags/`name`::
+       records any object name (not necessarily a commit
+       object, or a tag object that points at a commit object).
+
+refs/remotes/`name`::
+       records tip-of-the-tree commit objects of branches copied
+       from a remote repository.
+
+packed-refs::
+       records the same information as refs/heads/, refs/tags/,
+       and friends record in a more efficient way.  See
+       linkgit:git-pack-refs[1].
+
+HEAD::
+       A symref (see glossary) to the `refs/heads/` namespace
+       describing the currently active branch.  It does not mean
+       much if the repository is not associated with any working tree
+       (i.e. a 'bare' repository), but a valid git repository
+       *must* have the HEAD file; some porcelains may use it to
+       guess the designated "default" branch of the repository
+       (usually 'master').  It is legal if the named branch
+       'name' does not (yet) exist.  In some legacy setups, it is
+       a symbolic link instead of a symref that points at the current
+       branch.
++
+HEAD can also record a specific commit directly, instead of
+being a symref to point at the current branch.  Such a state
+is often called 'detached HEAD', and almost all commands work
+identically as normal.  See linkgit:git-checkout[1] for
+details.
+
+branches::
+       A slightly deprecated way to store shorthands to be used
+       to specify URL to `git fetch`, `git pull` and `git push`
+       commands is to store a file in `branches/<name>` and
+       give 'name' to these commands in place of 'repository'
+       argument.
+
+hooks::
+       Hooks are customization scripts used by various git
+       commands.  A handful of sample hooks are installed when
+       `git init` is run, but all of them are disabled by
+       default.  To enable, they need to be made executable.
+       Read linkgit:githooks[5][hooks] for more details about
+       each hook.
+
+index::
+       The current index file for the repository.  It is
+       usually not found in a bare repository.
+
+info::
+       Additional information about the repository is recorded
+       in this directory.
+
+info/refs::
+       This file helps dumb transports discover what refs are
+       available in this repository.  If the repository is
+       published for dumb transports, this file should be
+       regenerated by `git update-server-info` every time a tag
+       or branch is created or modified.  This is normally done
+       from the `hooks/update` hook, which is run by the
+       `git-receive-pack` command when you `git push` into the
+       repository.
+
+info/grafts::
+       This file records fake commit ancestry information, to
+       pretend the set of parents a commit has is different
+       from how the commit was actually created.  One record
+       per line describes a commit and its fake parents by
+       listing their 40-byte hexadecimal object names separated
+       by a space and terminated by a newline.
+
+info/exclude::
+       This file, by convention among Porcelains, stores the
+       exclude pattern list. `.gitignore` is the per-directory
+       ignore file.  `git status`, `git add`, `git rm` and `git
+       clean` look at it but the core git commands do not look
+       at it.  See also: linkgit:gitignore[5].
+
+remotes::
+       Stores shorthands to be used to give URL and default
+       refnames to interact with remote repository to `git
+       fetch`, `git pull` and `git push` commands.
+
+logs::
+       Records of changes made to refs are stored in this
+       directory.  See the documentation on git-update-ref
+       for more information.
+
+logs/refs/heads/`name`::
+       Records all changes made to the branch tip named `name`.
+
+logs/refs/tags/`name`::
+       Records all changes made to the tag named `name`.
+
+shallow::
+       This is similar to `info/grafts` but is internally used
+       and maintained by shallow clone mechanism.  See `--depth`
+       option to linkgit:git-clone[1] and linkgit:git-fetch[1].
+
+SEE ALSO
+--------
+linkgit:git-init[1],
+linkgit:git-clone[1],
+linkgit:git-fetch[1],
+linkgit:git-pack-refs[1],
+linkgit:git-gc[1],
+linkgit:git-checkout[1],
+linkgit:gitglossary[7],
+link:user-manual.html[The Git User's Manual]
+
+GIT
+---
+Part of the linkgit:git[1] suite.
index 4880ba9ae91efac4cb9b064f5f0e1b42b99110fb..e3d5c1fbf004760d4063352c2dd594e6b98b865f 100644 (file)
@@ -427,4 +427,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite.
+Part of the linkgit:git[1] suite.
index 722b3232148643896e7d3bdc36f717f726547200..d465aab64e367f1564793b74522d571433d5b53f 100644 (file)
@@ -114,7 +114,7 @@ newly modified content to the index.  Finally, commit your changes with:
 $ git commit
 ------------------------------------------------
 
-This will again prompt your for a message describing the change, and then
+This will again prompt you for a message describing the change, and then
 record a new version of the project.
 
 Alternatively, instead of running `git add` beforehand, you can use
@@ -605,4 +605,4 @@ link:user-manual.html[The Git User's Manual]
 
 GIT
 ---
-Part of the linkgit:git[7] suite.
+Part of the linkgit:git[1] suite.
index b7d09c1ec69ac0e76302cef44d5f6884d05a0e0f..40327486084ac02874faff70fd100b619af83214 100644 (file)
@@ -186,7 +186,7 @@ Step 3: setup the client
 ------------------------
 
 Make sure that you have HTTP support, i.e. your git was built with
-curl (version more recent than 7.10). The command 'git http-push' with
+libcurl (version more recent than 7.10). The command 'git http-push' with
 no argument should display a usage message.
 
 Then, add the following to your $HOME/.netrc (you can do without, but will be
index f37a77648934fcd8c707cfc1446ef5425cc7fa79..ffbc6e9861094f48fd3f24af3a0b343c9c0ea7f4 100644 (file)
@@ -2,10 +2,12 @@
        Show a diffstat at the end of the merge. The diffstat is also
        controlled by the configuration option merge.stat.
 
--n, \--no-stat::
+-n::
+--no-stat::
        Do not show diffstat at the end of the merge.
 
---summary, \--no-summary::
+--summary::
+--no-summary::
        Synonyms to --stat and --no-stat; these are deprecated and will be
        removed in the future.
 
@@ -49,7 +51,8 @@
        a fast-forward, only update the branch pointer. This is
        the default behavior of git-merge.
 
--s <strategy>, \--strategy=<strategy>::
+-s <strategy>::
+--strategy=<strategy>::
        Use the given merge strategy; can be supplied more than
        once to specify them in the order they should be tried.
        If there is no `-s` option, a built-in list of strategies
index e8bea3e18e569e702233d0bb986fc7e52266d445..ec3755579408ebae58c7de644609590f5636b9c6 100644 (file)
@@ -124,3 +124,25 @@ The placeholders are:
 - '%m': left, right or boundary mark
 - '%n': newline
 - '%x00': print a byte from a hex code
+
+* 'tformat:'
++
+The 'tformat:' format works exactly like 'format:', except that it
+provides "terminator" semantics instead of "separator" semantics. In
+other words, each commit has the message terminator character (usually a
+newline) appended, rather than a separator placed between entries.
+This means that the final entry of a single-line format will be properly
+terminated with a new line, just as the "oneline" format does.
+For example:
++
+---------------------
+$ git log -2 --pretty=format:%h 4da45bef \
+  | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
+4da45be
+7134973 -- NO NEWLINE
+
+$ git log -2 --pretty=tformat:%h 4da45bef \
+  | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
+4da45be
+7134973
+---------------------
diff --git a/Documentation/repository-layout.txt b/Documentation/repository-layout.txt
deleted file mode 100644 (file)
index 7fd187b..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-git repository layout
-=====================
-
-You may find these things in your git repository (`.git`
-directory for a repository associated with your working tree, or
-`'project'.git` directory for a public 'bare' repository. It is
-also possible to have a working tree where `.git` is a plain
-ascii file containing `gitdir: <path>`, i.e. the path to the
-real git repository).
-
-objects::
-       Object store associated with this repository.  Usually
-       an object store is self sufficient (i.e. all the objects
-       that are referred to by an object found in it are also
-       found in it), but there are couple of ways to violate
-       it.
-+
-. You could populate the repository by running a commit walker
-without `-a` option.  Depending on which options are given, you
-could have only commit objects without associated blobs and
-trees this way, for example.  A repository with this kind of
-incomplete object store is not suitable to be published to the
-outside world but sometimes useful for private repository.
-. You also could have an incomplete but locally usable repository
-by cloning shallowly.  See linkgit:git-clone[1].
-. You can be using `objects/info/alternates` mechanism, or
-`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
-objects from other object stores.  A repository with this kind
-of incomplete object store is not suitable to be published for
-use with dumb transports but otherwise is OK as long as
-`objects/info/alternates` points at the right object stores
-it borrows from.
-
-objects/[0-9a-f][0-9a-f]::
-       Traditionally, each object is stored in its own file.
-       They are split into 256 subdirectories using the first
-       two letters from its object name to keep the number of
-       directory entries `objects` directory itself needs to
-       hold.  Objects found here are often called 'unpacked'
-       (or 'loose') objects.
-
-objects/pack::
-       Packs (files that store many object in compressed form,
-       along with index files to allow them to be randomly
-       accessed) are found in this directory.
-
-objects/info::
-       Additional information about the object store is
-       recorded in this directory.
-
-objects/info/packs::
-       This file is to help dumb transports discover what packs
-       are available in this object store.  Whenever a pack is
-       added or removed, `git update-server-info` should be run
-       to keep this file up-to-date if the repository is
-       published for dumb transports.  `git repack` does this
-       by default.
-
-objects/info/alternates::
-       This file records paths to alternate object stores that
-       this object store borrows objects from, one pathname per
-       line. Note that not only native Git tools use it locally,
-       but the HTTP fetcher also tries to use it remotely; this
-       will usually work if you have relative paths (relative
-       to the object database, not to the repository!) in your
-       alternates file, but it will not work if you use absolute
-       paths unless the absolute path in filesystem and web URL
-       is the same. See also 'objects/info/http-alternates'.
-
-objects/info/http-alternates::
-       This file records URLs to alternate object stores that
-       this object store borrows objects from, to be used when
-       the repository is fetched over HTTP.
-
-refs::
-       References are stored in subdirectories of this
-       directory.  The `git prune` command knows to keep
-       objects reachable from refs found in this directory and
-       its subdirectories.
-
-refs/heads/`name`::
-       records tip-of-the-tree commit objects of branch `name`
-
-refs/tags/`name`::
-       records any object name (not necessarily a commit
-       object, or a tag object that points at a commit object).
-
-refs/remotes/`name`::
-       records tip-of-the-tree commit objects of branches copied
-       from a remote repository.
-
-packed-refs::
-       records the same information as refs/heads/, refs/tags/,
-       and friends record in a more efficient way.  See
-       linkgit:git-pack-refs[1].
-
-HEAD::
-       A symref (see glossary) to the `refs/heads/` namespace
-       describing the currently active branch.  It does not mean
-       much if the repository is not associated with any working tree
-       (i.e. a 'bare' repository), but a valid git repository
-       *must* have the HEAD file; some porcelains may use it to
-       guess the designated "default" branch of the repository
-       (usually 'master').  It is legal if the named branch
-       'name' does not (yet) exist.  In some legacy setups, it is
-       a symbolic link instead of a symref that points at the current
-       branch.
-+
-HEAD can also record a specific commit directly, instead of
-being a symref to point at the current branch.  Such a state
-is often called 'detached HEAD', and almost all commands work
-identically as normal.  See linkgit:git-checkout[1] for
-details.
-
-branches::
-       A slightly deprecated way to store shorthands to be used
-       to specify URL to `git fetch`, `git pull` and `git push`
-       commands is to store a file in `branches/'name'` and
-       give 'name' to these commands in place of 'repository'
-       argument.
-
-hooks::
-       Hooks are customization scripts used by various git
-       commands.  A handful of sample hooks are installed when
-       `git init` is run, but all of them are disabled by
-       default.  To enable, they need to be made executable.
-       Read linkgit:githooks[5][hooks] for more details about
-       each hook.
-
-index::
-       The current index file for the repository.  It is
-       usually not found in a bare repository.
-
-info::
-       Additional information about the repository is recorded
-       in this directory.
-
-info/refs::
-       This file helps dumb transports discover what refs are
-       available in this repository.  If the repository is
-       published for dumb transports, this file should be
-       regenerated by `git update-server-info` every time a tag
-       or branch is created or modified.  This is normally done
-       from the `hooks/update` hook, which is run by the
-       `git-receive-pack` command when you `git push` into the
-       repository.
-
-info/grafts::
-       This file records fake commit ancestry information, to
-       pretend the set of parents a commit has is different
-       from how the commit was actually created.  One record
-       per line describes a commit and its fake parents by
-       listing their 40-byte hexadecimal object names separated
-       by a space and terminated by a newline.
-
-info/exclude::
-       This file, by convention among Porcelains, stores the
-       exclude pattern list. `.gitignore` is the per-directory
-       ignore file.  `git status`, `git add`, `git rm` and `git
-       clean` look at it but the core git commands do not look
-       at it.  See also: linkgit:gitignore[5].
-
-remotes::
-       Stores shorthands to be used to give URL and default
-       refnames to interact with remote repository to `git
-       fetch`, `git pull` and `git push` commands.
-
-logs::
-       Records of changes made to refs are stored in this
-       directory.  See the documentation on git-update-ref
-       for more information.
-
-logs/refs/heads/`name`::
-       Records all changes made to the branch tip named `name`.
-
-logs/refs/tags/`name`::
-       Records all changes made to the tag named `name`.
-
-shallow::
-       This is similar to `info/grafts` but is internally used
-       and maintained by shallow clone mechanism.  See `--depth`
-       option to linkgit:git-clone[1] and linkgit:git-fetch[1].
index dfcef79a6b772ae5fb11fc378772042ba465615f..37dd1d61ea36d7afb1e1b16cc46bee0d357ad1c8 100644 (file)
@@ -34,17 +34,21 @@ format, often found in E-mail messages.
 `--date=default` shows timestamps in the original timezone
 (either committer's or author's).
 
+ifdef::git-rev-list[]
 --header::
 
        Print the contents of the commit in raw-format; each record is
        separated with a NUL character.
+endif::git-rev-list[]
 
 --parents::
 
        Print the parents of the commit.
 
+ifdef::git-rev-list[]
 --timestamp::
        Print the raw commit timestamp.
+endif::git-rev-list[]
 
 --left-right::
 
@@ -125,7 +129,8 @@ limiting may be applied.
 
 --
 
--n 'number', --max-count='number'::
+-n 'number'::
+--max-count='number'::
 
        Limit the number of commits output.
 
@@ -133,21 +138,25 @@ limiting may be applied.
 
        Skip 'number' commits before starting to show the commit output.
 
---since='date', --after='date'::
+--since='date'::
+--after='date'::
 
        Show commits more recent than a specific date.
 
---until='date', --before='date'::
+--until='date'::
+--before='date'::
 
        Show commits older than a specific date.
 
 ifdef::git-rev-list[]
---max-age='timestamp', --min-age='timestamp'::
+--max-age='timestamp'::
+--min-age='timestamp'::
 
        Limit the commits output to specified time range.
 endif::git-rev-list[]
 
---author='pattern', --committer='pattern'::
+--author='pattern'::
+--committer='pattern'::
 
        Limit the commits output to ones with author/committer
        header lines that match the specified pattern (regular expression).
@@ -157,16 +166,19 @@ endif::git-rev-list[]
        Limit the commits output to ones with log message that
        matches the specified pattern (regular expression).
 
--i, --regexp-ignore-case::
+-i::
+--regexp-ignore-case::
 
        Match the regexp limiting patterns without regard to letters case.
 
--E, --extended-regexp::
+-E::
+--extended-regexp::
 
        Consider the limiting patterns to be extended regular expressions
        instead of the default basic regular expressions.
 
--F, --fixed-strings::
+-F::
+--fixed-strings::
 
        Consider the limiting patterns to be fixed strings (don't interpret
        pattern as a regular expression).
@@ -206,6 +218,7 @@ endif::git-rev-list[]
        Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
        command line as '<commit>'.
 
+ifdef::git-rev-list[]
 --stdin::
 
        In addition to the '<commit>' listed on the command
@@ -218,6 +231,7 @@ endif::git-rev-list[]
        test the exit status to see if a range of objects is fully
        connected (or not).  It is faster than redirecting stdout
        to /dev/null as the output does not have to be formatted.
+endif::git-rev-list[]
 
 --cherry-pick::
 
@@ -233,7 +247,8 @@ from the other branch (for example, "3rd on b" may be cherry-picked
 from branch A).  With this option, such pairs of commits are
 excluded from the output.
 
--g, --walk-reflogs::
+-g::
+--walk-reflogs::
 
        Instead of walking the commit ancestry chain, walk
        reflog entries from the most recent one to older ones.
@@ -262,7 +277,8 @@ See also linkgit:git-reflog[1].
        Output uninteresting commits at the boundary, which are usually
        not shown.
 
---dense, --sparse::
+--dense::
+--sparse::
 
 When optional paths are given, the default behaviour ('--dense') is to
 only output commits that changes at least one of them, and also ignore
index d0776831710eaffa6e4b88edfd62e5fbb25fff31..9dbedd0a67ce6c1cecd157b0d89f9b1333e180e3 100644 (file)
@@ -1,9 +1,126 @@
 path-list API
 =============
 
-Talk about <path-list.h>, things like
+The path_list API offers a data structure and functions to handle sorted
+and unsorted string lists.
 
-* it is not just paths but strings in general;
-* the calling sequence.
+The name is a bit misleading, a path_list may store not only paths but
+strings in general.
 
-(Dscho)
+The caller:
+
+. Allocates and clears a `struct path_list` variable.
+
+. Initializes the members. You might want to set the flag `strdup_paths`
+  if the strings should be strdup()ed. For example, this is necessary
+  when you add something like git_path("..."), since that function returns
+  a static buffer that will change with the next call to git_path().
++
+If you need something advanced, you can manually malloc() the `items`
+member (you need this if you add things later) and you should set the
+`nr` and `alloc` members in that case, too.
+
+. Adds new items to the list, using `path_list_append` or `path_list_insert`.
+
+. Can check if a string is in the list using `path_list_has_path` or
+  `unsorted_path_list_has_path` and get it from the list using
+  `path_list_lookup` for sorted lists.
+
+. Can sort an unsorted list using `sort_path_list`.
+
+. Finally it should free the list using `path_list_clear`.
+
+Example:
+
+----
+struct path_list list;
+int i;
+
+memset(&list, 0, sizeof(struct path_list));
+path_list_append("foo", &list);
+path_list_append("bar", &list);
+for (i = 0; i < list.nr; i++)
+       printf("%s\n", list.items[i].path)
+----
+
+NOTE: It is more efficient to build an unsorted list and sort it
+afterwards, instead of building a sorted list (`O(n log n)` instead of
+`O(n^2)`).
++
+However, if you use the list to check if a certain string was added
+already, you should not do that (using unsorted_path_list_has_path()),
+because the complexity would be quadratic again (but with a worse factor).
+
+Functions
+---------
+
+* General ones (works with sorted and unsorted lists as well)
+
+`print_path_list`::
+
+       Dump a path_list to stdout, useful mainly for debugging purposes. It
+       can take an optional header argument and it writes out the
+       string-pointer pairs of the path_list, each one in its own line.
+
+`path_list_clear`::
+
+       Free a path_list. The `path` pointer of the items will be freed in case
+       the `strdup_paths` member of the path_list is set. The second parameter
+       controls if the `util` pointer of the items should be freed or not.
+
+* Functions for sorted lists only
+
+`path_list_has_path`::
+
+       Determine if the path_list has a given string or not.
+
+`path_list_insert`::
+
+       Insert a new element to the path_list. The returned pointer can be handy
+       if you want to write something to the `util` pointer of the
+       path_list_item containing the just added string.
++
+Since this function uses xrealloc() (which die()s if it fails) if the
+list needs to grow, it is safe not to check the pointer. I.e. you may
+write `path_list_insert(...)->util = ...;`.
+
+`path_list_lookup`::
+
+       Look up a given string in the path_list, returning the containing
+       path_list_item. If the string is not found, NULL is returned.
+
+* Functions for unsorted lists only
+
+`path_list_append`::
+
+       Append a new string to the end of the path_list.
+
+`sort_path_list`::
+
+       Make an unsorted list sorted.
+
+`unsorted_path_list_has_path`::
+
+       It's like `path_list_has_path()` but for unsorted lists.
++
+This function needs to look through all items, as opposed to its
+counterpart for sorted lists, which performs a binary search.
+
+Data structures
+---------------
+
+* `struct path_list_item`
+
+Represents an item of the list. The `path` member is a pointer to the
+string, and you may use the `util` member for any purpose, if you want.
+
+* `struct path_list`
+
+Represents the list itself.
+
+. The array of items are available via the `items` member.
+. The `nr` member contains the number of items stored in the list.
+. The `alloc` member is used to avoid reallocating at every insertion.
+  You should not tamper with it.
+. Setting the `strdup_paths` member to 1 will strdup() the strings
+  before adding them, see above.
index c364a22c8f98f6fbb71d4059f7458ed0fa78ed43..3e1342acf405adb322054a19123cd98fc12b69a9 100644 (file)
@@ -63,7 +63,7 @@ command to run in a sub-process.
 
 The caller:
 
-1. allocates and clears (memset(&chld, '0', sizeof(chld));) a
+1. allocates and clears (memset(&chld, 0, sizeof(chld));) a
    struct child_process variable;
 2. initializes the members;
 3. calls start_command();
@@ -136,7 +136,7 @@ to produce output that the caller reads.
 
 The caller:
 
-1. allocates and clears (memset(&asy, '0', sizeof(asy));) a
+1. allocates and clears (memset(&asy, 0, sizeof(asy));) a
    struct async variable;
 2. initializes .proc and .data;
 3. calls start_async();
index a52e4f36d57a38cdb3de4db3b116ecf8f0b82ad5..a9668e5f2d2b1a7ffac45e4111ca6d8a4818af2b 100644 (file)
@@ -1,6 +1,241 @@
 strbuf API
 ==========
 
-Talk about <strbuf.h>
+strbuf's are meant to be used with all the usual C string and memory
+APIs. Given that the length of the buffer is known, it's often better to
+use the mem* functions than a str* one (memchr vs. strchr e.g.).
+Though, one has to be careful about the fact that str* functions often
+stop on NULs and that strbufs may have embedded NULs.
 
-(Pierre, JC)
+An strbuf is NUL terminated for convenience, but no function in the
+strbuf API actually relies on the string being free of NULs.
+
+strbufs has some invariants that are very important to keep in mind:
+
+. The `buf` member is never NULL, so you it can be used in any usual C
+string operations safely. strbuf's _have_ to be initialized either by
+`strbuf_init()` or by `= STRBUF_INIT` before the invariants, though.
++
+Do *not* assume anything on what `buf` really is (e.g. if it is
+allocated memory or not), use `strbuf_detach()` to unwrap a memory
+buffer from its strbuf shell in a safe way. That is the sole supported
+way. This will give you a malloced buffer that you can later `free()`.
++
+However, it it totally safe to modify anything in the string pointed by
+the `buf` member, between the indices `0` and `len-1` (inclusive).
+
+. The `buf` member is a byte array that has at least `len + 1` bytes
+  allocated. The extra byte is used to store a `'\0'`, allowing the
+  `buf` member to be a valid C-string. Every strbuf function ensure this
+  invariant is preserved.
++
+NOTE: It is OK to "play" with the buffer directly if you work it this
+      way:
++
+----
+strbuf_grow(sb, SOME_SIZE); <1>
+strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
+----
+<1> Here, the memory array starting at `sb->buf`, and of length
+`strbuf_avail(sb)` is all yours, and you can be sure that
+`strbuf_avail(sb)` is at least `SOME_SIZE`.
++
+NOTE: `SOME_OTHER_SIZE` must be smaller or equal to `strbuf_avail(sb)`.
++
+Doing so is safe, though if it has to be done in many places, adding the
+missing API to the strbuf module is the way to go.
++
+WARNING: Do _not_ assume that the area that is yours is of size `alloc
+- 1` even if it's true in the current implementation. Alloc is somehow a
+"private" member that should not be messed with. Use `strbuf_avail()`
+instead.
+
+Data structures
+---------------
+
+* `struct strbuf`
+
+This is string buffer structure. The `len` member can be used to
+determine the current length of the string, and `buf` member provides access to
+the string itself.
+
+Functions
+---------
+
+* Life cycle
+
+`strbuf_init`::
+
+       Initialize the structure. The second parameter can be zero or a bigger
+       number to allocate memory, in case you want to prevent further reallocs.
+
+`strbuf_release`::
+
+       Release a string buffer and the memory it used. You should not use the
+       string buffer after using this function, unless you initialize it again.
+
+`strbuf_detach`::
+
+       Detach the string from the strbuf and returns it; you now own the
+       storage the string occupies and it is your responsibility from then on
+       to release it with `free(3)` when you are done with it.
+
+`strbuf_attach`::
+
+       Attach a string to a buffer. You should specify the string to attach,
+       the current length of the string and the amount of allocated memory.
+       The amount must be larger than the string length, because the string you
+       pass is supposed to be a NUL-terminated string.  This string _must_ be
+       malloc()ed, and after attaching, the pointer cannot be relied upon
+       anymore, and neither be free()d directly.
+
+`strbuf_swap`::
+
+       Swap the contents of two string buffers.
+
+* Related to the size of the buffer
+
+`strbuf_avail`::
+
+       Determine the amount of allocated but unused memory.
+
+`strbuf_grow`::
+
+       Ensure that at least this amount of unused memory is available after
+       `len`. This is used when you know a typical size for what you will add
+       and want to avoid repetitive automatic resizing of the underlying buffer.
+       This is never a needed operation, but can be critical for performance in
+       some cases.
+
+`strbuf_setlen`::
+
+       Set the length of the buffer to a given value. This function does *not*
+       allocate new memory, so you should not perform a `strbuf_setlen()` to a
+       length that is larger than `len + strbuf_avail()`. `strbuf_setlen()` is
+       just meant as a 'please fix invariants from this strbuf I just messed
+       with'.
+
+`strbuf_reset`::
+
+       Empty the buffer by setting the size of it to zero.
+
+* Related to the contents of the buffer
+
+`strbuf_rtrim`::
+
+       Strip whitespace from the end of a string.
+
+`strbuf_cmp`::
+
+       Compare two buffers. Returns an integer less than, equal to, or greater
+       than zero if the first buffer is found, respectively, to be less than,
+       to match, or be greater than the second buffer.
+
+* Adding data to the buffer
+
+NOTE: All of these functions in this section will grow the buffer as
+      necessary.
+
+`strbuf_addch`::
+
+       Add a single character to the buffer.
+
+`strbuf_insert`::
+
+       Insert data to the given position of the buffer. The remaining contents
+       will be shifted, not overwritten.
+
+`strbuf_remove`::
+
+       Remove given amount of data from a given position of the buffer.
+
+`strbuf_splice`::
+
+       Remove the bytes between `pos..pos+len` and replace it with the given
+       data.
+
+`strbuf_add`::
+
+       Add data of given length to the buffer.
+
+`strbuf_addstr`::
+
+Add a NUL-terminated string to the buffer.
++
+NOTE: This function will *always* be implemented as an inline or a macro
+that expands to:
++
+----
+strbuf_add(..., s, strlen(s));
+----
++
+Meaning that this is efficient to write things like:
++
+----
+strbuf_addstr(sb, "immediate string");
+----
+
+`strbuf_addbuf`::
+
+       Copy the contents of an other buffer at the end of the current one.
+
+`strbuf_adddup`::
+
+       Copy part of the buffer from a given position till a given length to the
+       end of the buffer.
+
+`strbuf_expand`::
+
+       This function can be used to expand a format string containing
+       placeholders. To that end, it parses the string and calls the specified
+       function for every percent sign found.
++
+The callback function is given a pointer to the character after the `%`
+and a pointer to the struct strbuf.  It is expected to add the expanded
+version of the placeholder to the strbuf, e.g. to add a newline
+character if the letter `n` appears after a `%`.  The function returns
+the length of the placeholder recognized and `strbuf_expand()` skips
+over it.
++
+All other characters (non-percent and not skipped ones) are copied
+verbatim to the strbuf.  If the callback returned zero, meaning that the
+placeholder is unknown, then the percent sign is copied, too.
++
+In order to facilitate caching and to make it possible to give
+parameters to the callback, `strbuf_expand()` passes a context pointer,
+which can be used by the programmer of the callback as she sees fit.
+
+`strbuf_addf`::
+
+       Add a formatted string to the buffer.
+
+`strbuf_fread`::
+
+       Read a given size of data from a FILE* pointer to the buffer.
++
+NOTE: The buffer is rewinded if the read fails. If -1 is returned,
+`errno` must be consulted, like you would do for `read(3)`.
+`strbuf_read()`, `strbuf_read_file()` and `strbuf_getline()` has the
+same behaviour as well.
+
+`strbuf_read`::
+
+       Read the contents of a given file descriptor. The third argument can be
+       used to give a hint about the file size, to avoid reallocs.
+
+`strbuf_read_file`::
+
+       Read the contents of a file, specified by its path. The third argument
+       can be used to give a hint about the file size, to avoid reallocs.
+
+`strbuf_getline`::
+
+       Read a line from a FILE* pointer. The second argument specifies the line
+       terminator character, typically `'\n'`.
+
+`stripspace`::
+
+       Strip whitespace from a buffer. The second parameter controls if
+       comments are considered contents to be removed or not.
+
+`launch_editor`::
index bfde507e0ec9a5aadf71bfb42470b8669369ad56..64a820bf60ae5da8aaaac5fd72c169b8dd381c89 100644 (file)
@@ -1254,16 +1254,15 @@ these three "file stages" represents a different version of the file:
 
 -------------------------------------------------
 $ git show :1:file.txt # the file in a common ancestor of both branches
-$ git show :2:file.txt # the version from HEAD, but including any
-                       # nonconflicting changes from MERGE_HEAD
-$ git show :3:file.txt # the version from MERGE_HEAD, but including any
-                       # nonconflicting changes from HEAD.
+$ git show :2:file.txt # the version from HEAD.
+$ git show :3:file.txt # the version from MERGE_HEAD.
 -------------------------------------------------
 
-Since the stage 2 and stage 3 versions have already been updated with
-nonconflicting changes, the only remaining differences between them are
-the important ones; thus linkgit:git-diff[1] can use the information in
-the index to show only those conflicts.
+When you ask linkgit:git-diff[1] to show the conflicts, it runs a
+three-way diff between the conflicted merge results in the work tree with
+stages 2 and 3 to show only hunks whose contents come from both sides,
+mixed (in other words, when a hunk's merge results come only from stage 2,
+that part is not conflicting and is not shown.  Same for stage 3).
 
 The diff above shows the differences between the working-tree version of
 file.txt and the stage 2 and stage 3 versions.  So instead of preceding
index 3cabc92e7a1f8ce30eb6e5151a4c81c82468bcee..f221447478aea8628c0ab6d098338f7e8630201e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.5.5.GIT
+DEF_VER=v1.5.6.GIT
 
 LF='
 '
diff --git a/INSTALL b/INSTALL
index d9b425fa73e806751ff2636300ea24bd1e7f1e56..4a4e13fe46567a567b1ceb09a792379674dc6f57 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -67,10 +67,10 @@ Issues of note:
          that come with git (git includes the one from Mozilla, and has
          its own PowerPC and ARM optimized ones too - see the Makefile).
 
-       - "libcurl" and "curl" executable.  git-http-fetch and
-         git-fetch use them.  If you do not use http
-         transfer, you are probably OK if you do not have
-         them.
+       - libcurl library; git-http-fetch and git-fetch use them.  You
+         might also want the "curl" executable for debugging purposes.
+         If you do not use http transfer, you are probably OK if you
+         do not have them.
 
        - expat library; git-http-push uses it for remote lock
          management over DAV.  Similar to "curl" above, this is optional.
@@ -83,9 +83,6 @@ Issues of note:
        - "perl" and POSIX-compliant shells are needed to use most of
          the barebone Porcelainish scripts.
 
-       - "cpio" is used by git-clone when doing a local (possibly
-         hardlinked) clone.
-
  - Some platform specific issues are dealt with Makefile rules,
    but depending on your specific installation, you may not
    have all the libraries/tools needed, or you may have
index cce5a6e1bf9ad8f5ebf8046a5053588d18e90bc6..6a31c9fedada5d9ea331f119044b3c2383671e60 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ all::
 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
 # This also implies MOZILLA_SHA1.
 #
-# Define NO_CURL if you do not have curl installed.  git-http-pull and
+# Define NO_CURL if you do not have libcurl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
 #
@@ -564,6 +564,45 @@ endif
 ifeq ($(uname_S),GNU/kFreeBSD)
        NO_STRLCPY = YesPlease
 endif
+ifeq ($(uname_S),UnixWare)
+       CC = cc
+       NEEDS_SOCKET = YesPlease
+       NEEDS_NSL = YesPlease
+       NEEDS_SSL_WITH_CRYPTO = YesPlease
+       NEEDS_LIBICONV = YesPlease
+       SHELL_PATH = /usr/local/bin/bash
+       NO_IPV6 = YesPlease
+       NO_HSTRERROR = YesPlease
+       BASIC_CFLAGS += -Kthread
+       BASIC_CFLAGS += -I/usr/local/include
+       BASIC_LDFLAGS += -L/usr/local/lib
+       INSTALL = ginstall
+       TAR = gtar
+       NO_STRCASESTR = YesPlease
+       NO_MEMMEM = YesPlease
+endif
+ifeq ($(uname_S),SCO_SV)
+       ifeq ($(uname_R),3.2)
+               CFLAGS = -O2
+       endif
+       ifeq ($(uname_R),5)
+               CC = cc
+               BASIC_CFLAGS += -Kthread
+       endif
+       NEEDS_SOCKET = YesPlease
+       NEEDS_NSL = YesPlease
+       NEEDS_SSL_WITH_CRYPTO = YesPlease
+       NEEDS_LIBICONV = YesPlease
+       SHELL_PATH = /usr/bin/bash
+       NO_IPV6 = YesPlease
+       NO_HSTRERROR = YesPlease
+       BASIC_CFLAGS += -I/usr/local/include
+       BASIC_LDFLAGS += -L/usr/local/lib
+       NO_STRCASESTR = YesPlease
+       NO_MEMMEM = YesPlease
+       INSTALL = ginstall
+       TAR = gtar
+endif
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
@@ -1251,6 +1290,9 @@ endif
 install-doc:
        $(MAKE) -C Documentation install
 
+install-html:
+       $(MAKE) -C Documentation install-html
+
 install-info:
        $(MAKE) -C Documentation install-info
 
@@ -1373,6 +1415,14 @@ check-docs::
                documented,gitmodules | \
                documented,gitcli | \
                documented,git-tools | \
+               documented,gitcore-tutorial | \
+               documented,gitcvs-migration | \
+               documented,gitdiffcore | \
+               documented,gitglossary | \
+               documented,githooks | \
+               documented,gitrepository-layout | \
+               documented,gittutorial | \
+               documented,gittutorial-2 | \
                sentinel,not,matching,is,ok ) continue ;; \
                esac; \
                case " $(ALL_PROGRAMS) $(BUILT_INS) git gitk " in \
diff --git a/attr.c b/attr.c
index 1a15fad294c5db1f922e686995e215b94b89b9a0..0fb47d34346ca96addde5cb3722fa5e586057285 100644 (file)
--- a/attr.c
+++ b/attr.c
@@ -438,11 +438,13 @@ static void bootstrap_attr_stack(void)
                elem->prev = attr_stack;
                attr_stack = elem;
 
-               elem = read_attr(GITATTRIBUTES_FILE, 1);
-               elem->origin = strdup("");
-               elem->prev = attr_stack;
-               attr_stack = elem;
-               debug_push(elem);
+               if (!is_bare_repository()) {
+                       elem = read_attr(GITATTRIBUTES_FILE, 1);
+                       elem->origin = strdup("");
+                       elem->prev = attr_stack;
+                       attr_stack = elem;
+                       debug_push(elem);
+               }
 
                elem = read_attr_from_file(git_path(INFOATTRIBUTES_FILE), 1);
                if (!elem)
@@ -501,22 +503,24 @@ static void prepare_attr_stack(const char *path, int dirlen)
        /*
         * Read from parent directories and push them down
         */
-       while (1) {
-               char *cp;
-
-               len = strlen(attr_stack->origin);
-               if (dirlen <= len)
-                       break;
-               memcpy(pathbuf, path, dirlen);
-               memcpy(pathbuf + dirlen, "/", 2);
-               cp = strchr(pathbuf + len + 1, '/');
-               strcpy(cp + 1, GITATTRIBUTES_FILE);
-               elem = read_attr(pathbuf, 0);
-               *cp = '\0';
-               elem->origin = strdup(pathbuf);
-               elem->prev = attr_stack;
-               attr_stack = elem;
-               debug_push(elem);
+       if (!is_bare_repository()) {
+               while (1) {
+                       char *cp;
+
+                       len = strlen(attr_stack->origin);
+                       if (dirlen <= len)
+                               break;
+                       memcpy(pathbuf, path, dirlen);
+                       memcpy(pathbuf + dirlen, "/", 2);
+                       cp = strchr(pathbuf + len + 1, '/');
+                       strcpy(cp + 1, GITATTRIBUTES_FILE);
+                       elem = read_attr(pathbuf, 0);
+                       *cp = '\0';
+                       elem->origin = strdup(pathbuf);
+                       elem->prev = attr_stack;
+                       attr_stack = elem;
+                       debug_push(elem);
+               }
        }
 
        /*
index 1da22eec915539f06a4dfc1e4bb1d18482de0ede..9930cf53f5e94cb7389e7c0b2b760b113a366e51 100644 (file)
@@ -200,8 +200,8 @@ static struct option builtin_add_options[] = {
        OPT_GROUP(""),
        OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"),
        OPT_BOOLEAN('p', "patch", &patch_interactive, "interactive patching"),
-       OPT_BOOLEAN('f', NULL, &ignored_too, "allow adding otherwise ignored files"),
-       OPT_BOOLEAN('u', NULL, &take_worktree_changes, "update tracked files"),
+       OPT_BOOLEAN('f', "force", &ignored_too, "allow adding otherwise ignored files"),
+       OPT_BOOLEAN('u', "update", &take_worktree_changes, "update tracked files"),
        OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"),
        OPT_BOOLEAN( 0 , "ignore-errors", &ignore_add_errors, "just skip files which cannot be added because of errors"),
        OPT_END(),
index 200345e7fbd54d86fb1e4db228244b7a7a221562..bd343efae7d6cc6fddef4df5c3433b97bd640d3c 100644 (file)
@@ -150,7 +150,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
 static int batch_one_object(const char *obj_name, int print_contents)
 {
        unsigned char sha1[20];
-       enum object_type type;
+       enum object_type type = 0;
        unsigned long size;
        void *contents = contents;
 
@@ -159,6 +159,7 @@ static int batch_one_object(const char *obj_name, int print_contents)
 
        if (get_sha1(obj_name, sha1)) {
                printf("%s missing\n", obj_name);
+               fflush(stdout);
                return 0;
        }
 
@@ -167,8 +168,11 @@ static int batch_one_object(const char *obj_name, int print_contents)
        else
                type = sha1_object_info(sha1, &size);
 
-       if (type <= 0)
-               return 1;
+       if (type <= 0) {
+               printf("%s missing\n", obj_name);
+               fflush(stdout);
+               return 0;
+       }
 
        printf("%s %s %lu\n", sha1_to_hex(sha1), typename(type), size);
        fflush(stdout);
index f4accbe541dc36d9c80b0bce63c3247af8abf4a0..71909520710ab046fe04723f5a25ac9a53374025 100644 (file)
@@ -76,7 +76,7 @@ static char *get_repo_path(const char *repo, int *is_bundle)
                path = mkpath("%s%s", repo, suffix[i]);
                if (!stat(path, &st) && S_ISDIR(st.st_mode)) {
                        *is_bundle = 0;
-                       return xstrdup(make_absolute_path(path));
+                       return xstrdup(make_nonrelative_path(path));
                }
        }
 
@@ -85,7 +85,7 @@ static char *get_repo_path(const char *repo, int *is_bundle)
                path = mkpath("%s%s", repo, bundle_suffix[i]);
                if (!stat(path, &st) && S_ISREG(st.st_mode)) {
                        *is_bundle = 1;
-                       return xstrdup(make_absolute_path(path));
+                       return xstrdup(make_nonrelative_path(path));
                }
        }
 
index b294c1f88c1eecde8d96d265c72376c789f24899..a33f43a209efc2abef209b10b55fa2fce1c7ce18 100644 (file)
@@ -502,7 +502,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
 
        fp = fopen(git_path(commit_editmsg), "w");
        if (fp == NULL)
-               die("could not open %s", git_path(commit_editmsg));
+               die("could not open %s: %s",
+                   git_path(commit_editmsg), strerror(errno));
 
        if (cleanup_mode != CLEANUP_NONE)
                stripspace(&sb, 0);
@@ -883,10 +884,19 @@ static void add_parent(struct strbuf *sb, const unsigned char *sha1)
 {
        struct object *obj = parse_object(sha1);
        const char *parent = sha1_to_hex(sha1);
+       const char *cp;
+
        if (!obj)
                die("Unable to find commit parent %s", parent);
        if (obj->type != OBJ_COMMIT)
                die("Parent %s isn't a proper commit", parent);
+
+       for (cp = sb->buf; cp && (cp = strstr(cp, "\nparent ")); cp += 8) {
+               if (!memcmp(cp + 8, parent, 40) && cp[48] == '\n') {
+                       error("duplicate parent %s ignored", parent);
+                       return;
+               }
+       }
        strbuf_addf(sb, "parent %s\n", parent);
 }
 
index df554b30af3ddcb4d0141838c06f82d433cbf3a4..3da99c1d06f1eeb85e760036dc881282558603d6 100644 (file)
@@ -80,12 +80,13 @@ static int get_name(const char *path, const unsigned char *sha1, int flag, void
         * Otherwise only annotated tags are used.
         */
        if (might_be_tag) {
-               if (is_tag) {
+               if (is_tag)
                        prio = 2;
-                       if (pattern && fnmatch(pattern, path + 10, 0))
-                               prio = 0;
-               } else
+               else
                        prio = 1;
+
+               if (pattern && fnmatch(pattern, path + 10, 0))
+                       prio = 0;
        }
        else
                prio = 0;
old mode 100755 (executable)
new mode 100644 (file)
index 1dfc01e..d0a462f
@@ -188,6 +188,8 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
        mark_object(&commit->object);
        if (!is_encoding_utf8(encoding))
                reencoded = reencode_string(message, "UTF-8", encoding);
+       if (!commit->parents)
+               printf("reset %s\n", (const char*)commit->util);
        printf("commit %s\nmark :%d\n%.*s\n%.*s\ndata %u\n%s",
               (const char *)commit->util, last_idnum,
               (int)(author_end - author), author,
index 362c290028d68ebc2e589d424bc42cd5e8630a4e..4aa28a1babbb275df8110fd80311f34a12fea750 100644 (file)
@@ -555,9 +555,19 @@ static void update_file_flags(const unsigned char *sha,
                        die("cannot read object %s '%s'", sha1_to_hex(sha), path);
                if (type != OBJ_BLOB)
                        die("blob expected for %s '%s'", sha1_to_hex(sha), path);
+               if (S_ISREG(mode)) {
+                       struct strbuf strbuf;
+                       strbuf_init(&strbuf, 0);
+                       if (convert_to_working_tree(path, buf, size, &strbuf)) {
+                               free(buf);
+                               size = strbuf.len;
+                               buf = strbuf_detach(&strbuf, NULL);
+                       }
+               }
 
                if (make_room_for_path(path) < 0) {
                        update_wd = 0;
+                       free(buf);
                        goto update_index;
                }
                if (S_ISREG(mode) || (!has_symlinks && S_ISLNK(mode))) {
@@ -580,6 +590,7 @@ static void update_file_flags(const unsigned char *sha,
                } else
                        die("do not know what to do with %06o %s '%s'",
                            mode, sha1_to_hex(sha), path);
+               free(buf);
        }
  update_index:
        if (update_cache)
index cde5de56fa43c1552722965343867b2baaebdaf4..f153da012f4e89ff8744ede70911cd4690de79b2 100644 (file)
@@ -280,9 +280,13 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
                int i, max;
 
                max = get_max_object_index();
-               for (i = 0; i < max; i++)
-                       show_name(get_indexed_object(i), NULL,
+               for (i = 0; i < max; i++) {
+                       struct object *obj = get_indexed_object(i);
+                       if (!obj)
+                               continue;
+                       show_name(obj, NULL,
                                  always, allow_undefined, data.name_only);
+               }
        } else {
                int i;
                for (i = 0; i < revs.nr; i++)
index 897d1dcac6b34e0c631c94b98c489db075e90bb2..b151e24ff94e06840db7e57014fe4a73ea811575 100644 (file)
@@ -307,6 +307,8 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
                        unlink(newlog_path);
                } else if (cmd->updateref && commit_ref(lock)) {
                        status |= error("Couldn't set %s", lock->ref_name);
+               } else {
+                       adjust_shared_perm(log_file);
                }
        }
        free(newlog_path);
index c49f00f58b3cda6ac76a93d5f0bb36e8bc5bafb1..145dd8568c7a644344d8bb25ba395b10c5835c5c 100644 (file)
@@ -419,52 +419,68 @@ static void show_list(const char *title, struct path_list *list)
        printf("\n");
 }
 
-static int show_or_prune(int argc, const char **argv, int prune)
+static int get_remote_ref_states(const char *name,
+                                struct ref_states *states,
+                                int query)
 {
-       int dry_run = 0, result = 0;
+       struct transport *transport;
+       const struct ref *ref;
+
+       states->remote = remote_get(name);
+       if (!states->remote)
+               return error("No such remote: %s", name);
+
+       read_branches();
+
+       if (query) {
+               transport = transport_get(NULL, states->remote->url_nr > 0 ?
+                       states->remote->url[0] : NULL);
+               ref = transport_get_remote_refs(transport);
+               transport_disconnect(transport);
+
+               get_ref_states(ref, states);
+       }
+
+       return 0;
+}
+
+static int append_ref_to_tracked_list(const char *refname,
+       const unsigned char *sha1, int flags, void *cb_data)
+{
+       struct ref_states *states = cb_data;
+       struct refspec refspec;
+
+       memset(&refspec, 0, sizeof(refspec));
+       refspec.dst = (char *)refname;
+       if (!remote_find_tracking(states->remote, &refspec)) {
+               path_list_append(skip_prefix(refspec.src, "refs/heads/"),
+                       &states->tracked);
+       }
+
+       return 0;
+}
+
+static int show(int argc, const char **argv)
+{
+       int no_query = 0, result = 0;
        struct option options[] = {
                OPT_GROUP("show specific options"),
-               OPT__DRY_RUN(&dry_run),
+               OPT_BOOLEAN('n', NULL, &no_query, "do not query remotes"),
                OPT_END()
        };
        struct ref_states states;
 
        argc = parse_options(argc, argv, options, builtin_remote_usage, 0);
 
-       if (argc < 1) {
-               if (!prune)
-                       return show_all();
-               usage_with_options(builtin_remote_usage, options);
-       }
+       if (argc < 1)
+               return show_all();
 
        memset(&states, 0, sizeof(states));
        for (; argc; argc--, argv++) {
-               struct transport *transport;
-               const struct ref *ref;
                struct strbuf buf;
-               int i, got_states;
-
-               states.remote = remote_get(*argv);
-               if (!states.remote)
-                       return error("No such remote: %s", *argv);
-               transport = transport_get(NULL, states.remote->url_nr > 0 ?
-                       states.remote->url[0] : NULL);
-               ref = transport_get_remote_refs(transport);
-               transport_disconnect(transport);
-
-               read_branches();
-               got_states = get_ref_states(ref, &states);
-               if (got_states)
-                       result = error("Error getting local info for '%s'",
-                                       states.remote->name);
+               int i;
 
-               if (prune) {
-                       for (i = 0; i < states.stale.nr; i++) {
-                               const char *refname = states.stale.items[i].util;
-                               result |= delete_ref(refname, NULL);
-                       }
-                       goto cleanup_states;
-               }
+               get_remote_ref_states(*argv, &states, !no_query);
 
                printf("* remote %s\n  URL: %s\n", *argv,
                        states.remote->url_nr > 0 ?
@@ -486,17 +502,19 @@ static int show_or_prune(int argc, const char **argv, int prune)
                        printf("\n");
                }
 
-               if (got_states)
-                       continue;
-               strbuf_init(&buf, 0);
-               strbuf_addf(&buf, "  New remote branch%%s (next fetch will "
-                       "store in remotes/%s)", states.remote->name);
-               show_list(buf.buf, &states.new);
-               strbuf_release(&buf);
-               show_list("  Stale tracking branch%s (use 'git remote prune')",
-                               &states.stale);
-               show_list("  Tracked remote branch%s",
-                               &states.tracked);
+               if (!no_query) {
+                       strbuf_init(&buf, 0);
+                       strbuf_addf(&buf, "  New remote branch%%s (next fetch "
+                               "will store in remotes/%s)", states.remote->name);
+                       show_list(buf.buf, &states.new);
+                       strbuf_release(&buf);
+                       show_list("  Stale tracking branch%s (use 'git remote "
+                               "prune')", &states.stale);
+               }
+
+               if (no_query)
+                       for_each_ref(append_ref_to_tracked_list, &states);
+               show_list("  Tracked remote branch%s", &states.tracked);
 
                if (states.remote->push_refspec_nr) {
                        printf("  Local branch%s pushed with 'git push'\n   ",
@@ -511,7 +529,55 @@ static int show_or_prune(int argc, const char **argv, int prune)
                        }
                        printf("\n");
                }
-cleanup_states:
+
+               /* NEEDSWORK: free remote */
+               path_list_clear(&states.new, 0);
+               path_list_clear(&states.stale, 0);
+               path_list_clear(&states.tracked, 0);
+       }
+
+       return result;
+}
+
+static int prune(int argc, const char **argv)
+{
+       int dry_run = 0, result = 0;
+       struct option options[] = {
+               OPT_GROUP("prune specific options"),
+               OPT__DRY_RUN(&dry_run),
+               OPT_END()
+       };
+       struct ref_states states;
+
+       argc = parse_options(argc, argv, options, builtin_remote_usage, 0);
+
+       if (argc < 1)
+               usage_with_options(builtin_remote_usage, options);
+
+       memset(&states, 0, sizeof(states));
+       for (; argc; argc--, argv++) {
+               int i;
+
+               get_remote_ref_states(*argv, &states, 1);
+
+               if (states.stale.nr) {
+                       printf("Pruning %s\n", *argv);
+                       printf("URL: %s\n",
+                              states.remote->url_nr
+                              ? states.remote->url[0]
+                              : "(no URL)");
+               }
+
+               for (i = 0; i < states.stale.nr; i++) {
+                       const char *refname = states.stale.items[i].util;
+
+                       if (!dry_run)
+                               result |= delete_ref(refname, NULL);
+
+                       printf(" * [%s] %s\n", dry_run ? "would prune" : "pruned",
+                              skip_prefix(refname, "refs/remotes/"));
+               }
+
                /* NEEDSWORK: free remote */
                path_list_clear(&states.new, 0);
                path_list_clear(&states.stale, 0);
@@ -632,9 +698,9 @@ int cmd_remote(int argc, const char **argv, const char *prefix)
        else if (!strcmp(argv[0], "rm"))
                result = rm(argc, argv);
        else if (!strcmp(argv[0], "show"))
-               result = show_or_prune(argc, argv, 0);
+               result = show(argc, argv);
        else if (!strcmp(argv[0], "prune"))
-               result = show_or_prune(argc, argv, 1);
+               result = prune(argc, argv);
        else if (!strcmp(argv[0], "update"))
                result = update(argc, argv);
        else {
index 5c811423cc1234d933cff013f9923b45f19dc6fa..85222d9bc591e0b603bf6f33c32d6bb1bad479ee 100644 (file)
@@ -43,7 +43,7 @@ static void read_rr(struct path_list *rr)
                        ; /* do nothing */
                if (i == sizeof(buf))
                        die("filename too long");
-               path_list_insert(buf, rr)->util = xstrdup(name);
+               path_list_insert(buf, rr)->util = name;
        }
        fclose(in);
 }
index 8bda1117e4c56b38ac799f60d39310ffc51b9b63..b460b2da6f41797ca3190646eb3fe5cafd1abd84 100644 (file)
--- a/builtin.h
+++ b/builtin.h
@@ -5,6 +5,7 @@
 
 extern const char git_version_string[];
 extern const char git_usage_string[];
+extern const char git_more_info_string[];
 
 extern void list_common_cmds_help(void);
 extern void help_unknown_cmd(const char *cmd);
diff --git a/cache.h b/cache.h
index 092a997b073090e14feaa4825e821af040101eb6..81b7e17de26ae33249c60b101f5718cb5c5e5699 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -524,6 +524,7 @@ static inline int is_absolute_path(const char *path)
        return path[0] == '/';
 }
 const char *make_absolute_path(const char *path);
+const char *make_nonrelative_path(const char *path);
 
 /* Read and unpack a sha1 file into memory, write memory to a sha1 file */
 extern int sha1_object_info(const unsigned char *, unsigned long *);
@@ -535,9 +536,6 @@ extern int force_object_loose(const unsigned char *sha1, time_t mtime);
 
 extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);
 
-extern int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
-                             size_t bufsize, size_t *bufposn);
-extern int write_sha1_to_fd(int fd, const unsigned char *sha1);
 extern int move_temp_to_file(const char *tmpfile, const char *filename);
 
 extern int has_sha1_pack(const unsigned char *sha1, const char **ignore);
@@ -696,8 +694,6 @@ extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, ch
 extern int server_supports(const char *feature);
 
 extern struct packed_git *parse_pack_index(unsigned char *sha1);
-extern struct packed_git *parse_pack_index_file(const unsigned char *sha1,
-                                               const char *idx_path);
 
 extern void prepare_packed_git(void);
 extern void reprepare_packed_git(void);
index 94d5b3d2618d335585084170ef6a3a8e67f34c62..e2d8624d9c19adde87ae521361f4ccd8260c06a0 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -243,7 +243,6 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
        unsigned char parent[20];
        struct commit_list **pptr;
        struct commit_graft *graft;
-       unsigned n_refs = 0;
 
        if (item->object.parsed)
                return 0;
@@ -255,8 +254,6 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
                return error("bad tree pointer in commit %s",
                             sha1_to_hex(item->object.sha1));
        item->tree = lookup_tree(parent);
-       if (item->tree)
-               n_refs++;
        bufptr += 46; /* "tree " + "hex sha1" + "\n" */
        pptr = &item->parents;
 
@@ -272,10 +269,8 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
                if (graft)
                        continue;
                new_parent = lookup_commit(parent);
-               if (new_parent) {
+               if (new_parent)
                        pptr = &commit_list_insert(new_parent, pptr)->next;
-                       n_refs++;
-               }
        }
        if (graft) {
                int i;
@@ -285,7 +280,6 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
                        if (!new_parent)
                                continue;
                        pptr = &commit_list_insert(new_parent, pptr)->next;
-                       n_refs++;
                }
        }
        item->date = parse_commit_date(bufptr, tail);
index 82584e91532264790bac7efd953f9f5da09576c1..7c2856efc92ca55e3cf03fcf1c72ffb70318f7c3 100644 (file)
@@ -158,7 +158,7 @@ AC_CHECK_LIB([crypto], [SHA1_Init],
 AC_SUBST(NEEDS_SSL_WITH_CRYPTO)
 AC_SUBST(NO_OPENSSL)
 #
-# Define NO_CURL if you do not have curl installed.  git-http-pull and
+# Define NO_CURL if you do not have libcurl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
 AC_CHECK_LIB([curl], [curl_global_init],
index 16984632d984006e2f2867a26714086bf3045ca3..ebf7cde5c023c86ee7ed0751730e09d1245930da 100755 (executable)
@@ -500,7 +500,10 @@ _git_add ()
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
-               __gitcomp "--interactive --refresh"
+               __gitcomp "
+                       --interactive --refresh --patch --update --dry-run
+                       --ignore-errors
+                       "
                return
        esac
        COMPREPLY=()
@@ -758,6 +761,10 @@ _git_log ()
                        --pretty= --name-status --name-only --raw
                        --not --all
                        --left-right --cherry-pick
+                       --graph
+                       --stat --numstat --shortstat
+                       --decorate --diff-filter=
+                       --color-words --walk-reflogs
                        "
                return
                ;;
index 2557a7667f1d3a272698b213e8cf9cfbafddaea2..4fa853fae76dc2ac132e489f5f1b630b3fc0f1de 100644 (file)
@@ -232,8 +232,10 @@ and returns the process output as a string, or nil if the git failed."
 
 (defun git-run-command-region (buffer start end env &rest args)
   "Run a git command with specified buffer region as input."
-  (unless (eq 0 (let ((process-environment (append (git-get-env-strings env)
-                                                   process-environment)))
+  (unless (eq 0 (if env
+                    (git-run-process-region
+                     buffer start end "env"
+                     (append (git-get-env-strings env) (list "git") args))
                   (git-run-process-region
                    buffer start end "git" args)))
     (error "Failed to run \"git %s\":\n%s" (mapconcat (lambda (x) x) args " ") (buffer-string))))
@@ -248,8 +250,9 @@ and returns the process output as a string, or nil if the git failed."
             (erase-buffer)
             (cd dir)
             (setq status
-                  (let ((process-environment (append (git-get-env-strings env)
-                                                     process-environment)))
+                  (if env
+                      (apply #'call-process "env" nil (list buffer t) nil
+                             (append (git-get-env-strings env) (list hook-name) args))
                     (apply #'call-process hook-name nil (list buffer t) nil args))))
           (display-message-or-buffer buffer)
           (eq 0 status)))))
diff --git a/contrib/thunderbird-patch-inline/README b/contrib/thunderbird-patch-inline/README
new file mode 100644 (file)
index 0000000..39f96aa
--- /dev/null
@@ -0,0 +1,20 @@
+appp.sh is a script that is supposed to be used together with ExternalEditor
+for Mozilla Thundebird. It will let you include patches inline in e-mails
+in an easy way.
+
+Usage:
+- Generate the patch with git format-patch.
+- Start writing a new e-mail in Thunderbird.
+- Press the external editor button (or Ctrl-E) to run appp.sh
+- Select the previosly generated patch file.
+- Finish editing the e-mail.
+
+Any text that is entered into the message editor before appp.sh is called
+will be moved to the section between the --- and the diffstat.
+
+All S-O-B:s and Cc:s in the patch will be added to the CC list.
+
+To set it up, just install External Editor and tell it to use appp.sh as the
+editor.
+
+Zenity is a required dependency.
diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh
new file mode 100755 (executable)
index 0000000..cc518f3
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/bash
+# Copyright 2008 Lukas Sandström <luksan@gmail.com>
+#
+# AppendPatch - A script to be used together with ExternalEditor
+# for Mozilla Thunderbird to properly include pathes inline i e-mails.
+
+# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
+
+CONFFILE=~/.appprc
+
+SEP="-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-"
+if [ -e "$CONFFILE" ] ; then
+       LAST_DIR=`grep -m 1 "^LAST_DIR=" "${CONFFILE}"|sed -e 's/^LAST_DIR=//'`
+       cd "${LAST_DIR}"
+else
+       cd > /dev/null
+fi
+
+PATCH=$(zenity --file-selection)
+
+if [ "$?" != "0" ] ; then
+       #zenity --error --text "No patchfile given."
+       exit 1
+fi
+
+cd - > /dev/null
+
+SUBJECT=`sed -n -e '/^Subject: /p' "${PATCH}"`
+HEADERS=`sed -e '/^'"${SEP}"'$/,$d' $1`
+BODY=`sed -e "1,/${SEP}/d" $1`
+CMT_MSG=`sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}"`
+DIFF=`sed -e '1,/^---$/d' "${PATCH}"`
+
+CCS=`echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
+       -e 's/^Signed-off-by: \(.*\)/\1,/gp'`
+
+echo "$SUBJECT" > $1
+echo "Cc: $CCS" >> $1
+echo "$HEADERS" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1
+echo "$SEP" >> $1
+
+echo "$CMT_MSG" >> $1
+echo "---" >> $1
+if [ "x${BODY}x" != "xx" ] ; then
+       echo >> $1
+       echo "$BODY" >> $1
+       echo >> $1
+fi
+echo "$DIFF" >> $1
+
+LAST_DIR=`dirname "${PATCH}"`
+
+grep -v "^LAST_DIR=" "${CONFFILE}" > "${CONFFILE}_"
+echo "LAST_DIR=${LAST_DIR}" >> "${CONFFILE}_"
+mv "${CONFFILE}_" "${CONFFILE}"
diff --git a/date.c b/date.c
index a74ed86422763e7d7e5dccf73530e52551a6929a..1a4eb87b01d5dab0c4a0c455bbef3fda132415ee 100644 (file)
--- a/date.c
+++ b/date.c
@@ -682,10 +682,8 @@ static void date_am(struct tm *tm, int *num)
 
 static void date_never(struct tm *tm, int *num)
 {
-       tm->tm_mon = tm->tm_wday = tm->tm_yday
-               = tm->tm_hour = tm->tm_min = tm->tm_sec = 0;
-       tm->tm_year = 70;
-       tm->tm_mday = 1;
+       time_t n = 0;
+       localtime_r(&n, tm);
 }
 
 static const struct special {
diff --git a/diff.c b/diff.c
index 62fdc5492bbe5dacab6bc5b615a76ba5cd9de760..526249008662d4041e5623914c1a420f3443c4d4 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -514,9 +514,15 @@ const char *diff_get_color(int diff_use_color, enum color_diff ix)
 
 static void emit_line(FILE *file, const char *set, const char *reset, const char *line, int len)
 {
+       int has_trailing_newline = (len > 0 && line[len-1] == '\n');
+       if (has_trailing_newline)
+               len--;
+
        fputs(set, file);
        fwrite(line, len, 1, file);
        fputs(reset, file);
+       if (has_trailing_newline)
+               fputc('\n', file);
 }
 
 static void emit_add_line(const char *reset, struct emit_callback *ecbdata, const char *line, int len)
index b48096ec2037e3f14d4bdf89a0afe4623aff090e..2c517ede590c5c3274b03d1c980f9a847cc7d643 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -421,7 +421,7 @@ do
        else
            action=yes
        fi
-       FIRSTLINE=$(head -1 "$dotest/final-commit")
+       FIRSTLINE=$(sed 1q "$dotest/final-commit")
 
        if test $action = skip
        then
index 01c4045e89a2e156062255193ed5d865fdf8a922..c04e8baa87f263b426de17556f63351ae254ae95 100644 (file)
@@ -39,7 +39,7 @@
 /* Approximation of the length of the decimal representation of this type. */
 #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)
 
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
 #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
 #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #endif
index 5a0255052c9360fdc4cbbdd79008a206ab3e4623..cacbfc0259fd1ae353117d93e345cd8c4dd41188 100755 (executable)
@@ -227,6 +227,7 @@ sub conn {
                                $proxyport = $1;
                        }
                }
+               $repo ||= '/';
 
                # if username is not explicit in CVSROOT, then use current user, as cvs would
                $user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user;
index 6f91c8f845b2c4ef426a6451ac07abae2bce9488..af0fde538cefe8531031629cf78847da5eac4fa5 100755 (executable)
@@ -22,10 +22,10 @@ restart        restart the web server
 . git-sh-setup
 
 fqgitdir="$GIT_DIR"
-local="`git config --bool --get instaweb.local`"
-httpd="`git config --get instaweb.httpd`"
-port=`git config --get instaweb.port`
-module_path="`git config --get instaweb.modulepath`"
+local="$(git config --bool --get instaweb.local)"
+httpd="$(git config --get instaweb.httpd)"
+port=$(git config --get instaweb.port)
+module_path="$(git config --get instaweb.modulepath)"
 
 conf="$GIT_DIR/gitweb/httpd.conf"
 
@@ -37,11 +37,21 @@ test -z "$httpd" && httpd='lighttpd -f'
 # any untaken local port will do...
 test -z "$port" && port=1234
 
-start_httpd () {
-       httpd_only="`echo $httpd | cut -f1 -d' '`"
+resolve_full_httpd () {
+       case "$httpd" in
+       *apache2*|*lighttpd*)
+               # ensure that the apache2/lighttpd command ends with "-f"
+               if ! echo "$httpd" | grep -- '-f *$' >/dev/null 2>&1
+               then
+                       httpd="$httpd -f"
+               fi
+               ;;
+       esac
+
+       httpd_only="$(echo $httpd | cut -f1 -d' ')"
        if case "$httpd_only" in /*) : ;; *) which $httpd_only >/dev/null;; esac
        then
-               $httpd "$fqgitdir/gitweb/httpd.conf"
+               full_httpd=$httpd
        else
                # many httpds are installed in /usr/sbin or /usr/local/sbin
                # these days and those are not in most users $PATHs
@@ -51,16 +61,23 @@ start_httpd () {
                do
                        if test -x "$i/$httpd_only"
                        then
-                               # don't quote $httpd, there can be
-                               # arguments to it (-f)
-                               $i/$httpd "$fqgitdir/gitweb/httpd.conf"
+                               full_httpd=$i/$httpd
                                return
                        fi
                done
-               echo "$httpd_only not found. Install $httpd_only or use" \
-                    "--httpd to specify another http daemon."
+
+               echo >&2 "$httpd_only not found. Install $httpd_only or use" \
+                    "--httpd to specify another httpd daemon."
                exit 1
        fi
+}
+
+start_httpd () {
+       # here $httpd should have a meaningful value
+       resolve_full_httpd
+
+       # don't quote $full_httpd, there can be arguments to it (-f)
+       $full_httpd "$fqgitdir/gitweb/httpd.conf"
        if test $? != 0; then
                echo "Could not execute http daemon $httpd."
                exit 1
@@ -68,7 +85,7 @@ start_httpd () {
 }
 
 stop_httpd () {
-       test -f "$fqgitdir/pid" && kill `cat "$fqgitdir/pid"`
+       test -f "$fqgitdir/pid" && kill $(cat "$fqgitdir/pid")
 }
 
 while test $# != 0
@@ -116,7 +133,7 @@ do
 done
 
 mkdir -p "$GIT_DIR/gitweb/tmp"
-GIT_EXEC_PATH="`git --exec-path`"
+GIT_EXEC_PATH="$(git --exec-path)"
 GIT_DIR="$fqgitdir"
 export GIT_EXEC_PATH GIT_DIR
 
@@ -215,7 +232,8 @@ PerlPassEnv GIT_EXEC_DIR
 EOF
        else
                # plain-old CGI
-               list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
+               resolve_full_httpd
+               list_mods=$(echo "$full_httpd" | sed "s/-f$/-l/")
                $list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \
                echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
                cat >> "$conf" <<EOF
index 5fc5f5201f8ea8e155a25795b93bfea86fc12d12..8026ccff4a459a75148740382646f7fe10b00255 100755 (executable)
@@ -13,7 +13,7 @@ n                    don't show a diffstat at the end of the merge
 summary              (synonym to --stat)
 log                  add list of one-line log to merge commit message
 squash               create a single commit instead of doing a merge
-commit               perform a commit if the merge sucesses (default)
+commit               perform a commit if the merge succeeds (default)
 ff                   allow fast forward (default)
 s,strategy=          merge strategy to use
 m,message=           message to be used for the merge commit (if any)
index 8ee08ff2fd4e414337f79a7e52d29ccda72377e6..a64d9d57ab5943ac4e065866ce0ccd7de5364a9a 100755 (executable)
@@ -475,6 +475,9 @@ do
 
                require_clean_work_tree
 
+               UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
+               test -z "$ONTO" && ONTO=$UPSTREAM
+
                if test ! -z "$2"
                then
                        output git show-ref --verify --quiet "refs/heads/$2" ||
@@ -484,12 +487,8 @@ do
                fi
 
                HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
-               UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
-
                mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
 
-               test -z "$ONTO" && ONTO=$UPSTREAM
-
                : > "$DOTEST"/interactive || die "Could not mark as interactive"
                git symbolic-ref HEAD > "$DOTEST"/head-name 2> /dev/null ||
                        echo "detached HEAD" > "$DOTEST"/head-name
@@ -531,9 +530,9 @@ do
 # Rebase $SHORTUPSTREAM..$SHORTHEAD onto $SHORTONTO
 #
 # Commands:
-#  pick = use commit
-#  edit = use commit, but stop for amending
-#  squash = use commit, but meld into previous commit
+#  p, pick = use commit
+#  e, edit = use commit, but stop for amending
+#  s, squash = use commit, but meld into previous commit
 #
 # If you remove a line here THAT COMMIT WILL BE LOST.
 # However, if you remove everything, the rebase will be aborted.
index a598fdc890c817875766c29aa714d622af770f4b..0b04ba32f0399d338be587ac2d9ad4620705c9a1 100755 (executable)
@@ -209,6 +209,7 @@ sub format_2822_time {
     "bcc" => \@bcclist,
     "aliasesfile" => \@alias_files,
     "suppresscc" => \@suppress_cc,
+    "envelopesender" => \$envelope_sender,
 );
 
 # Handle Uncouth Termination
@@ -441,7 +442,7 @@ sub read_config {
        }
 
        my $to = $_;
-       push @to, split /,/, $to;
+       push @to, split /,\s*/, $to;
        $prompting++;
 }
 
index 100737210de3c76682ab3803626a36328fb27ca1..3eb78cc724187998aa9ecf71509325631b8668c9 100755 (executable)
@@ -45,8 +45,8 @@ resolve_relative_url ()
        branch="$(git symbolic-ref HEAD 2>/dev/null)"
        remote="$(git config branch.${branch#refs/heads/}.remote)"
        remote="${remote:-origin}"
-       remoteurl="$(git config remote.$remote.url)" ||
-               die "remote ($remote) does not have a url in .git/config"
+       remoteurl=$(git config "remote.$remote.url") ||
+               die "remote ($remote) does not have a url defined in .git/config"
        url="$1"
        while test -n "$url"
        do
@@ -73,7 +73,7 @@ resolve_relative_url ()
 module_name()
 {
        # Do we have "submodule.<something>.path = $1" defined in .gitmodules file?
-       re=$(printf '%s' "$1" | sed -e 's/[].[^$\\*]/\\&/g')
+       re=$(printf '%s\n' "$1" | sed -e 's/[].[^$\\*]/\\&/g')
        name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
                sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )
        test -z "$name" &&
@@ -178,7 +178,8 @@ cmd_add()
                case "$repo" in
                ./*|../*)
                        # dereference source url relative to parent's url
-                       realrepo="$(resolve_relative_url $repo)" ;;
+                       realrepo=$(resolve_relative_url "$repo") || exit
+                       ;;
                *)
                        # Turn the source into an absolute path if
                        # it is local
@@ -246,7 +247,7 @@ cmd_init()
                # Possibly a url relative to parent
                case "$url" in
                ./*|../*)
-                       url="$(resolve_relative_url "$url")"
+                       url=$(resolve_relative_url "$url") || exit
                        ;;
                esac
 
index 47b0c37d17101e17e34fab8ed04c3409fe106e87..a54979dc51f0fc392b357da9071b6ea19aac4798 100755 (executable)
@@ -1023,6 +1023,7 @@ sub get_commit_entry {
                my $in_msg = 0;
                my $author;
                my $saw_from = 0;
+               my $msgbuf = "";
                while (<$msg_fh>) {
                        if (!$in_msg) {
                                $in_msg = 1 if (/^\s*$/);
@@ -1035,14 +1036,15 @@ sub get_commit_entry {
                                if (/^From:/ || /^Signed-off-by:/) {
                                        $saw_from = 1;
                                }
-                               print $log_fh $_ or croak $!;
+                               $msgbuf .= $_;
                        }
                }
+               $msgbuf =~ s/\s+$//s;
                if ($Git::SVN::_add_author_from && defined($author)
                    && !$saw_from) {
-                       print $log_fh "\nFrom: $author\n"
-                             or croak $!;
+                       $msgbuf .= "\n\nFrom: $author";
                }
+               print $log_fh $msgbuf or croak $!;
                command_close_pipe($msg_fh, $ctx);
        }
        close $log_fh or croak $!;
diff --git a/git.c b/git.c
index 272bf03da3b3aee7dbdb088ddc1042c18567492a..59f0fcc1f2278d3234a7e4a306db56c7cfcde9a2 100644 (file)
--- a/git.c
+++ b/git.c
@@ -6,6 +6,9 @@
 const char git_usage_string[] =
        "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
 
+const char git_more_info_string[] =
+       "See 'git help COMMAND' for more information on a specific command.";
+
 static int handle_options(const char*** argv, int* argc, int* envchanged)
 {
        int handled = 0;
@@ -283,7 +286,7 @@ static void handle_internal_command(int argc, const char **argv)
                { "checkout-index", cmd_checkout_index,
                        RUN_SETUP | NEED_WORK_TREE},
                { "check-ref-format", cmd_check_ref_format },
-               { "check-attr", cmd_check_attr, RUN_SETUP | NEED_WORK_TREE },
+               { "check-attr", cmd_check_attr, RUN_SETUP },
                { "cherry", cmd_cherry, RUN_SETUP },
                { "cherry-pick", cmd_cherry_pick, RUN_SETUP | NEED_WORK_TREE },
                { "clone", cmd_clone },
@@ -427,6 +430,7 @@ int main(int argc, const char **argv)
                /* The user didn't specify a command; give them help */
                printf("usage: %s\n\n", git_usage_string);
                list_common_cmds_help();
+               printf("\n%s\n", git_more_info_string);
                exit(1);
        }
        cmd = argv[0];
index 97a26be29a5e6e64ca33760ba0010693e0fa07f9..3d7f3ef4afeccefd56330342715cb89e73b94775 100644 (file)
@@ -12,7 +12,7 @@ BuildRequires:        zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel, gettex
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:      perl-Git = %{version}-%{release}
-Requires:      zlib >= 1.2, rsync, curl, less, openssh-clients, expat
+Requires:      zlib >= 1.2, rsync, less, openssh-clients, expat
 Provides:      git-core = %{version}-%{release}
 Obsoletes:     git-core <= 1.5.4.2
 Obsoletes:     git-p4
@@ -187,6 +187,9 @@ rm -rf $RPM_BUILD_ROOT
 # No files for you!
 
 %changelog
+* Sun Jun 15 2008 Junio C Hamano <gitster@pobox.com>
+- Remove curl from Requires list.
+
 * Fri Feb 15 2008 Kristian Høgsberg <krh@redhat.com>
 - Rename git-core to just git and rename meta package from git to git-all.
 
index 22bcd18a4671b3bdd78f065c65bdaf042ba4a77e..fddcb45817ed6839ba95965d7e57e9a2e04ae30a 100644 (file)
@@ -296,7 +296,7 @@ proc start_rev_list {view} {
     global startmsecs commitidx viewcomplete curview
     global commfd leftover tclencoding
     global viewargs viewargscmd viewfiles vfilelimit
-    global showlocalchanges commitinterest mainheadid
+    global showlocalchanges commitinterest
     global viewactive loginstance viewinstances vmergeonly
     global pending_select mainheadid
     global vcanopt vflags vrevs vorigargs
@@ -358,7 +358,7 @@ proc start_rev_list {view} {
     set viewinstances($view) [list $i]
     set commfd($i) $fd
     set leftover($i) {}
-    if {$showlocalchanges} {
+    if {$showlocalchanges && $mainheadid ne {}} {
        lappend commitinterest($mainheadid) {dodiffindex}
     }
     fconfigure $fd -blocking 0 -translation lf -eofchar {}
@@ -406,7 +406,7 @@ proc getcommits {} {
 
 proc updatecommits {} {
     global curview vcanopt vorigargs vfilelimit viewinstances
-    global viewactive viewcomplete loginstance tclencoding mainheadid
+    global viewactive viewcomplete loginstance tclencoding
     global startmsecs commfd showneartags showlocalchanges leftover
     global mainheadid pending_select
     global isworktree
@@ -1467,7 +1467,6 @@ proc chewcommits {} {
     if {$viewcomplete($curview)} {
        global commitidx varctok
        global numcommits startmsecs
-       global mainheadid nullid
 
        if {[info exists pending_select]} {
            set row [first_real_row]
@@ -1604,12 +1603,10 @@ proc readrefs {} {
     set mainhead {}
     set mainheadid {}
     catch {
+       set mainheadid [exec git rev-parse HEAD]
        set thehead [exec git symbolic-ref HEAD]
        if {[string match "refs/heads/*" $thehead]} {
            set mainhead [string range $thehead 11 end]
-           if {[info exists headids($mainhead)]} {
-               set mainheadid $headids($mainhead)
-           }
        }
     }
 }
@@ -4022,6 +4019,7 @@ proc layoutmore {} {
 proc doshowlocalchanges {} {
     global curview mainheadid
 
+    if {$mainheadid eq {}} return
     if {[commitinview $mainheadid $curview]} {
        dodiffindex
     } else {
@@ -4841,7 +4839,8 @@ proc drawcmittext {id row col} {
     global cmitlisted commitinfo rowidlist parentlist
     global rowtextx idpos idtags idheads idotherrefs
     global linehtag linentag linedtag selectedline
-    global canvxmax boldrows boldnamerows fgcolor nullid nullid2
+    global canvxmax boldrows boldnamerows fgcolor
+    global mainheadid nullid nullid2 circleitem circlecolors
 
     # listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right
     set listed $cmitlisted($curview,$id)
@@ -4849,8 +4848,10 @@ proc drawcmittext {id row col} {
        set ofill red
     } elseif {$id eq $nullid2} {
        set ofill green
+    } elseif {$id eq $mainheadid} {
+       set ofill yellow
     } else {
-       set ofill [expr {$listed != 0 ? $listed == 2 ? "gray" : "blue" : "white"}]
+       set ofill [lindex $circlecolors $listed]
     }
     set x [xc $row $col]
     set y [yc $row]
@@ -4874,6 +4875,7 @@ proc drawcmittext {id row col} {
                   [expr {$x - $orad}] [expr {$y + $orad - 1}] \
                   -fill $ofill -outline $fgcolor -width 1 -tags circle]
     }
+    set circleitem($row) $t
     $canv raise $t
     $canv bind $t <1> {selcanvline {} %x %y}
     set rmx [llength [lindex $rowidlist $row]]
@@ -7399,12 +7401,18 @@ proc domktag {} {
 }
 
 proc redrawtags {id} {
-    global canv linehtag idpos currentid curview
-    global canvxmax iddrawn
+    global canv linehtag idpos currentid curview cmitlisted
+    global canvxmax iddrawn circleitem mainheadid circlecolors
 
     if {![commitinview $id $curview]} return
     if {![info exists iddrawn($id)]} return
     set row [rowofcommit $id]
+    if {$id eq $mainheadid} {
+       set ofill yellow
+    } else {
+       set ofill [lindex $circlecolors $cmitlisted($curview,$id)]
+    }
+    $canv itemconf $circleitem($row) -fill $ofill
     $canv delete tag.$id
     set xt [eval drawtags $id $idpos($id)]
     $canv coords $linehtag($row) $xt [lindex $idpos($id) 2]
@@ -7574,8 +7582,8 @@ proc cherrypick {} {
        if {$mainhead ne {}} {
            movehead $newhead $mainhead
            movedhead $newhead $mainhead
-           set mainheadid $newhead
        }
+       set mainheadid $newhead
        redrawtags $oldhead
        redrawtags $newhead
        selbyid $newhead
@@ -7675,7 +7683,7 @@ proc headmenu {x y id head} {
 }
 
 proc cobranch {} {
-    global headmenuid headmenuhead mainhead headids
+    global headmenuid headmenuhead headids
     global showlocalchanges mainheadid
 
     # check the tree is clean first??
@@ -7711,12 +7719,10 @@ proc readcheckoutstat {fd newhead newheadid} {
     if {[catch {close $fd} err]} {
        error_popup $err
     }
-    set oldmainhead $mainhead
+    set oldmainid $mainheadid
     set mainhead $newhead
     set mainheadid $newheadid
-    if {[info exists headids($oldmainhead)]} {
-       redrawtags $headids($oldmainhead)
-    }
+    redrawtags $oldmainid
     redrawtags $newheadid
     selbyid $newheadid
     if {$showlocalchanges} {
@@ -9016,12 +9022,14 @@ proc rereadrefs {} {
                        [array names idheads] [array names idotherrefs]]]
     foreach id $refids {
        set v [listrefs $id]
-       if {![info exists ref($id)] || $ref($id) != $v ||
-           ($id eq $oldmainhead && $id ne $mainheadid) ||
-           ($id eq $mainheadid && $id ne $oldmainhead)} {
+       if {![info exists ref($id)] || $ref($id) != $v} {
            redrawtags $id
        }
     }
+    if {$oldmainhead ne $mainheadid} {
+       redrawtags $oldmainhead
+       redrawtags $mainheadid
+    }
     run refill_reflist
 }
 
@@ -9761,6 +9769,8 @@ set diffcontext 3
 set ignorespace 0
 set selectbgcolor gray85
 
+set circlecolors {white blue gray blue blue}
+
 ## For msgcat loading, first locate the installation location.
 if { [info exists ::env(GITK_MSGSDIR)] } {
     ## Msgsdir was manually set in the environment.
index 8f7ea367bae72ea3ce25b10b968554f9b842fffe..356ab7b327eb0df99c0773d68375e155dbcea0be 100644 (file)
@@ -255,12 +255,15 @@ Webserver configuration
 If you want to have one URL for both gitweb and your http://
 repositories, you can configure apache like this:
 
-<VirtualHost www:80>
-    ServerName git.domain.org
+<VirtualHost *:80>
+    ServerName git.example.org
     DocumentRoot /pub/git
-    RewriteEngine on
-    RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
     SetEnv     GITWEB_CONFIG   /etc/gitweb.conf
+    RewriteEngine on
+    # make the front page an internal rewrite to the gitweb script
+    RewriteRule ^/$  /cgi-bin/gitweb.cgi
+    # make access for "dumb clients" work
+    RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI}  [L,PT]
 </VirtualHost>
 
 The above configuration expects your public repositories to live under
@@ -276,6 +279,13 @@ override the defaults given at the head of the gitweb.perl (or
 gitweb.cgi).  Look at the comments in that file for information on
 which variables and what they mean.
 
+If you use the rewrite rules from the example you'll likely also need
+something like the following in your gitweb.conf (or gitweb_config.perl) file:
+
+  @stylesheets = ("/some/absolute/path/gitweb.css");
+  $my_uri = "/";
+  $home_link = "/";
+
 
 Originally written by:
   Kay Sievers <kay.sievers@vrfy.org>
index 57a19058a4f27f5673d59a2ca97b147c90e8c453..87887ab358298565bc14e3c5663f38b7250218fb 100755 (executable)
@@ -377,7 +377,7 @@ sub filter_snapshot_fmts {
 }
 
 # version of the core git binary
-our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
+our $git_version = qx("$GIT" --version) =~ m/git version (.*)$/ ? $1 : "unknown";
 
 $projects_list ||= $projectroot;
 
@@ -539,7 +539,7 @@ sub evaluate_path_info {
 
 # dispatch
 my %actions = (
-       "blame" => \&git_blame2,
+       "blame" => \&git_blame,
        "blobdiff" => \&git_blobdiff,
        "blobdiff_plain" => \&git_blobdiff_plain,
        "blob" => \&git_blob,
@@ -1500,9 +1500,13 @@ sub git_cmd {
        return $GIT, '--git-dir='.$git_dir;
 }
 
-# returns path to the core git executable and the --git-dir parameter as string
-sub git_cmd_str {
-       return join(' ', git_cmd());
+# quote the given arguments for passing them to the shell
+# quote_command("command", "arg 1", "arg with ' and ! characters")
+# => "'command' 'arg 1' 'arg with '\'' and '\!' characters'"
+# Try to avoid using this function wherever possible.
+sub quote_command {
+       return join(' ',
+                   map( { my $a = $_; $a =~ s/(['!])/'\\$1'/g; "'$a'" } @_ ));
 }
 
 # get HEAD ref of given project as hash
@@ -2158,49 +2162,6 @@ sub parse_commits {
        return wantarray ? @cos : \@cos;
 }
 
-# parse ref from ref_file, given by ref_id, with given type
-sub parse_ref {
-       my $ref_file = shift;
-       my $ref_id = shift;
-       my $type = shift || git_get_type($ref_id);
-       my %ref_item;
-
-       $ref_item{'type'} = $type;
-       $ref_item{'id'} = $ref_id;
-       $ref_item{'epoch'} = 0;
-       $ref_item{'age'} = "unknown";
-       if ($type eq "tag") {
-               my %tag = parse_tag($ref_id);
-               $ref_item{'comment'} = $tag{'comment'};
-               if ($tag{'type'} eq "commit") {
-                       my %co = parse_commit($tag{'object'});
-                       $ref_item{'epoch'} = $co{'committer_epoch'};
-                       $ref_item{'age'} = $co{'age_string'};
-               } elsif (defined($tag{'epoch'})) {
-                       my $age = time - $tag{'epoch'};
-                       $ref_item{'epoch'} = $tag{'epoch'};
-                       $ref_item{'age'} = age_string($age);
-               }
-               $ref_item{'reftype'} = $tag{'type'};
-               $ref_item{'name'} = $tag{'name'};
-               $ref_item{'refid'} = $tag{'object'};
-       } elsif ($type eq "commit"){
-               my %co = parse_commit($ref_id);
-               $ref_item{'reftype'} = "commit";
-               $ref_item{'name'} = $ref_file;
-               $ref_item{'title'} = $co{'title'};
-               $ref_item{'refid'} = $ref_id;
-               $ref_item{'epoch'} = $co{'committer_epoch'};
-               $ref_item{'age'} = $co{'age_string'};
-       } else {
-               $ref_item{'reftype'} = $type;
-               $ref_item{'name'} = $ref_file;
-               $ref_item{'refid'} = $ref_id;
-       }
-
-       return %ref_item;
-}
-
 # parse line of git-diff-tree "raw" output
 sub parse_difftree_raw_line {
        my $line = shift;
@@ -2481,8 +2442,7 @@ sub blob_mimetype {
        return $default_blob_plain_mimetype unless $fd;
 
        if (-T $fd) {
-               return 'text/plain' .
-                      ($default_text_plain_charset ? '; charset='.$default_text_plain_charset : '');
+               return 'text/plain';
        } elsif (! $filename) {
                return 'application/octet-stream';
        } elsif ($filename =~ m/\.png$/i) {
@@ -2496,6 +2456,17 @@ sub blob_mimetype {
        }
 }
 
+sub blob_contenttype {
+       my ($fd, $file_name, $type) = @_;
+
+       $type ||= blob_mimetype($fd, $file_name);
+       if ($type eq 'text/plain' && defined $default_text_plain_charset) {
+               $type .= "; charset=$default_text_plain_charset";
+       }
+
+       return $type;
+}
+
 ## ======================================================================
 ## functions printing HTML: header, footer, error page
 
@@ -2623,7 +2594,7 @@ sub git_header_html {
        print "</div>\n";
 
        my ($have_search) = gitweb_check_feature('search');
-       if ((defined $project) && ($have_search)) {
+       if (defined $project && $have_search) {
                if (!defined $searchtext) {
                        $searchtext = "";
                }
@@ -2639,16 +2610,13 @@ sub git_header_html {
                my ($use_pathinfo) = gitweb_check_feature('pathinfo');
                if ($use_pathinfo) {
                        $action .= "/".esc_url($project);
-               } else {
-                       $cgi->param("p", $project);
                }
-               $cgi->param("a", "search");
-               $cgi->param("h", $search_hash);
                print $cgi->startform(-method => "get", -action => $action) .
                      "<div class=\"search\">\n" .
-                     (!$use_pathinfo && $cgi->hidden(-name => "p") . "\n") .
-                     $cgi->hidden(-name => "a") . "\n" .
-                     $cgi->hidden(-name => "h") . "\n" .
+                     (!$use_pathinfo &&
+                     $cgi->input({-name=>"p", -value=>$project, -type=>"hidden"}) . "\n") .
+                     $cgi->input({-name=>"a", -value=>"search", -type=>"hidden"}) . "\n" .
+                     $cgi->input({-name=>"h", -value=>$search_hash, -type=>"hidden"}) . "\n" .
                      $cgi->popup_menu(-name => 'st', -default => 'commit',
                                       -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
                      $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
@@ -3552,21 +3520,24 @@ sub git_patchset_body {
 
 # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
-sub git_project_list_body {
-       my ($projlist, $order, $from, $to, $extra, $no_header) = @_;
-
-       my ($check_forks) = gitweb_check_feature('forks');
-
+# fills project list info (age, description, owner, forks) for each
+# project in the list, removing invalid projects from returned list
+# NOTE: modifies $projlist, but does not remove entries from it
+sub fill_project_list_info {
+       my ($projlist, $check_forks) = @_;
        my @projects;
+
+ PROJECT:
        foreach my $pr (@$projlist) {
-               my (@aa) = git_get_last_activity($pr->{'path'});
-               unless (@aa) {
-                       next;
+               my (@activity) = git_get_last_activity($pr->{'path'});
+               unless (@activity) {
+                       next PROJECT;
                }
-               ($pr->{'age'}, $pr->{'age_string'}) = @aa;
+               ($pr->{'age'}, $pr->{'age_string'}) = @activity;
                if (!defined $pr->{'descr'}) {
                        my $descr = git_get_project_description($pr->{'path'}) || "";
-                       $pr->{'descr_long'} = to_utf8($descr);
+                       $descr = to_utf8($descr);
+                       $pr->{'descr_long'} = $descr;
                        $pr->{'descr'} = chop_str($descr, $projects_list_description_width, 5);
                }
                if (!defined $pr->{'owner'}) {
@@ -3578,14 +3549,52 @@ sub git_project_list_body {
                            ($pname !~ /\/$/) &&
                            (-d "$projectroot/$pname")) {
                                $pr->{'forks'} = "-d $projectroot/$pname";
-                       }
-                       else {
+                       }       else {
                                $pr->{'forks'} = 0;
                        }
                }
                push @projects, $pr;
        }
 
+       return @projects;
+}
+
+# print 'sort by' <th> element, either sorting by $key if $name eq $order
+# (changing $list), or generating 'sort by $name' replay link otherwise
+sub print_sort_th {
+       my ($str_sort, $name, $order, $key, $header, $list) = @_;
+       $key    ||= $name;
+       $header ||= ucfirst($name);
+
+       if ($order eq $name) {
+               if ($str_sort) {
+                       @$list = sort {$a->{$key} cmp $b->{$key}} @$list;
+               } else {
+                       @$list = sort {$a->{$key} <=> $b->{$key}} @$list;
+               }
+               print "<th>$header</th>\n";
+       } else {
+               print "<th>" .
+                     $cgi->a({-href => href(-replay=>1, order=>$name),
+                              -class => "header"}, $header) .
+                     "</th>\n";
+       }
+}
+
+sub print_sort_th_str {
+       print_sort_th(1, @_);
+}
+
+sub print_sort_th_num {
+       print_sort_th(0, @_);
+}
+
+sub git_project_list_body {
+       my ($projlist, $order, $from, $to, $extra, $no_header) = @_;
+
+       my ($check_forks) = gitweb_check_feature('forks');
+       my @projects = fill_project_list_info($projlist, $check_forks);
+
        $order ||= $default_projects_order;
        $from = 0 unless defined $from;
        $to = $#projects if (!defined $to || $#projects < $to);
@@ -3596,43 +3605,15 @@ sub git_project_list_body {
                if ($check_forks) {
                        print "<th></th>\n";
                }
-               if ($order eq "project") {
-                       @projects = sort {$a->{'path'} cmp $b->{'path'}} @projects;
-                       print "<th>Project</th>\n";
-               } else {
-                       print "<th>" .
-                             $cgi->a({-href => href(project=>undef, order=>'project'),
-                                      -class => "header"}, "Project") .
-                             "</th>\n";
-               }
-               if ($order eq "descr") {
-                       @projects = sort {$a->{'descr'} cmp $b->{'descr'}} @projects;
-                       print "<th>Description</th>\n";
-               } else {
-                       print "<th>" .
-                             $cgi->a({-href => href(project=>undef, order=>'descr'),
-                                      -class => "header"}, "Description") .
-                             "</th>\n";
-               }
-               if ($order eq "owner") {
-                       @projects = sort {$a->{'owner'} cmp $b->{'owner'}} @projects;
-                       print "<th>Owner</th>\n";
-               } else {
-                       print "<th>" .
-                             $cgi->a({-href => href(project=>undef, order=>'owner'),
-                                      -class => "header"}, "Owner") .
-                             "</th>\n";
-               }
-               if ($order eq "age") {
-                       @projects = sort {$a->{'age'} <=> $b->{'age'}} @projects;
-                       print "<th>Last Change</th>\n";
-               } else {
-                       print "<th>" .
-                             $cgi->a({-href => href(project=>undef, order=>'age'),
-                                      -class => "header"}, "Last Change") .
-                             "</th>\n";
-               }
-               print "<th></th>\n" .
+               print_sort_th_str('project', $order, 'path',
+                                 'Project', \@projects);
+               print_sort_th_str('descr', $order, 'descr_long',
+                                 'Description', \@projects);
+               print_sort_th_str('owner', $order, 'owner',
+                                 'Owner', \@projects);
+               print_sort_th_num('age', $order, 'age',
+                                 'Last Change', \@projects);
+               print "<th></th>\n" . # for links
                      "</tr>\n";
        }
        my $alternate = 1;
@@ -4145,7 +4126,7 @@ sub git_tag {
        git_footer_html();
 }
 
-sub git_blame2 {
+sub git_blame {
        my $fd;
        my $ftype;
 
@@ -4253,103 +4234,6 @@ sub git_blame2 {
        git_footer_html();
 }
 
-sub git_blame {
-       my $fd;
-
-       my ($have_blame) = gitweb_check_feature('blame');
-       if (!$have_blame) {
-               die_error('403 Permission denied', "Permission denied");
-       }
-       die_error('404 Not Found', "File name not defined") if (!$file_name);
-       $hash_base ||= git_get_head_hash($project);
-       die_error(undef, "Couldn't find base commit") unless ($hash_base);
-       my %co = parse_commit($hash_base)
-               or die_error(undef, "Reading commit failed");
-       if (!defined $hash) {
-               $hash = git_get_hash_by_path($hash_base, $file_name, "blob")
-                       or die_error(undef, "Error lookup file");
-       }
-       open ($fd, "-|", git_cmd(), "annotate", '-l', '-t', '-r', $file_name, $hash_base)
-               or die_error(undef, "Open git-annotate failed");
-       git_header_html();
-       my $formats_nav =
-               $cgi->a({-href => href(action=>"blob", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
-                       "blob") .
-               " | " .
-               $cgi->a({-href => href(action=>"history", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
-                       "history") .
-               " | " .
-               $cgi->a({-href => href(action=>"blame", file_name=>$file_name)},
-                       "HEAD");
-       git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);
-       git_print_header_div('commit', esc_html($co{'title'}), $hash_base);
-       git_print_page_path($file_name, 'blob', $hash_base);
-       print "<div class=\"page_body\">\n";
-       print <<HTML;
-<table class="blame">
-  <tr>
-    <th>Commit</th>
-    <th>Age</th>
-    <th>Author</th>
-    <th>Line</th>
-    <th>Data</th>
-  </tr>
-HTML
-       my @line_class = (qw(light dark));
-       my $line_class_len = scalar (@line_class);
-       my $line_class_num = $#line_class;
-       while (my $line = <$fd>) {
-               my $long_rev;
-               my $short_rev;
-               my $author;
-               my $time;
-               my $lineno;
-               my $data;
-               my $age;
-               my $age_str;
-               my $age_class;
-
-               chomp $line;
-               $line_class_num = ($line_class_num + 1) % $line_class_len;
-
-               if ($line =~ m/^([0-9a-fA-F]{40})\t\(\s*([^\t]+)\t(\d+) [+-]\d\d\d\d\t(\d+)\)(.*)$/) {
-                       $long_rev = $1;
-                       $author   = $2;
-                       $time     = $3;
-                       $lineno   = $4;
-                       $data     = $5;
-               } else {
-                       print qq(  <tr><td colspan="5" class="error">Unable to parse: $line</td></tr>\n);
-                       next;
-               }
-               $short_rev  = substr ($long_rev, 0, 8);
-               $age        = time () - $time;
-               $age_str    = age_string ($age);
-               $age_str    =~ s/ /&nbsp;/g;
-               $age_class  = age_class($age);
-               $author     = esc_html ($author);
-               $author     =~ s/ /&nbsp;/g;
-
-               $data = untabify($data);
-               $data = esc_html ($data);
-
-               print <<HTML;
-  <tr class="$line_class[$line_class_num]">
-    <td class="sha1"><a href="${\href (action=>"commit", hash=>$long_rev)}" class="text">$short_rev..</a></td>
-    <td class="$age_class">$age_str</td>
-    <td>$author</td>
-    <td class="linenr"><a id="$lineno" href="#$lineno" class="linenr">$lineno</a></td>
-    <td class="pre">$data</td>
-  </tr>
-HTML
-       } # while (my $line = <$fd>)
-       print "</table>\n\n";
-       close $fd
-               or print "Reading blob failed.\n";
-       print "</div>";
-       git_footer_html();
-}
-
 sub git_tags {
        my $head = git_get_head_hash($project);
        git_header_html();
@@ -4377,6 +4261,7 @@ sub git_heads {
 }
 
 sub git_blob_plain {
+       my $type = shift;
        my $expires;
 
        if (!defined $hash) {
@@ -4392,13 +4277,13 @@ sub git_blob_plain {
                $expires = "+1d";
        }
 
-       my $type = shift;
        open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
-               or die_error(undef, "Couldn't cat $file_name, $hash");
+               or die_error(undef, "Open git-cat-file blob '$hash' failed");
 
-       $type ||= blob_mimetype($fd, $file_name);
+       # content-type (can include charset)
+       $type = blob_contenttype($fd, $file_name, $type);
 
-       # save as filename, even when no $file_name is given
+       # "save as" filename, even when no $file_name is given
        my $save_as = "$hash";
        if (defined $file_name) {
                $save_as = $file_name;
@@ -4407,9 +4292,9 @@ sub git_blob_plain {
        }
 
        print $cgi->header(
-               -type => "$type",
-               -expires=>$expires,
-               -content_disposition => 'inline; filename="' . "$save_as" . '"');
+               -type => $type,
+               -expires => $expires,
+               -content_disposition => 'inline; filename="' . $save_as . '"');
        undef $/;
        binmode STDOUT, ':raw';
        print <$fd>;
@@ -4625,7 +4510,6 @@ sub git_snapshot {
                $hash = git_get_head_hash($project);
        }
 
-       my $git_command = git_cmd_str();
        my $name = $project;
        $name =~ s,([^/])/*\.git$,$1,;
        $name = basename($name);
@@ -4633,11 +4517,12 @@ sub git_snapshot {
        $name =~ s/\047/\047\\\047\047/g;
        my $cmd;
        $filename .= "-$hash$known_snapshot_formats{$format}{'suffix'}";
-       $cmd = "$git_command archive " .
-               "--format=$known_snapshot_formats{$format}{'format'} " .
-               "--prefix=\'$name\'/ $hash";
+       $cmd = quote_command(
+               git_cmd(), 'archive',
+               "--format=$known_snapshot_formats{$format}{'format'}",
+               "--prefix=$name/", $hash);
        if (exists $known_snapshot_formats{$format}{'compressor'}) {
-               $cmd .= ' | ' . join ' ', @{$known_snapshot_formats{$format}{'compressor'}};
+               $cmd .= ' | ' . quote_command(@{$known_snapshot_formats{$format}{'compressor'}});
        }
 
        print $cgi->header(
@@ -4850,8 +4735,8 @@ sub git_object {
        if ($hash || ($hash_base && !defined $file_name)) {
                my $object_id = $hash || $hash_base;
 
-               my $git_command = git_cmd_str();
-               open my $fd, "-|", "$git_command cat-file -t $object_id 2>/dev/null"
+               open my $fd, "-|", quote_command(
+                       git_cmd(), 'cat-file', '-t', $object_id) . ' 2> /dev/null'
                        or die_error('404 Not Found', "Object does not exist");
                $type = <$fd>;
                chomp $type;
diff --git a/graph.c b/graph.c
index edfab2d5b461f5bfd39d32fa843ee59841b4ce0a..e2633f8376eb7b12706dcd4c698e2b3f6be2b433 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -237,18 +237,58 @@ static int graph_is_interesting(struct git_graph *graph, struct commit *commit)
        return (commit->object.flags & (UNINTERESTING | TREESAME)) ? 0 : 1;
 }
 
+static struct commit_list *next_interesting_parent(struct git_graph *graph,
+                                                  struct commit_list *orig)
+{
+       struct commit_list *list;
+
+       /*
+        * If revs->first_parent_only is set, only the first
+        * parent is interesting.  None of the others are.
+        */
+       if (graph->revs->first_parent_only)
+               return NULL;
+
+       /*
+        * Return the next interesting commit after orig
+        */
+       for (list = orig->next; list; list = list->next) {
+               if (graph_is_interesting(graph, list->item))
+                       return list;
+       }
+
+       return NULL;
+}
+
+static struct commit_list *first_interesting_parent(struct git_graph *graph)
+{
+       struct commit_list *parents = graph->commit->parents;
+
+       /*
+        * If this commit has no parents, ignore it
+        */
+       if (!parents)
+               return NULL;
+
+       /*
+        * If the first parent is interesting, return it
+        */
+       if (graph_is_interesting(graph, parents->item))
+               return parents;
+
+       /*
+        * Otherwise, call next_interesting_parent() to get
+        * the next interesting parent
+        */
+       return next_interesting_parent(graph, parents);
+}
+
 static void graph_insert_into_new_columns(struct git_graph *graph,
                                          struct commit *commit,
                                          int *mapping_index)
 {
        int i;
 
-       /*
-        * Ignore uinteresting commits
-        */
-       if (!graph_is_interesting(graph, commit))
-               return;
-
        /*
         * If the commit is already in the new_columns list, we don't need to
         * add it.  Just update the mapping correctly.
@@ -373,9 +413,9 @@ static void graph_update_columns(struct git_graph *graph)
                        int old_mapping_idx = mapping_idx;
                        seen_this = 1;
                        graph->commit_index = i;
-                       for (parent = graph->commit->parents;
+                       for (parent = first_interesting_parent(graph);
                             parent;
-                            parent = parent->next) {
+                            parent = next_interesting_parent(graph, parent)) {
                                graph_insert_into_new_columns(graph,
                                                              parent->item,
                                                              &mapping_idx);
@@ -420,9 +460,11 @@ void graph_update(struct git_graph *graph, struct commit *commit)
         * Count how many interesting parents this commit has
         */
        graph->num_parents = 0;
-       for (parent = commit->parents; parent; parent = parent->next) {
-               if (graph_is_interesting(graph, parent->item))
-                       graph->num_parents++;
+       for (parent = first_interesting_parent(graph);
+            parent;
+            parent = next_interesting_parent(graph, parent))
+       {
+               graph->num_parents++;
        }
 
        /*
@@ -637,20 +679,6 @@ static void graph_output_commit_char(struct git_graph *graph, struct strbuf *sb)
                return;
        }
 
-       /*
-        * Print 'M' for merge commits
-        *
-        * Note that we don't check graph->num_parents to determine if the
-        * commit is a merge, since that only tracks the number of
-        * "interesting" parents.  We want to print 'M' for merge commits
-        * even if they have less than 2 interesting parents.
-        */
-       if (graph->commit->parents != NULL &&
-           graph->commit->parents->next != NULL) {
-               strbuf_addch(sb, 'M');
-               return;
-       }
-
        /*
         * Print '*' in all other cases
         */
diff --git a/help.c b/help.c
index d89d43796f3ee9d3689131d48861967048f5c5d7..8aff94c64a1204f8a359e522a554f29c8f0fdc20 100644 (file)
--- a/help.c
+++ b/help.c
@@ -649,12 +649,14 @@ int cmd_help(int argc, const char **argv, const char *prefix)
        if (show_all) {
                printf("usage: %s\n\n", git_usage_string);
                list_commands();
+               printf("%s\n", git_more_info_string);
                return 0;
        }
 
        if (!argv[0]) {
                printf("usage: %s\n\n", git_usage_string);
                list_common_cmds_help();
+               printf("\n%s\n", git_more_info_string);
                return 0;
        }
 
index c93e781c3b503bae6ee7c6735fa058aa0a98e026..665712a85de3fb4bba3a879753b60ece64a4243a 100644 (file)
@@ -9,6 +9,7 @@
 #include "revision.h"
 #include "exec_cmd.h"
 #include "remote.h"
+#include "list-objects.h"
 
 #include <expat.h>
 
@@ -1878,31 +1879,6 @@ static int ref_newer(const unsigned char *new_sha1,
        return found;
 }
 
-static void mark_edge_parents_uninteresting(struct commit *commit)
-{
-       struct commit_list *parents;
-
-       for (parents = commit->parents; parents; parents = parents->next) {
-               struct commit *parent = parents->item;
-               if (!(parent->object.flags & UNINTERESTING))
-                       continue;
-               mark_tree_uninteresting(parent->tree);
-       }
-}
-
-static void mark_edges_uninteresting(struct commit_list *list)
-{
-       for ( ; list; list = list->next) {
-               struct commit *commit = list->item;
-
-               if (commit->object.flags & UNINTERESTING) {
-                       mark_tree_uninteresting(commit->tree);
-                       continue;
-               }
-               mark_edge_parents_uninteresting(commit);
-       }
-}
-
 static void add_remote_info_ref(struct remote_ls_ctx *ls)
 {
        struct strbuf *buf = (struct strbuf *)ls->userData;
@@ -2408,6 +2384,7 @@ int main(int argc, char **argv)
                }
                init_revisions(&revs, setup_git_directory());
                setup_revisions(commit_argc, commit_argv, &revs, NULL);
+               revs.edge_hint = 0; /* just in case */
                free(new_sha1_hex);
                if (old_sha1_hex) {
                        free(old_sha1_hex);
@@ -2418,7 +2395,7 @@ int main(int argc, char **argv)
                pushing = 0;
                if (prepare_revision_walk(&revs))
                        die("revision walk setup failed");
-               mark_edges_uninteresting(revs.commits);
+               mark_edges_uninteresting(revs.commits, &revs, NULL);
                objects_to_send = get_delta(&revs, ref_lock);
                finish_all_active_slots();
 
diff --git a/http.c b/http.c
index 2a21ccbb76351d108301d2b9c334e2c5a5feacd9..105dc93843ba1f01ea0d40c63dd174e879f1a25a 100644 (file)
--- a/http.c
+++ b/http.c
@@ -583,7 +583,7 @@ static char *quote_ref_url(const char *base, const char *ref)
        int len, baselen, ch;
 
        baselen = strlen(base);
-       len = baselen + 7; /* "/refs/" + NUL */
+       len = baselen + 2; /* '/' after base and terminating NUL */
        for (cp = ref; (ch = *cp) != 0; cp++, len++)
                if (needs_quote(ch))
                        len += 2; /* extra two hex plus replacement % */
diff --git a/path.c b/path.c
index b7c24a2aacf87ffea6bd6380dbff44e5d317b240..7a35a26a1697480f0f43244132d8267deb301651 100644 (file)
--- a/path.c
+++ b/path.c
@@ -291,6 +291,42 @@ int adjust_shared_perm(const char *path)
        return 0;
 }
 
+static const char *get_pwd_cwd(void)
+{
+       static char cwd[PATH_MAX + 1];
+       char *pwd;
+       struct stat cwd_stat, pwd_stat;
+       if (getcwd(cwd, PATH_MAX) == NULL)
+               return NULL;
+       pwd = getenv("PWD");
+       if (pwd && strcmp(pwd, cwd)) {
+               stat(cwd, &cwd_stat);
+               if (!stat(pwd, &pwd_stat) &&
+                   pwd_stat.st_dev == cwd_stat.st_dev &&
+                   pwd_stat.st_ino == cwd_stat.st_ino) {
+                       strlcpy(cwd, pwd, PATH_MAX);
+               }
+       }
+       return cwd;
+}
+
+const char *make_nonrelative_path(const char *path)
+{
+       static char buf[PATH_MAX + 1];
+
+       if (is_absolute_path(path)) {
+               if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
+                       die ("Too long path: %.*s", 60, path);
+       } else {
+               const char *cwd = get_pwd_cwd();
+               if (!cwd)
+                       die("Cannot determine the current working directory");
+               if (snprintf(buf, PATH_MAX, "%s/%s", cwd, path) >= PATH_MAX)
+                       die ("Too long path: %.*s", 60, path);
+       }
+       return buf;
+}
+
 /* We allow "recursive" symbolic links. Only within reason, though. */
 #define MAXDEPTH 5
 
index d19f80c0bb25928383f8a1aff3f6f49f9a65131c..55a8687ad15788f8ea5a5beb463d216908f618b2 100644 (file)
@@ -241,16 +241,21 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
        *p_progress = NULL;
        if (progress->last_value != -1) {
                /* Force the last update */
-               char buf[strlen(msg) + 5];
+               char buf[128], *bufp;
+               size_t len = strlen(msg) + 5;
                struct throughput *tp = progress->throughput;
+
+               bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1);
                if (tp) {
                        unsigned int rate = !tp->avg_misecs ? 0 :
                                        tp->avg_bytes / tp->avg_misecs;
                        throughput_string(tp, tp->curr_total, rate);
                }
                progress_update = 1;
-               sprintf(buf, ", %s.\n", msg);
-               display(progress, progress->last_value, buf);
+               sprintf(bufp, ", %s.\n", msg);
+               display(progress, progress->last_value, bufp);
+               if (buf != bufp)
+                       free(bufp);
        }
        clear_progress_signal();
        free(progress->throughput);
index 91e3b112bb5ffa151a8ede9391d3bd88ea4d3500..ff2c8021678fee5ef12060d35c6eb1960e8792c7 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -867,8 +867,7 @@ static char *guess_ref(const char *name, struct ref *peer)
 
 static int match_explicit(struct ref *src, struct ref *dst,
                          struct ref ***dst_tail,
-                         struct refspec *rs,
-                         int errs)
+                         struct refspec *rs)
 {
        struct ref *matched_src, *matched_dst;
 
@@ -876,7 +875,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
        char *dst_guess;
 
        if (rs->pattern || rs->matching)
-               return errs;
+               return 0;
 
        matched_src = matched_dst = NULL;
        switch (count_refspec_match(rs->src, src, &matched_src)) {
@@ -889,23 +888,16 @@ static int match_explicit(struct ref *src, struct ref *dst,
                 */
                matched_src = try_explicit_object_name(rs->src);
                if (!matched_src)
-                       error("src refspec %s does not match any.", rs->src);
+                       return error("src refspec %s does not match any.", rs->src);
                break;
        default:
-               matched_src = NULL;
-               error("src refspec %s matches more than one.", rs->src);
-               break;
+               return error("src refspec %s matches more than one.", rs->src);
        }
 
-       if (!matched_src)
-               errs = 1;
-
        if (!dst_value) {
                unsigned char sha1[20];
                int flag;
 
-               if (!matched_src)
-                       return errs;
                dst_value = resolve_ref(matched_src->name, sha1, 1, &flag);
                if (!dst_value ||
                    ((flag & REF_ISSYMREF) &&
@@ -936,18 +928,16 @@ static int match_explicit(struct ref *src, struct ref *dst,
                      dst_value);
                break;
        }
-       if (errs || !matched_dst)
-               return 1;
-       if (matched_dst->peer_ref) {
-               errs = 1;
-               error("dst ref %s receives from more than one src.",
+       if (!matched_dst)
+               return -1;
+       if (matched_dst->peer_ref)
+               return error("dst ref %s receives from more than one src.",
                      matched_dst->name);
-       }
        else {
                matched_dst->peer_ref = matched_src;
                matched_dst->force = rs->force;
        }
-       return errs;
+       return 0;
 }
 
 static int match_explicit_refs(struct ref *src, struct ref *dst,
@@ -956,8 +946,8 @@ static int match_explicit_refs(struct ref *src, struct ref *dst,
 {
        int i, errs;
        for (i = errs = 0; i < rs_nr; i++)
-               errs |= match_explicit(src, dst, dst_tail, &rs[i], errs);
-       return -errs;
+               errs += match_explicit(src, dst, dst_tail, &rs[i]);
+       return errs;
 }
 
 static const struct refspec *check_pattern_match(const struct refspec *rs,
index adcf37c3f68d16200b01adae441fa3d8f68e3c02..191f814e09ee6067edf7b0acc73a04751e73a6da 100644 (file)
@@ -35,8 +35,6 @@ static size_t sz_fmt(size_t s) { return s; }
 
 const unsigned char null_sha1[20];
 
-static unsigned int sha1_file_open_flag = O_NOATIME;
-
 const signed char hexval_table[256] = {
         -1, -1, -1, -1, -1, -1, -1, -1,                /* 00-07 */
         -1, -1, -1, -1, -1, -1, -1, -1,                /* 08-0f */
@@ -118,7 +116,7 @@ int safe_create_leading_directories(char *path)
        return 0;
 }
 
-char * sha1_to_hex(const unsigned char *sha1)
+char *sha1_to_hex(const unsigned char *sha1)
 {
        static int bufno;
        static char hexbuffer[4][50];
@@ -399,21 +397,21 @@ void prepare_alt_odb(void)
        read_info_alternates(get_object_directory(), 0);
 }
 
-static char *find_sha1_file(const unsigned char *sha1, struct stat *st)
+static int has_loose_object(const unsigned char *sha1)
 {
        char *name = sha1_file_name(sha1);
        struct alternate_object_database *alt;
 
-       if (!stat(name, st))
-               return name;
+       if (!access(name, F_OK))
+               return 1;
        prepare_alt_odb();
        for (alt = alt_odb_list; alt; alt = alt->next) {
                name = alt->name;
                fill_sha1_path(name, sha1);
-               if (!stat(alt->base, st))
-                       return alt->base;
+               if (!access(alt->base, F_OK))
+                       return 1;
        }
-       return NULL;
+       return 0;
 }
 
 static unsigned int pack_used_ctr;
@@ -833,13 +831,7 @@ struct packed_git *add_packed_git(const char *path, int path_len, int local)
 
 struct packed_git *parse_pack_index(unsigned char *sha1)
 {
-       char *path = sha1_pack_index_name(sha1);
-       return parse_pack_index_file(sha1, path);
-}
-
-struct packed_git *parse_pack_index_file(const unsigned char *sha1,
-                                        const char *idx_path)
-{
+       const char *idx_path = sha1_pack_index_name(sha1);
        const char *path = sha1_pack_name(sha1);
        struct packed_git *p = xmalloc(sizeof(*p) + strlen(path) + 2);
 
@@ -997,38 +989,58 @@ int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long siz
        return hashcmp(sha1, real_sha1) ? -1 : 0;
 }
 
+static int git_open_noatime(const char *name)
+{
+       static int sha1_file_open_flag = O_NOATIME;
+       int fd = open(name, O_RDONLY | sha1_file_open_flag);
+
+       /* Might the failure be due to O_NOATIME? */
+       if (fd < 0 && errno != ENOENT && sha1_file_open_flag) {
+               fd = open(name, O_RDONLY);
+               if (fd >= 0)
+                       sha1_file_open_flag = 0;
+       }
+       return fd;
+}
+
+static int open_sha1_file(const unsigned char *sha1)
+{
+       int fd;
+       char *name = sha1_file_name(sha1);
+       struct alternate_object_database *alt;
+
+       fd = git_open_noatime(name);
+       if (fd >= 0)
+               return fd;
+
+       prepare_alt_odb();
+       errno = ENOENT;
+       for (alt = alt_odb_list; alt; alt = alt->next) {
+               name = alt->name;
+               fill_sha1_path(name, sha1);
+               fd = git_open_noatime(alt->base);
+               if (fd >= 0)
+                       return fd;
+       }
+       return -1;
+}
+
 static void *map_sha1_file(const unsigned char *sha1, unsigned long *size)
 {
-       struct stat st;
        void *map;
        int fd;
-       char *filename = find_sha1_file(sha1, &st);
 
-       if (!filename) {
-               return NULL;
-       }
+       fd = open_sha1_file(sha1);
+       map = NULL;
+       if (fd >= 0) {
+               struct stat st;
 
-       fd = open(filename, O_RDONLY | sha1_file_open_flag);
-       if (fd < 0) {
-               /* See if it works without O_NOATIME */
-               switch (sha1_file_open_flag) {
-               default:
-                       fd = open(filename, O_RDONLY);
-                       if (fd >= 0)
-                               break;
-               /* Fallthrough */
-               case 0:
-                       return NULL;
+               if (!fstat(fd, &st)) {
+                       *size = xsize_t(st.st_size);
+                       map = xmmap(NULL, *size, PROT_READ, MAP_PRIVATE, fd, 0);
                }
-
-               /* If it failed once, it will probably fail again.
-                * Stop using O_NOATIME
-                */
-               sha1_file_open_flag = 0;
+               close(fd);
        }
-       *size = xsize_t(st.st_size);
-       map = xmmap(NULL, *size, PROT_READ, MAP_PRIVATE, fd, 0);
-       close(fd);
        return map;
 }
 
@@ -2018,49 +2030,12 @@ static void write_sha1_file_prepare(const void *buf, unsigned long len,
        SHA1_Final(sha1, &c);
 }
 
-/*
- * Link the tempfile to the final place, possibly creating the
- * last directory level as you do so.
- *
- * Returns the errno on failure, 0 on success.
- */
-static int link_temp_to_file(const char *tmpfile, const char *filename)
-{
-       int ret;
-       char *dir;
-
-       if (!link(tmpfile, filename))
-               return 0;
-
-       /*
-        * Try to mkdir the last path component if that failed.
-        *
-        * Re-try the "link()" regardless of whether the mkdir
-        * succeeds, since a race might mean that somebody
-        * else succeeded.
-        */
-       ret = errno;
-       dir = strrchr(filename, '/');
-       if (dir) {
-               *dir = 0;
-               if (!mkdir(filename, 0777) && adjust_shared_perm(filename)) {
-                       *dir = '/';
-                       return -2;
-               }
-               *dir = '/';
-               if (!link(tmpfile, filename))
-                       return 0;
-               ret = errno;
-       }
-       return ret;
-}
-
 /*
  * Move the just written object into its final resting place
  */
 int move_temp_to_file(const char *tmpfile, const char *filename)
 {
-       int ret = link_temp_to_file(tmpfile, filename);
+       int ret = link(tmpfile, filename);
 
        /*
         * Coda hack - coda doesn't like cross-directory links,
@@ -2105,6 +2080,55 @@ int hash_sha1_file(const void *buf, unsigned long len, const char *type,
        return 0;
 }
 
+/* Finalize a file on disk, and close it. */
+static void close_sha1_file(int fd)
+{
+       /* For safe-mode, we could fsync_or_die(fd, "sha1 file") here */
+       fchmod(fd, 0444);
+       if (close(fd) != 0)
+               die("unable to write sha1 file");
+}
+
+/* Size of directory component, including the ending '/' */
+static inline int directory_size(const char *filename)
+{
+       const char *s = strrchr(filename, '/');
+       if (!s)
+               return 0;
+       return s - filename + 1;
+}
+
+/*
+ * This creates a temporary file in the same directory as the final
+ * 'filename'
+ *
+ * We want to avoid cross-directory filename renames, because those
+ * can have problems on various filesystems (FAT, NFS, Coda).
+ */
+static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename)
+{
+       int fd, dirlen = directory_size(filename);
+
+       if (dirlen + 20 > bufsiz) {
+               errno = ENAMETOOLONG;
+               return -1;
+       }
+       memcpy(buffer, filename, dirlen);
+       strcpy(buffer + dirlen, "tmp_obj_XXXXXX");
+       fd = mkstemp(buffer);
+       if (fd < 0 && dirlen) {
+               /* Make sure the directory exists */
+               buffer[dirlen-1] = 0;
+               if (mkdir(buffer, 0777) || adjust_shared_perm(buffer))
+                       return -1;
+
+               /* Try again */
+               strcpy(buffer + dirlen - 1, "/tmp_obj_XXXXXX");
+               fd = mkstemp(buffer);
+       }
+       return fd;
+}
+
 static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
                              void *buf, unsigned long len, time_t mtime)
 {
@@ -2115,23 +2139,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
        static char tmpfile[PATH_MAX];
 
        filename = sha1_file_name(sha1);
-       fd = open(filename, O_RDONLY);
-       if (fd >= 0) {
-               /*
-                * FIXME!!! We might do collision checking here, but we'd
-                * need to uncompress the old file and check it. Later.
-                */
-               close(fd);
-               return 0;
-       }
-
-       if (errno != ENOENT) {
-               return error("sha1 file %s: %s\n", filename, strerror(errno));
-       }
-
-       snprintf(tmpfile, sizeof(tmpfile), "%s/tmp_obj_XXXXXX", get_object_directory());
-
-       fd = mkstemp(tmpfile);
+       fd = create_tmpfile(tmpfile, sizeof(tmpfile), filename);
        if (fd < 0) {
                if (errno == EPERM)
                        return error("insufficient permission for adding an object to repository database %s\n", get_object_directory());
@@ -2170,9 +2178,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
 
        if (write_buffer(fd, compressed, size) < 0)
                die("unable to write sha1 file");
-       fchmod(fd, 0444);
-       if (close(fd))
-               die("unable to write sha1 file");
+       close_sha1_file(fd);
        free(compressed);
 
        if (mtime) {
@@ -2206,14 +2212,13 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
 
 int force_object_loose(const unsigned char *sha1, time_t mtime)
 {
-       struct stat st;
        void *buf;
        unsigned long len;
        enum object_type type;
        char hdr[32];
        int hdrlen;
 
-       if (find_sha1_file(sha1, &st))
+       if (has_loose_object(sha1))
                return 0;
        buf = read_packed_sha1(sha1, &type, &len);
        if (!buf)
@@ -2222,150 +2227,6 @@ int force_object_loose(const unsigned char *sha1, time_t mtime)
        return write_loose_object(sha1, hdr, hdrlen, buf, len, mtime);
 }
 
-/*
- * We need to unpack and recompress the object for writing
- * it out to a different file.
- */
-static void *repack_object(const unsigned char *sha1, unsigned long *objsize)
-{
-       size_t size;
-       z_stream stream;
-       unsigned char *unpacked;
-       unsigned long len;
-       enum object_type type;
-       char hdr[32];
-       int hdrlen;
-       void *buf;
-
-       /* need to unpack and recompress it by itself */
-       unpacked = read_packed_sha1(sha1, &type, &len);
-       if (!unpacked)
-               error("cannot read sha1_file for %s", sha1_to_hex(sha1));
-
-       hdrlen = sprintf(hdr, "%s %lu", typename(type), len) + 1;
-
-       /* Set it up */
-       memset(&stream, 0, sizeof(stream));
-       deflateInit(&stream, zlib_compression_level);
-       size = deflateBound(&stream, len + hdrlen);
-       buf = xmalloc(size);
-
-       /* Compress it */
-       stream.next_out = buf;
-       stream.avail_out = size;
-
-       /* First header.. */
-       stream.next_in = (void *)hdr;
-       stream.avail_in = hdrlen;
-       while (deflate(&stream, 0) == Z_OK)
-               /* nothing */;
-
-       /* Then the data itself.. */
-       stream.next_in = unpacked;
-       stream.avail_in = len;
-       while (deflate(&stream, Z_FINISH) == Z_OK)
-               /* nothing */;
-       deflateEnd(&stream);
-       free(unpacked);
-
-       *objsize = stream.total_out;
-       return buf;
-}
-
-int write_sha1_to_fd(int fd, const unsigned char *sha1)
-{
-       int retval;
-       unsigned long objsize;
-       void *buf = map_sha1_file(sha1, &objsize);
-
-       if (buf) {
-               retval = write_buffer(fd, buf, objsize);
-               munmap(buf, objsize);
-               return retval;
-       }
-
-       buf = repack_object(sha1, &objsize);
-       retval = write_buffer(fd, buf, objsize);
-       free(buf);
-       return retval;
-}
-
-int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
-                      size_t bufsize, size_t *bufposn)
-{
-       char tmpfile[PATH_MAX];
-       int local;
-       z_stream stream;
-       unsigned char real_sha1[20];
-       unsigned char discard[4096];
-       int ret;
-       SHA_CTX c;
-
-       snprintf(tmpfile, sizeof(tmpfile), "%s/tmp_obj_XXXXXX", get_object_directory());
-
-       local = mkstemp(tmpfile);
-       if (local < 0) {
-               if (errno == EPERM)
-                       return error("insufficient permission for adding an object to repository database %s\n", get_object_directory());
-               else
-                       return error("unable to create temporary sha1 filename %s: %s\n", tmpfile, strerror(errno));
-       }
-
-       memset(&stream, 0, sizeof(stream));
-
-       inflateInit(&stream);
-
-       SHA1_Init(&c);
-
-       do {
-               ssize_t size;
-               if (*bufposn) {
-                       stream.avail_in = *bufposn;
-                       stream.next_in = (unsigned char *) buffer;
-                       do {
-                               stream.next_out = discard;
-                               stream.avail_out = sizeof(discard);
-                               ret = inflate(&stream, Z_SYNC_FLUSH);
-                               SHA1_Update(&c, discard, sizeof(discard) -
-                                           stream.avail_out);
-                       } while (stream.avail_in && ret == Z_OK);
-                       if (write_buffer(local, buffer, *bufposn - stream.avail_in) < 0)
-                               die("unable to write sha1 file");
-                       memmove(buffer, buffer + *bufposn - stream.avail_in,
-                               stream.avail_in);
-                       *bufposn = stream.avail_in;
-                       if (ret != Z_OK)
-                               break;
-               }
-               size = xread(fd, buffer + *bufposn, bufsize - *bufposn);
-               if (size <= 0) {
-                       close(local);
-                       unlink(tmpfile);
-                       if (!size)
-                               return error("Connection closed?");
-                       perror("Reading from connection");
-                       return -1;
-               }
-               *bufposn += size;
-       } while (1);
-       inflateEnd(&stream);
-
-       fchmod(local, 0444);
-       if (close(local) != 0)
-               die("unable to write sha1 file");
-       SHA1_Final(real_sha1, &c);
-       if (ret != Z_STREAM_END) {
-               unlink(tmpfile);
-               return error("File %s corrupted", sha1_to_hex(sha1));
-       }
-       if (hashcmp(sha1, real_sha1)) {
-               unlink(tmpfile);
-               return error("File %s has bad hash", sha1_to_hex(sha1));
-       }
-
-       return move_temp_to_file(tmpfile, sha1_file_name(sha1));
-}
-
 int has_pack_index(const unsigned char *sha1)
 {
        struct stat st;
@@ -2390,12 +2251,11 @@ int has_sha1_pack(const unsigned char *sha1, const char **ignore_packed)
 
 int has_sha1_file(const unsigned char *sha1)
 {
-       struct stat st;
        struct pack_entry e;
 
        if (find_pack_entry(sha1, &e, NULL))
                return 1;
-       return find_sha1_file(sha1, &st) ? 1 : 0;
+       return has_loose_object(sha1);
 }
 
 int index_pipe(unsigned char *sha1, int fd, const char *type, int write_object)
index 562b12e16ebc543db80629d8bcf9499f7a16e74f..ab6edbf19e80a5e07c85ff7cde05061fba349647 100644 (file)
@@ -1 +1,2 @@
-* -whitespace
+t[0-9][0-9][0-9][0-9]-*.sh -whitespace
+t[0-9][0-9][0-9][0-9]/* -whitespace
index 70841a4645b2469d8263553a7ba41d4f953774f7..8f12d48fe8b4ffe4a4b37dcd16ce58e50837433f 100644 (file)
--- a/t/README
+++ b/t/README
@@ -54,6 +54,38 @@ You can pass --verbose (or -v), --debug (or -d), and --immediate
        This causes the test to immediately exit upon the first
        failed test.
 
+--long-tests::
+       This causes additional long-running tests to be run (where
+       available), for more exhaustive testing.
+
+
+Skipping Tests
+--------------
+
+In some environments, certain tests have no way of succeeding
+due to platform limitation, such as lack of 'unzip' program, or
+filesystem that do not allow arbitrary sequence of non-NUL bytes
+as pathnames.
+
+You should be able to say something like
+
+    $ GIT_SKIP_TESTS=t9200.8 sh ./t9200-git-cvsexport-commit.sh
+
+and even:
+
+    $ GIT_SKIP_TESTS='t[0-4]??? t91?? t9200.8' make
+
+to omit such tests.  The value of the environment variable is a
+SP separated list of patterns that tells which tests to skip,
+and either can match the "t[0-9]{4}" part to skip the whole
+test, or t[0-9]{4} followed by ".$number" to say which
+particular test to skip.
+
+Note that some tests in the existing test suite rely on previous
+test item, so you cannot arbitrarily disable one and expect the
+remainder of test to check what the test originally was intended
+to check.
+
 
 Naming Tests
 ------------
index c56d2fbabaa0fdd90547ce8b629a629c21fbbc0e..3d8e06a20fade230136d50736a2f621d3c96002c 100755 (executable)
@@ -54,4 +54,39 @@ test_expect_success 'root subdir attribute test' '
 
 '
 
+test_expect_success 'setup bare' '
+
+       git clone --bare . bare.git &&
+       cd bare.git
+
+'
+
+test_expect_success 'bare repository: check that .gitattribute is ignored' '
+
+       (
+               echo "f test=f"
+               echo "a/i test=a/i"
+       ) >.gitattributes &&
+       attr_check f unspecified &&
+       attr_check a/f unspecified &&
+       attr_check a/c/f unspecified &&
+       attr_check a/i unspecified &&
+       attr_check subdir/a/i unspecified
+
+'
+
+test_expect_success 'bare repository: test info/attributes' '
+
+       (
+               echo "f test=f"
+               echo "a/i test=a/i"
+       ) >info/attributes &&
+       attr_check f f &&
+       attr_check a/f f &&
+       attr_check a/c/f f &&
+       attr_check a/i a/i &&
+       attr_check subdir/a/i unspecified
+
+'
+
 test_done
index cb1fbe5820723cbc39753fd652ec4fdafc94b988..d8b7f2ffbcc0427b1ae9d48feb4387f580e81d61 100755 (executable)
@@ -74,7 +74,7 @@ $content"
     test -z "$content" ||
     test_expect_success "--batch output of $type is correct" '
        expect="$(maybe_remove_timestamp "$batch_output" $no_ts)"
-       actual="$(maybe_remove_timestamp "$(echo $sha1 | git cat-file --batch)" no_ts)"
+       actual="$(maybe_remove_timestamp "$(echo $sha1 | git cat-file --batch)" $no_ts)"
         if test "z$expect" = "z$actual"
        then
                : happy
@@ -174,9 +174,27 @@ do
     '
 done
 
-test_expect_success "--batch-check for a non-existent object" '
-    test "deadbeef missing" = \
-    "$(echo_without_newline deadbeef | git cat-file --batch-check)"
+test_expect_success "--batch-check for a non-existent named object" '
+    test "foobar42 missing
+foobar84 missing" = \
+    "$( ( echo foobar42; echo_without_newline foobar84; ) | git cat-file --batch-check)"
+'
+
+test_expect_success "--batch-check for a non-existent hash" '
+    test "0000000000000000000000000000000000000042 missing
+0000000000000000000000000000000000000084 missing" = \
+    "$( ( echo 0000000000000000000000000000000000000042;
+         echo_without_newline 0000000000000000000000000000000000000084; ) \
+       | git cat-file --batch-check)"
+'
+
+test_expect_success "--batch for an existent and a non-existent hash" '
+    test "$tag_sha1 tag $tag_size
+$tag_content
+0000000000000000000000000000000000000000 missing" = \
+    "$( ( echo $tag_sha1;
+         echo_without_newline 0000000000000000000000000000000000000000; ) \
+       | git cat-file --batch)"
 '
 
 test_expect_success "--batch-check for an emtpy line" '
index 5e4252a320d5f967eacb9bd68bb0a510fe748e80..6c78c8bc9b76828c258f524e73b40d7daff7c305 100755 (executable)
@@ -83,4 +83,19 @@ do
 
 done
 
+test_expect_success 'git reflog expire honors core.sharedRepository' '
+       git config core.sharedRepository group &&
+       git reflog expire --all &&
+       actual="$(ls -l .git/logs/refs/heads/master)" &&
+       case "$actual" in
+       -rw-rw-*)
+               : happy
+               ;;
+       *)
+               echo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]
+               false
+               ;;
+       esac
+'
+
 test_done
index 0cfd47cfcff31fddfb9470654367a8f1ac261bfd..ceb6a79fe0c8ca5b26a9e148215556f2aa344eb9 100755 (executable)
@@ -26,7 +26,6 @@ test_expect_success setup '
 
 test_expect_success 'apply empty' '
        git reset --hard &&
-       >empty &&
        rm -f missing &&
        git apply patch0 &&
        test_cmp expect empty
@@ -34,7 +33,6 @@ test_expect_success 'apply empty' '
 
 test_expect_success 'apply --index empty' '
        git reset --hard &&
-       >empty &&
        rm -f missing &&
        git apply --index patch0 &&
        test_cmp expect empty &&
@@ -43,7 +41,6 @@ test_expect_success 'apply --index empty' '
 
 test_expect_success 'apply create' '
        git reset --hard &&
-       >empty &&
        rm -f missing &&
        git apply patch1 &&
        test_cmp expect missing
@@ -51,7 +48,6 @@ test_expect_success 'apply create' '
 
 test_expect_success 'apply --index create' '
        git reset --hard &&
-       >empty &&
        rm -f missing &&
        git apply --index patch1 &&
        test_cmp expect missing &&
index 0d7ed1f99b327c3130c43519c3a8a8fd4ee37892..1e192a2207a4b56d477e8e3efc382c3a296ba776 100755 (executable)
@@ -138,6 +138,25 @@ test_expect_success 'show' '
         test_cmp expect output)
 '
 
+cat > test/expect << EOF
+* remote origin
+  URL: $(pwd)/one/.git
+  Remote branch merged with 'git pull' while on branch master
+    master
+  Tracked remote branches
+    master side
+  Local branches pushed with 'git push'
+    master:upstream +refs/tags/lastbackup
+EOF
+
+test_expect_success 'show -n' '
+       (mv one one.unreachable &&
+        cd test &&
+        git remote show -n origin > output &&
+        mv ../one.unreachable ../one &&
+        test_cmp expect output)
+'
+
 test_expect_success 'prune' '
        (cd one &&
         git branch -m side side2) &&
@@ -148,6 +167,24 @@ test_expect_success 'prune' '
         ! git rev-parse refs/remotes/origin/side)
 '
 
+cat > test/expect << EOF
+Pruning origin
+URL: $(pwd)/one/.git
+ * [would prune] origin/side2
+EOF
+
+test_expect_success 'prune --dry-run' '
+       (cd one &&
+        git branch -m side2 side) &&
+       (cd test &&
+        git remote prune --dry-run origin > output &&
+        git rev-parse refs/remotes/origin/side2 &&
+        ! git rev-parse refs/remotes/origin/side &&
+       (cd ../one &&
+        git branch -m side side2) &&
+        test_cmp expect output)
+'
+
 test_expect_success 'add --mirror && prune' '
        (mkdir mirror &&
         cd mirror &&
index 6946557c677ccc190309cd5961b046c420174f7d..df7750f7d1ede6e888ec3071397115022e067eb3 100755 (executable)
@@ -37,7 +37,8 @@ test_expect_success "clone and setup child repos" '
                echo "Pull: refs/heads/one:refs/heads/one"
        } >.git/remotes/two &&
        cd .. &&
-       git clone . bundle
+       git clone . bundle &&
+       git clone . seven
 '
 
 test_expect_success "fetch test" '
@@ -295,4 +296,11 @@ test_expect_success 'configured fetch updates tracking' '
        )
 '
 
+test_expect_success 'pushing nonexistent branch by mistake should not segv' '
+
+       cd "$D" &&
+       test_must_fail git push seven no:no
+
+'
+
 test_done
index c5c59335f36d0d8f6a26ee606fd605e74e2d1e33..6805032a05cba00536f8d0621873741773a49f92 100755 (executable)
@@ -146,7 +146,7 @@ test_expect_success 'push with wildcard' '
 test_expect_success 'push with insteadOf' '
        mk_empty &&
        TRASH="$(pwd)/" &&
-       git config "url./$TRASH/.insteadOf" trash/ &&
+       git config "url.$TRASH.insteadOf" trash/ &&
        git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
        (
                cd testrepo &&
diff --git a/t/t6033-merge-crlf.sh b/t/t6033-merge-crlf.sh
new file mode 100755 (executable)
index 0000000..75d9602
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+append_cr () {
+       sed -e 's/$/Q/' | tr Q '\015'
+}
+
+remove_cr () {
+       tr '\015' Q | sed -e 's/Q$//'
+}
+
+test_description='merge conflict in crlf repo
+
+               b---M
+              /   /
+       initial---a
+
+'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+       git config core.autocrlf true &&
+       echo foo | append_cr >file &&
+       git add file &&
+       git commit -m "Initial" &&
+       git tag initial &&
+       git branch side &&
+       echo line from a | append_cr >file &&
+       git commit -m "add line from a" file &&
+       git tag a &&
+       git checkout side &&
+       echo line from b | append_cr >file &&
+       git commit -m "add line from b" file &&
+       git tag b &&
+       git checkout master
+'
+
+test_expect_success 'Check "ours" is CRLF' '
+       git reset --hard initial &&
+       git merge side -s ours &&
+       cat file | remove_cr | append_cr >file.temp &&
+       test_cmp file file.temp
+'
+
+test_expect_success 'Check that conflict file is CRLF' '
+       git reset --hard a &&
+       test_must_fail git merge side &&
+       cat file | remove_cr | append_cr >file.temp &&
+       test_cmp file file.temp
+'
+
+test_done
index ea476a2582c87b48ea5e8925a275184e8671391e..c6be2597f73dbd49e6301d01b5ea3c86ac8c34cb 100755 (executable)
@@ -117,4 +117,26 @@ test_expect_success 'rename tag Q back to A' '
 test_expect_success 'pack tag refs' 'git pack-refs'
 check_describe A-* HEAD
 
+test_expect_success 'set-up matching pattern tests' '
+       git tag -a -m test-annotated test-annotated &&
+       echo >>file &&
+       test_tick &&
+       git commit -a -m "one more" &&
+       git tag test1-lightweight &&
+       echo >>file &&
+       test_tick &&
+       git commit -a -m "yet another" &&
+       git tag test2-lightweight &&
+       echo >>file &&
+       test_tick &&
+       git commit -a -m "even more"
+
+'
+
+check_describe "test-annotated-*" --match="test-*"
+
+check_describe "test1-lightweight-*" --tags --match="test1-*"
+
+check_describe "test2-lightweight-*" --tags --match="test2-*"
+
 test_done
index 46ec1ce8aaa0305f6b4569664de041137db137d7..c25eff9e468acd628cf0a5e7a0968c801396e9f8 100755 (executable)
@@ -171,13 +171,16 @@ sed '$d' < expect.tmp > expect
 rm -f expect.tmp
 echo "# Committer:
 #" >> expect
-unset GIT_COMMITTER_EMAIL
-unset GIT_COMMITTER_NAME
 
 test_expect_success 'committer is automatic' '
 
        echo >>negative &&
-       git commit -e -m "sample"
+       (
+               unset GIT_COMMITTER_EMAIL
+               unset GIT_COMMITTER_NAME
+               # must fail because there is no change
+               test_must_fail git commit -e -m "sample"
+       ) &&
        head -n 8 .git/COMMIT_EDITMSG | \
        sed "s/^# Committer: .*/# Committer:/" >actual &&
        test_cmp expect actual
@@ -193,37 +196,56 @@ chmod +x .git/FAKE_EDITOR
 
 test_expect_success 'do not fire editor in the presence of conflicts' '
 
-       git clean
-       echo f>g
-       git add g
-       git commit -myes
-       git branch second
-       echo master>g
-       echo g>h
-       git add g h
-       git commit -mmaster
-       git checkout second
-       echo second>g
-       git add g
-       git commit -msecond
-       git cherry-pick -n master
-       echo "editor not started" > .git/result
-       GIT_EDITOR=`pwd`/.git/FAKE_EDITOR git commit && exit 1  # should fail
-       test "`cat .git/result`" = "editor not started"
+       git clean -f &&
+       echo f >g &&
+       git add g &&
+       git commit -m "add g" &&
+       git branch second &&
+       echo master >g &&
+       echo g >h &&
+       git add g h &&
+       git commit -m "modify g and add h" &&
+       git checkout second &&
+       echo second >g &&
+       git add g &&
+       git commit -m second &&
+       # Must fail due to conflict
+       test_must_fail git cherry-pick -n master &&
+       echo "editor not started" >.git/result &&
+       (
+               GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" &&
+               export GIT_EDITOR &&
+               test_must_fail git commit
+       ) &&
+       test "$(cat .git/result)" = "editor not started"
 '
 
 pwd=`pwd`
-cat > .git/FAKE_EDITOR << EOF
-#! /bin/sh
+cat >.git/FAKE_EDITOR <<EOF
+#! $SHELL_PATH
 # kill -TERM command added below.
 EOF
 
 test_expect_success 'a SIGTERM should break locks' '
        echo >>negative &&
-       sh -c '\''
+       "$SHELL_PATH" -c '\''
          echo kill -TERM $$ >> .git/FAKE_EDITOR
          GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1  # should fail
        ! test -f .git/index.lock
 '
 
+rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG
+git reset -q --hard
+
+test_expect_success 'Hand committing of a redundant merge removes dups' '
+
+       git rev-parse second master >expect &&
+       test_must_fail git merge second master &&
+       git checkout master g &&
+       EDITOR=: git commit -a &&
+       git cat-file commit HEAD | sed -n -e "s/^parent //p" -e "/^$/q" >actual &&
+       test_cmp expect actual
+
+'
+
 test_done
index 8c58f0b8d7488732d25fd1d154b6c5459f5d080e..1190576a658d08a680e177b748cfc5e69caa3ddb 100755 (executable)
@@ -64,7 +64,21 @@ test_expect_success 'interact with it via git-svn' '
 
        # Make sure --add-author-from with --use-log-author affected
        # the authorship information
-       grep "^Author: A U Thor " actual.4
+       grep "^Author: A U Thor " actual.4 &&
+
+       # Make sure there are no commit messages with excess blank lines
+       test $(grep "^ " actual.2 | wc -l) = 3 &&
+       test $(grep "^ " actual.3 | wc -l) = 5 &&
+       test $(grep "^ " actual.4 | wc -l) = 5 &&
+
+       # Make sure there are no svn commit messages with excess blank lines
+       (
+               cd work.svn &&
+               svn up &&
+               
+               test $(svn log -r2:2 | wc -l) = 5 &&
+               test $(svn log -r4:4 | wc -l) = 7
+       )
 '
 
 test_done
index 7a8bd27abc79a43a9248c3bcee8d6a3670e30fe3..e331cadcff479a8d9de59590c44b0502653653f9 100644 (file)
@@ -80,6 +80,8 @@ do
                debug=t; shift ;;
        -i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
                immediate=t; shift ;;
+       -l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
+               export GIT_TEST_LONG=t; shift ;;
        -h|--h|--he|--hel|--help)
                help=t; shift ;;
        -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
@@ -168,7 +170,7 @@ trap 'die' exit
 # environment variables to work around this.
 #
 # In particular, quoting isn't enough, as the path may contain the same quote
-# that we're using. 
+# that we're using.
 test_set_editor () {
        FAKE_EDITOR="$1"
        export FAKE_EDITOR
@@ -386,7 +388,7 @@ test_done () {
 }
 
 # Test the binaries we have just built.  The tests are kept in
-# t/ subdirectory and are run in trash subdirectory.
+# t/ subdirectory and are run in 'trash directory' subdirectory.
 PATH=$(pwd)/..:$PATH
 GIT_EXEC_PATH=$(pwd)/..
 GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
index 31de6c16bd021003bdd4fc1475bfe500f28773f4..0e68ee6d2e2fb1b866ecec00c5f6446af366a62e 100644 (file)
--- a/walker.c
+++ b/walker.c
@@ -59,6 +59,7 @@ static int process_tree(struct walker *walker, struct tree *tree)
        free(tree->buffer);
        tree->buffer = NULL;
        tree->size = 0;
+       tree->object.parsed = 0;
        return 0;
 }