]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'am/stash-branch'
authorJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2008 22:16:09 +0000 (15:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2008 22:16:09 +0000 (15:16 -0700)
* am/stash-branch:
  Add a test for "git stash branch"
  Implement "git stash branch <newbranch> <stash>"

217 files changed:
.gitignore
Documentation/RelNotes-1.5.6.2.txt
Documentation/RelNotes-1.5.6.3.txt [new file with mode: 0644]
Documentation/RelNotes-1.6.0.txt
Documentation/config.txt
Documentation/fetch-options.txt
Documentation/git-add.txt
Documentation/git-am.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-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-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-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-imap-send.txt
Documentation/git-index-pack.txt
Documentation/git-init.txt
Documentation/git-instaweb.txt
Documentation/git-log.txt
Documentation/git-ls-files.txt
Documentation/git-ls-remote.txt
Documentation/git-mailinfo.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.txt
Documentation/git-mergetool.txt
Documentation/git-name-rev.txt
Documentation/git-pack-objects.txt
Documentation/git-pack-redundant.txt
Documentation/git-parse-remote.txt
Documentation/git-patch-id.txt
Documentation/git-peek-remote.txt
Documentation/git-prune.txt
Documentation/git-pull.txt
Documentation/git-push.txt
Documentation/git-read-tree.txt
Documentation/git-rebase.txt
Documentation/git-receive-pack.txt
Documentation/git-reflog.txt
Documentation/git-remote.txt
Documentation/git-repack.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-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-submodule.txt
Documentation/git-svn.txt
Documentation/git-symbolic-ref.txt
Documentation/git-tag.txt
Documentation/git-tar-tree.txt
Documentation/git-update-index.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/gitcore-tutorial.txt
Documentation/gitcvs-migration.txt
Documentation/gitdiffcore.txt
Documentation/gitglossary.txt
Documentation/githooks.txt
Documentation/gitignore.txt
Documentation/gitk.txt
Documentation/gitrepository-layout.txt
Documentation/gittutorial-2.txt
Documentation/gittutorial.txt
Documentation/i18n.txt
Documentation/install-doc-quick.sh
Documentation/merge-options.txt
Documentation/pretty-formats.txt
Documentation/pull-fetch-param.txt
Documentation/urls-remotes.txt
Documentation/user-manual.txt
INSTALL
Makefile
builtin-apply.c
builtin-branch.c
builtin-checkout.c
builtin-clone.c
builtin-commit.c
builtin-config.c
builtin-fast-export.c
builtin-fetch-pack.c
builtin-log.c
builtin-mailinfo.c
builtin-pack-objects.c
builtin-reflog.c
builtin-rerere.c
builtin-rev-list.c
builtin-revert.c
builtin-send-pack.c
builtin-tag.c
builtin-unpack-objects.c
builtin-verify-pack.c
bundle.c
cache.h
config.c
contrib/completion/git-completion.bash
contrib/examples/git-remote.perl
contrib/fast-import/import-zips.py [new file with mode: 0755]
contrib/hg-to-git/hg-to-git.py
convert.c
daemon.c
diff.c
git-add--interactive.perl
git-compat-util.h
git-gui/git-gui.sh
git-gui/lib/diff.tcl
git-merge-stupid.sh [deleted file]
git-send-email.perl
git-stash.sh
git-submodule.sh
git-svn.perl
git.c
gitweb/INSTALL
gitweb/README
http.c
http.h
index-pack.c
path.c
perl/Git.pm
receive-pack.c
refs.c
remote.c
remote.h
revision.c
revision.h
run-command.c
setup.c
sha1_file.c
show-index.c
t/lib-httpd.sh
t/lib-httpd/apache.conf
t/t0000-basic.sh
t/t0060-path-utils.sh [new file with mode: 0755]
t/t1400-update-ref.sh
t/t1504-ceiling-dirs.sh [new file with mode: 0755]
t/t3503-cherry-pick-root.sh [new file with mode: 0755]
t/t3701-add-interactive.sh
t/t4100-apply-stat.sh
t/t4100/t-apply-8.expect [new file with mode: 0644]
t/t4100/t-apply-8.patch [new file with mode: 0644]
t/t4100/t-apply-9.expect [new file with mode: 0644]
t/t4100/t-apply-9.patch [new file with mode: 0644]
t/t4112-apply-renames.sh
t/t4127-apply-same-fn.sh
t/t4128-apply-root.sh [new file with mode: 0755]
t/t4200-rerere.sh
t/t5304-prune.sh [changed mode: 0644->0755]
t/t5404-tracking-branches.sh
t/t5540-http-push.sh
t/t5601-clone.sh
t/t6040-tracking-info.sh [new file with mode: 0755]
t/t7610-mergetool.sh [changed mode: 0644->0755]
t/t7701-repack-unpack-unreachable.sh
t/t9100-git-svn-basic.sh
t/t9113-git-svn-dcommit-new-file.sh
t/test-lib.sh
test-absolute-path.c [deleted file]
test-path-utils.c [new file with mode: 0644]
transport.c
wt-status.c

index 4ff2fec2785d21055bdcb5d9661d5090624b92da..a213e8e25bb2442326e86cbfb9ef56319f482869 100644 (file)
@@ -75,7 +75,6 @@ git-merge-one-file
 git-merge-ours
 git-merge-recursive
 git-merge-resolve
-git-merge-stupid
 git-merge-subtree
 git-mergetool
 git-mktag
@@ -142,7 +141,6 @@ git-write-tree
 git-core-*/?*
 gitk-wish
 gitweb/gitweb.cgi
-test-absolute-path
 test-chmtime
 test-date
 test-delta
@@ -150,6 +148,7 @@ test-dump-cache-tree
 test-genrandom
 test-match-trees
 test-parse-options
+test-path-utils
 test-sha1
 common-cmds.h
 *.tar.gz
index 02d5910d5c89436b3de29fec5df633dd93a6eb4a..5902a85a78610ec38f4cf160ccd3c01267b4f9a1 100644 (file)
@@ -11,21 +11,30 @@ Futureproof
 Fixes since v1.5.6.1
 --------------------
 
-* Optimization for a large import via "git-svn" introduced in v1.5.6 had a
-  serious memory and temporary file leak, which made it unusable for
-  moderately large import.
+* "git clone" from a remote that is named with url.insteadOf setting in
+  $HOME/.gitconfig did not work well.
 
-* "git-svn" mangled remote nickname used in the configuration file
-  unnecessarily.
+* "git describe --long --tags" segfaulted when the described revision was
+  tagged with a lightweight tag.
 
 * "git diff --check" did not report the result via its exit status
   reliably.
 
+* When remote side used to have branch 'foo' and git-fetch finds that now
+  it has branch 'foo/bar', it refuses to lose the existing remote tracking
+  branch and its reflog.  The error message has been improved to suggest
+  pruning the remote if the user wants to proceed and get the latest set
+  of branches from the remote, including such 'foo/bar'.
+
+* "git reset file" should mean the same thing as "git reset HEAD file",
+  but we required disambiguating -- even when "file" is not ambiguous.
+
 * "git show" segfaulted when an annotated tag that points at another
   annotated tag was given to it.
 
---
-exec >/var/tmp/1
-echo O=$(git describe maint)
-O=v1.5.6.1-13-g4f3dcc2
-git shortlog --no-merges $O..maint
+* Optimization for a large import via "git-svn" introduced in v1.5.6 had a
+  serious memory and temporary file leak, which made it unusable for
+  moderately large import.
+
+* "git-svn" mangled remote nickname used in the configuration file
+  unnecessarily.
diff --git a/Documentation/RelNotes-1.5.6.3.txt b/Documentation/RelNotes-1.5.6.3.txt
new file mode 100644 (file)
index 0000000..dd0559b
--- /dev/null
@@ -0,0 +1,42 @@
+GIT v1.5.6.3 Release Notes
+==========================
+
+Fixes since v1.5.6.2
+--------------------
+
+* Setting GIT_TRACE will report spawning of external process via run_command().
+
+* Bash completion script did not notice '--' marker on the command
+  line and tried the relatively slow "ref completion" even when
+  completing arguments after one.
+
+* Registering a non-empty blob racily and then truncating the working
+  tree file for it confused "racy-git avoidance" logic into thinking
+  that the path is now unchanged.
+
+* "git clone" had a leftover debugging fprintf().
+
+* "git clone -q" was not quiet enough as it used to and gave object count
+  and progress reports.
+
+* "git clone" marked downloaded packfile with .keep; this could be a
+  good thing if the remote side is well packed but otherwise not,
+  especially for a project that is not really big.
+
+* The section that describes attributes related to git-archive were placed
+  in a wrong place in the gitattributes(5) manual page.
+
+* When "git push" tries to remove a remote ref, and corresponding
+  tracking ref is missing, we used to report error (i.e. failure to
+  remove something that does not exist).
+
+* "git mailinfo" (hence "git am") did not handle commit log messages in a
+  MIME multipart mail correctly.
+
+Contains other various documentation fixes.
+
+--
+exec >/var/tmp/1
+O=v1.5.6.2-23-ge965647
+echo O=$(git describe maint)
+git shortlog --no-merges $O..maint
index e5c285f9c042c71cf6c67b0e2292d2876ec739b1..e1f013bd3b7bbfb30907d981b7e1d798ce94459e 100644 (file)
@@ -23,6 +23,13 @@ encoding introduced in v1.4.4.  Pack idx files are using version 2 that
 allows larger packs and added robustness thanks to its CRC checking,
 introduced in v1.5.2.
 
+GIT_CONFIG, which was only documented as affecting "git config", but
+actually affected all git commands, now only affects "git config".
+GIT_LOCAL_CONFIG, also only documented as affecting "git config" and
+not different from GIT_CONFIG in a useful way, is removed.
+
+An ancient merge strategy "stupid" has been removed.
+
 
 Updates since v1.5.6
 --------------------
@@ -32,8 +39,13 @@ Updates since v1.5.6
 * git-p4 in contrib learned "allowSubmit" configuration to control on
   which branch to allow "submit" subcommand.
 
+* git-gui learned to stage changes per-line.
+
 (portability)
 
+* Changes for MinGW port have been merged, thanks to Johannes Sixt and
+  gangs.
+
 * Sample hook scripts shipped in templates/ are now suffixed with
   *.sample.  We used to prevent them from triggering by default by
   relying on the fact that we install them as unexecutable, but on
@@ -48,7 +60,8 @@ Updates since v1.5.6
 
 * Updated howto/update-hook-example
 
-* Got rid of usage of "git-foo" from the tutorial.
+* Got rid of usage of "git-foo" from the tutorial and made typography
+  more consistent.
 
 * Disambiguating "--" between revs and paths is finally documented.
 
@@ -79,6 +92,11 @@ Updates since v1.5.6
 
 (usability, bells and whistles)
 
+* A new environment variable GIT_CEILING_DIRECTORIES can be used to stop
+  the discovery process of the toplevel of working tree; this may be useful
+  when you are working in a slow network disk and are outside any working tree,
+  as bash-completion and "git help" may still need to run in these places.
+
 * git-apply can handle a patch that touches the same path more than once
   much better than before.
 
@@ -102,13 +120,16 @@ Updates since v1.5.6
 * fast-export learned to export and import marks file; this can be used to
   interface with fast-import incrementally.
 
-* Original SHA-1 value for "update-ref -d" is optional now.
+* "git rerere" can be told to update the index with auto-reused resolution
+  with rerere.autoupdate configuration variable.
 
 * git-send-mail can talk not just over SSL but over TLS now.
 
 * You can tell "git status -u" to even more aggressively omit checking
   untracked files with --untracked-files=no.
 
+* Original SHA-1 value for "update-ref -d" is optional now.
+
 * Error codes from gitweb are made more descriptive where possible, rather
   than "403 forbidden" as we used to issue everywhere.
 
@@ -121,14 +142,12 @@ Fixes since v1.5.6
 All of the fixes in v1.5.6 maintenance series are included in
 this release, unless otherwise noted.
 
- * diff -c/--cc showed unnecessary "deletion" lines at the context
-   boundary (needs backmerge to maint).
-
- * "git-clone <src> <dst>" did not create leading directories for <dst>
-   like the scripted version used to do (needs backport to maint).
+ * "git fetch" into an empty repository used to remind the fetch will
+   be huge by saying "no common commits", but it is already known by
+   the user anyway (need to backport 8cb560f to 'maint').
 
 ---
 exec >/var/tmp/1
-O=v1.5.6.1-155-gaa0c1f2
+O=v1.5.6.2-246-g86d7244
 echo O=$(git describe refs/heads/master)
 git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint
index 561ff645f96af3a53a6d43c4d9320090aef623e8..e7848055a90c38f48ad7180cb538d0b00e482710 100644 (file)
@@ -63,7 +63,7 @@ The values following the equals sign in variable assign are all either
 a string, an integer, or a boolean.  Boolean values may be given as yes/no,
 0/1 or true/false.  Case is not significant in boolean values, when
 converting value to the canonical form using '--bool' type specifier;
-`git-config` will ensure that the output is "true" or "false".
+'git-config' will ensure that the output is "true" or "false".
 
 String values may be entirely or partially enclosed in double quotes.
 You need to enclose variable value in double quotes if you want to
@@ -118,8 +118,8 @@ core.fileMode::
        See linkgit:git-update-index[1]. True by default.
 
 core.quotepath::
-       The commands that output paths (e.g. `ls-files`,
-       `diff`), when not given the `-z` option, will quote
+       The commands that output paths (e.g. 'ls-files',
+       'diff'), when not given the `-z` option, will quote
        "unusual" characters in the pathname by enclosing the
        pathname in a double-quote pair and with backslashes the
        same way strings in C source code are quoted.  If this
@@ -356,8 +356,8 @@ core.pager::
 
 core.whitespace::
        A comma separated list of common whitespace problems to
-       notice.  `git diff` will use `color.diff.whitespace` to
-       highlight them, and `git apply --whitespace=error` will
+       notice.  'git-diff' will use `color.diff.whitespace` to
+       highlight them, and 'git-apply --whitespace=error' will
        consider them as errors:
 +
 * `trailing-space` treats trailing whitespaces at the end of the line
@@ -396,11 +396,11 @@ it will be treated as a shell command.  For example, defining
 "gitk --all --not ORIG_HEAD".
 
 apply.whitespace::
-       Tells `git-apply` how to handle whitespaces, in the same way
+       Tells 'git-apply' how to handle whitespaces, in the same way
        as the '--whitespace' option. See linkgit:git-apply[1].
 
 branch.autosetupmerge::
-       Tells `git-branch` and `git-checkout` to setup new branches
+       Tells 'git-branch' and 'git-checkout' to setup new branches
        so that linkgit:git-pull[1] will appropriately merge from the
        starting point branch. Note that even if this option is not set,
        this behavior can be chosen per-branch using the `--track`
@@ -411,7 +411,7 @@ branch.autosetupmerge::
        branch. This option defaults to true.
 
 branch.autosetuprebase::
-       When a new branch is created with `git-branch` or `git-checkout`
+       When a new branch is created with 'git-branch' or 'git-checkout'
        that tracks another branch, this variable tells git to set
        up pull to rebase instead of merge (see "branch.<name>.rebase").
        When `never`, rebase is never automatically set to true.
@@ -426,20 +426,20 @@ branch.autosetuprebase::
        This option defaults to never.
 
 branch.<name>.remote::
-       When in branch <name>, it tells `git fetch` which remote to fetch.
-       If this option is not given, `git fetch` defaults to remote "origin".
+       When in branch <name>, it tells 'git-fetch' which remote to fetch.
+       If this option is not given, 'git-fetch' defaults to remote "origin".
 
 branch.<name>.merge::
-       When in branch <name>, it tells `git fetch` the default
+       When in branch <name>, it tells 'git-fetch' the default
        refspec to be marked for merging in FETCH_HEAD. The value is
        handled like the remote part of a refspec, and must match a
        ref which is fetched from the remote given by
        "branch.<name>.remote".
-       The merge information is used by `git pull` (which at first calls
-       `git fetch`) to lookup the default branch for merging. Without
-       this option, `git pull` defaults to merge the first refspec fetched.
+       The merge information is used by 'git-pull' (which at first calls
+       'git-fetch') to lookup the default branch for merging. Without
+       this option, 'git-pull' defaults to merge the first refspec fetched.
        Specify multiple values to get an octopus merge.
-       If you wish to setup `git pull` so that it merges into <name> from
+       If you wish to setup 'git-pull' so that it merges into <name> from
        another branch in the local repository, you can point
        branch.<name>.merge to the desired branch, and use the special setting
        `.` (a period) for branch.<name>.remote.
@@ -508,12 +508,12 @@ color.diff.<slot>::
 
 color.interactive::
        When set to `always`, always use colors for interactive prompts
-       and displays (such as those used by "git add --interactive").
+       and displays (such as those used by "git-add --interactive").
        When false (or `never`), never.  When set to `true` or `auto`, use
        colors only when the output is to the terminal. Defaults to false.
 
 color.interactive.<slot>::
-       Use customized color for `git add --interactive`
+       Use customized color for 'git-add --interactive'
        output. `<slot>` may be `prompt`, `header`, or `help`, for
        three distinct types of normal output from interactive
        programs.  The values of these variables may be specified as
@@ -550,14 +550,14 @@ color.ui::
        take precedence over this setting. Defaults to false.
 
 diff.autorefreshindex::
-       When using `git diff` to compare with work tree
+       When using 'git-diff' to compare with work tree
        files, do not consider stat-only change as changed.
        Instead, silently run `git update-index --refresh` to
        update the cached stat information for paths whose
        contents in the work tree match the contents in the
        index.  This option defaults to true.  Note that this
-       affects only `git diff` Porcelain, and not lower level
-       `diff` commands, such as `git diff-files`.
+       affects only 'git-diff' Porcelain, and not lower level
+       'diff' commands, such as 'git-diff-files'.
 
 diff.external::
        If this config variable is set, diff generation is not
@@ -568,7 +568,7 @@ diff.external::
 
 diff.renameLimit::
        The number of files to consider when performing the copy/rename
-       detection; equivalent to the git diff option '-l'.
+       detection; equivalent to the 'git-diff' option '-l'.
 
 diff.renames::
        Tells git to detect renames.  If set to any boolean value, it
@@ -608,7 +608,7 @@ format.pretty::
 
 gc.aggressiveWindow::
        The window size parameter used in the delta compression
-       algorithm used by 'git gc --aggressive'.  This defaults
+       algorithm used by 'git-gc --aggressive'.  This defaults
        to 10.
 
 gc.auto::
@@ -625,39 +625,44 @@ gc.autopacklimit::
        default value is 50.  Setting this to 0 disables it.
 
 gc.packrefs::
-       `git gc` does not run `git pack-refs` in a bare repository by
+       'git-gc' does not run `git pack-refs` in a bare repository by
        default so that older dumb-transport clients can still fetch
-       from the repository.  Setting this to `true` lets `git
-       gc` to run `git pack-refs`.  Setting this to `false` tells
-       `git gc` never to run `git pack-refs`. The default setting is
+       from the repository.  Setting this to `true` lets 'git-gc'
+       to run `git pack-refs`.  Setting this to `false` tells
+       'git-gc' never to run `git pack-refs`. The default setting is
        `notbare`. Enable it only when you know you do not have to
        support such clients.  The default setting will change to `true`
        at some stage, and setting this to `false` will continue to
-       prevent `git pack-refs` from being run from `git gc`.
+       prevent `git pack-refs` from being run from 'git-gc'.
 
 gc.pruneexpire::
-       When `git gc` is run, it will call `prune --expire 2.weeks.ago`.
+       When 'git-gc' is run, it will call 'prune --expire 2.weeks.ago'.
        Override the grace period with this config variable.
 
 gc.reflogexpire::
-       `git reflog expire` removes reflog entries older than
+       'git-reflog expire' removes reflog entries older than
        this time; defaults to 90 days.
 
 gc.reflogexpireunreachable::
-       `git reflog expire` removes reflog entries older than
+       'git-reflog expire' removes reflog entries older than
        this time and are not reachable from the current tip;
        defaults to 30 days.
 
 gc.rerereresolved::
        Records of conflicted merge you resolved earlier are
-       kept for this many days when `git rerere gc` is run.
+       kept for this many days when 'git-rerere gc' is run.
        The default is 60 days.  See linkgit:git-rerere[1].
 
 gc.rerereunresolved::
        Records of conflicted merge you have not resolved are
-       kept for this many days when `git rerere gc` is run.
+       kept for this many days when 'git-rerere gc' is run.
        The default is 15 days.  See linkgit:git-rerere[1].
 
+rerere.autoupdate::
+       When set to true, `git-rerere` updates the index with the
+       resulting contents after it cleanly resolves conflicts using
+       previously recorded resolution.  Defaults to false.
+
 rerere.enabled::
        Activate recording of resolved conflicts, so that identical
        conflict hunks can be resolved automatically, should they
@@ -680,7 +685,7 @@ gitcvs.usecrlfattr
        treat it as text. If `crlf` is explicitly unset, the file
        will be set with '-kb' mode, which supresses any newline munging
        the client might otherwise do. If `crlf` is not specified,
-       then 'gitcvs.allbinary' is used. See linkgit:gitattribute[5].
+       then 'gitcvs.allbinary' is used. See linkgit:gitattributes[5].
 
 gitcvs.allbinary::
        This is used if 'gitcvs.usecrlfattr' does not resolve
@@ -821,7 +826,7 @@ i18n.commitEncoding::
 
 i18n.logOutputEncoding::
        Character encoding the commit messages are converted to when
-       running `git-log` and friends.
+       running 'git-log' and friends.
 
 instaweb.browser::
        Specify the program that will be used to browse your working
@@ -844,7 +849,7 @@ instaweb.port::
 
 log.date::
        Set default date-time mode for the log command. Setting log.date
-       value is similar to using git log's --date option. The value is one of
+       value is similar to using 'git-log'\'s --date option. The value is one of the
        following alternatives: {relative,local,default,iso,rfc,short}.
        See linkgit:git-log[1].
 
index 85c87180db59906f5401eafbe6460f49a60ee9dc..d313795fdbc420e3395adc42aebe82fabda037d4 100644 (file)
@@ -21,7 +21,7 @@
 
 -f::
 --force::
-       When `git-fetch` is used with `<rbranch>:<lbranch>`
+       When 'git-fetch' is used with `<rbranch>:<lbranch>`
        refspec, it refuses to update the local branch
        `<lbranch>` unless the remote branch `<rbranch>` it
        fetches is a descendant of `<lbranch>`.  This option
@@ -53,10 +53,10 @@ endif::git-pull[]
 
 -u::
 --update-head-ok::
-       By default `git-fetch` refuses to update the head which
+       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`
-       to communicate with `git-fetch`, and unless you are
+       check.  This is purely for the internal use for 'git-pull'
+       to communicate with 'git-fetch', and unless you are
        implementing your own Porcelain you are not supposed to
        use it.
 
index 011a7436529f50e8b128f19d30bbeb0bdc82375b..46dd56c12a8167c3861a304e820c664e3c92ca4f 100644 (file)
@@ -236,6 +236,7 @@ patch::
        k - leave this hunk undecided, see previous undecided hunk
        K - leave this hunk undecided, see previous hunk
        s - split the current hunk into smaller hunks
+       e - manually edit the current hunk
        ? - print help
 +
 After deciding the fate for all hunks, if there is any hunk
index 1296b91172054bef9cda3fe11824b360d4446220..3863eebcef8533de78adf8733b580f146ac66ec4 100644 (file)
@@ -35,11 +35,11 @@ OPTIONS
 
 -k::
 --keep::
-       Pass `-k` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
+       Pass `-k` flag to 'git-mailinfo' (see linkgit:git-mailinfo[1]).
 
 -u::
 --utf8::
-       Pass `-u` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
+       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
        `i18n.commitencoding` can be used to specify project's
@@ -49,7 +49,7 @@ This was optional in prior versions of git, but now it is the
 default.   You could use `--no-utf8` to override this.
 
 --no-utf8::
-       Pass `-n` flag to `git-mailinfo` (see
+       Pass `-n` flag to 'git-mailinfo' (see
        linkgit:git-mailinfo[1]).
 
 -3::
@@ -61,17 +61,17 @@ default.   You could use `--no-utf8` to override this.
 
 -b::
 --binary::
-       Pass `--allow-binary-replacement` flag to `git-apply`
+       Pass `--allow-binary-replacement` flag to 'git-apply'
        (see linkgit:git-apply[1]).
 
 --whitespace=<option>::
-       This flag is passed to the `git-apply` (see linkgit:git-apply[1])
+       This flag is passed to the 'git-apply' (see linkgit:git-apply[1])
        program that applies
        the patch.
 
 -C<n>::
 -p<n>::
-       These flags are passed to the `git-apply` (see linkgit:git-apply[1])
+       These flags are passed to the 'git-apply' (see linkgit:git-apply[1])
        program that applies
        the patch.
 
@@ -97,7 +97,7 @@ default.   You could use `--no-utf8` to override this.
        to the screen before exiting.  This overrides the
        standard message informing you to use `--resolved`
        or `--skip` to handle the failure.  This is solely
-       for internal use between `git-rebase` and `git-am`.
+       for internal use between 'git-rebase' and 'git-am'.
 
 DISCUSSION
 ----------
index 70d19f63eb562063dd373a4474f6efc0e2ea32dc..feb51f124ac8a806e65d41f6274c58de64d2991f 100644 (file)
@@ -14,11 +14,11 @@ SYNOPSIS
          [--allow-binary-replacement | --binary] [--reject] [-z]
          [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
          [--whitespace=<nowarn|warn|fix|error|error-all>]
-         [--exclude=PATH] [--verbose] [<patch>...]
+         [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>...]
 
 DESCRIPTION
 -----------
-Reads supplied diff output and applies it on a git index file
+Reads supplied 'diff' output and applies it on a git index file
 and a work tree.
 
 OPTIONS
@@ -64,7 +64,7 @@ OPTIONS
        without using the working tree. This implies '--index'.
 
 --build-fake-ancestor <file>::
-       Newer `git-diff` output has embedded 'index information'
+       Newer 'git-diff' output has embedded 'index information'
        for each blob to help identify the original version that
        the patch applies to.  When this flag is given, and if
        the original versions of the blobs is available locally,
@@ -78,7 +78,7 @@ the information is read from the current index instead.
        Apply the patch in reverse.
 
 --reject::
-       For atomicity, `git-apply` by default fails the whole patch and
+       For atomicity, 'git-apply' by default fails the whole patch and
        does not touch the working tree when some of the hunks
        do not apply.  This option makes it apply
        the parts of the patch that are applicable, and leave the
@@ -102,7 +102,7 @@ the information is read from the current index instead.
        ever ignored.
 
 --unidiff-zero::
-       By default, `git-apply` expects that the patch being
+       By default, 'git-apply' expects that the patch being
        applied is a unified diff with at least one line of context.
        This provides good safety measures, but breaks down when
        applying a diff generated with --unified=0. To bypass these
@@ -113,7 +113,7 @@ discouraged.
 
 --apply::
        If you use any of the options marked "Turns off
-       'apply'" above, `git-apply` reads and outputs the
+       'apply'" above, 'git-apply' reads and outputs the
        information you asked without actually applying the
        patch.  Give this flag after those flags to also apply
        the patch.
@@ -121,7 +121,7 @@ discouraged.
 --no-add::
        When applying a patch, ignore additions made by the
        patch.  This can be used to extract the common part between
-       two files by first running `diff` on them and applying
+       two files by first running 'diff' on them and applying
        the result with this option, which would apply the
        deletion part but not addition part.
 
@@ -165,9 +165,9 @@ behavior:
 * `error-all` is similar to `error` but shows all errors.
 
 --inaccurate-eof::
-       Under certain circumstances, some versions of diff do not correctly
+       Under certain circumstances, some versions of 'diff' do not correctly
        detect a missing new-line at the end of the file. As a result, patches
-       created by such diff programs do not record incomplete lines
+       created by such 'diff' programs do not record incomplete lines
        correctly. This option adds support for applying such patches by
        working around this bug.
 
@@ -182,6 +182,14 @@ behavior:
        by inspecting the patch (e.g. after editing the patch without
        adjusting the hunk headers appropriately).
 
+--directory=<root>::
+       Prepend <root> to all filenames.  If a "-p" argument was passed, too,
+       it is applied before prepending the new root.
++
+For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh`
+can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by
+running `git apply --directory=modules/git-gui`.
+
 Configuration
 -------------
 
@@ -191,7 +199,7 @@ apply.whitespace::
 
 Submodules
 ----------
-If the patch contains any changes to submodules then `git-apply`
+If the patch contains any changes to submodules then 'git-apply'
 treats these changes as follows.
 
 If --index is specified (explicitly or implicitly), then the submodule
index f089debaa9bd25e002b64f8dabc7459dfcc4d787..c7a6e3ec050b7ceeec79d468b5ffa123314c8f5d 100644 (file)
@@ -29,17 +29,17 @@ branches that have different roots, it will refuse to run. In that case,
 edit your <archive/branch> parameters to define clearly the scope of the
 import.
 
-`git-archimport` uses `tla` extensively in the background to access the
+'git-archimport' uses `tla` extensively in the background to access the
 Arch repository.
 Make sure you have a recent version of `tla` available in the path. `tla` must
-know about the repositories you pass to `git-archimport`.
+know about the repositories you pass to 'git-archimport'.
 
-For the initial import, `git-archimport` expects to find itself in an empty
+For the initial import, 'git-archimport' expects to find itself in an empty
 directory. To follow the development of a project that uses Arch, rerun
-`git-archimport` with the same parameters as the initial import to perform
+'git-archimport' with the same parameters as the initial import to perform
 incremental imports.
 
-While `git-archimport` will try to create sensible branch names for the
+While 'git-archimport' will try to create sensible branch names for the
 archives that it imports, it is also possible to specify git branch names
 manually.  To do so, write a git branch name after each <archive/branch>
 parameter, separated by a colon.  This way, you can shorten the Arch
@@ -84,7 +84,7 @@ OPTIONS
 
 -o::
        Use this for compatibility with old-style branch names used by
-       earlier versions of `git-archimport`.  Old-style branch names
+       earlier versions of 'git-archimport'.  Old-style branch names
        were category--branch, whereas new-style branch names are
        archive,category--branch--version.  In both cases, names given
        on the command-line will override the automatically-generated
index dbe9bad2f3272f5972a07e2d5e2a63e1b00f9fcb..41cbf9c0819872a322321455b8a5cb805efcc26b 100644 (file)
@@ -20,13 +20,13 @@ structure for the named tree, and writes it out to the standard
 output.  If <prefix> is specified it is
 prepended to the filenames in the archive.
 
-`git-archive` behaves differently when given a tree ID versus when
+'git-archive' behaves differently when given a tree ID versus when
 given a commit ID or tag ID.  In the first case the current time is
 used as modification time of each file in the archive.  In the latter
 case the commit time as recorded in the referenced commit object is
 used instead.  Additionally the commit ID is stored in a global
 extended pax header if the tar format is used; it can be extracted
-using `git-get-tar-commit-id`. In ZIP files it is stored as a file
+using 'git-get-tar-commit-id'. In ZIP files it is stored as a file
 comment.
 
 OPTIONS
@@ -57,7 +57,7 @@ OPTIONS
 
 --exec=<git-upload-archive>::
        Used with --remote to specify the path to the
-       `git-upload-archive` on the remote side.
+       'git-upload-archive' on the remote side.
 
 <tree-ish>::
        The tree or commit to produce an archive for.
index 8bbcb940fb9cf9474693900344a90ee03c02ff4a..c7981efcd9b86287bbea9ddcaf187a9bd48c77eb 100644 (file)
@@ -26,7 +26,7 @@ on the subcommand:
  git bisect log
  git bisect run <cmd>...
 
-This command uses `git rev-list --bisect` to help drive the
+This command uses 'git-rev-list --bisect' to help drive the
 binary search process to find which change introduced a bug, given an
 old "good" commit object name and a later "bad" commit object name.
 
@@ -98,10 +98,10 @@ During the bisection process, you can say
 $ git bisect visualize
 ------------
 
-to see the currently remaining suspects in `gitk`.  `visualize` is a bit
+to see the currently remaining suspects in 'gitk'.  `visualize` is a bit
 too long to type and `view` is provided as a synonym.
 
-If `DISPLAY` environment variable is not set, `git log` is used
+If 'DISPLAY' environment variable is not set, 'git-log' is used
 instead.  You can even give command line options such as `-p` and
 `--stat`.
 
@@ -215,7 +215,7 @@ tweaks (e.g., s/#define DEBUG 0/#define DEBUG 1/ in a header file, or
 work around other problem this bisection is not interested in")
 applied to the revision being tested.
 
-To cope with such a situation, after the inner `git-bisect` finds the
+To cope with such a situation, after the inner 'git-bisect' finds the
 next revision to test, with the "run" script, you can apply that tweak
 before compiling, run the real test, and after the test decides if the
 revision (possibly with the needed tweaks) passed the test, rewind the
index 443039fd9439864fda53ab62251cc00384b53144..34b24a3cad2309486c06e29e0e45c429388d0319 100644 (file)
@@ -21,7 +21,7 @@ last modified the line. Optionally, start annotating from the given revision.
 Also it can limit the range of lines annotated.
 
 This report doesn't tell you anything about lines which have been deleted or
-replaced; you need to use a tool such as `git-diff` or the "pickaxe"
+replaced; you need to use a tool such as 'git-diff' or the "pickaxe"
 interface briefly mentioned in the following paragraph.
 
 Apart from supporting file annotation, git also supports searching the
@@ -49,7 +49,7 @@ include::blame-options.txt[]
        file (see `-M`).  The first number listed is the score.
        This is the number of alphanumeric characters detected
        to be moved between or within files.  This must be above
-       a certain threshold for `git-blame` to consider those lines
+       a certain threshold for 'git-blame' to consider those lines
        of code to have been moved.
 
 -f::
@@ -100,7 +100,7 @@ header elements later.
 SPECIFYING RANGES
 -----------------
 
-Unlike `git-blame` and `git-annotate` in older git, the extent
+Unlike 'git-blame' and 'git-annotate' in older git, the extent
 of annotation can be limited to both line ranges and revision
 ranges.  When you are interested in finding the origin for
 ll. 40-60 for file `foo`, you can use `-L` option like these
@@ -118,7 +118,7 @@ would limit the annotation to the body of `hello` subroutine.
 
 When you are not interested in changes older than the version
 v2.6.18, or changes older than 3 weeks, you can use revision
-range specifiers  similar to `git-rev-list`:
+range specifiers  similar to 'git-rev-list':
 
        git blame v2.6.18.. -- foo
        git blame --since=3.weeks -- foo
index 5e78aed7de640d1ab5ecbfb6f2bd1cb97936732f..b3e62ed011f0a99ce3f173a3f22758edc457f72b 100644 (file)
@@ -37,7 +37,7 @@ working tree to it; use "git checkout <newbranch>" to switch to the
 new branch.
 
 When a local branch is started off a remote branch, git sets up the
-branch so that `git-pull` will appropriately merge from
+branch so that 'git-pull' will appropriately merge from
 the remote branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options.
@@ -54,7 +54,7 @@ has a reflog then the reflog will also be deleted.
 
 Use -r together with -d to delete remote-tracking branches. Note, that it
 only makes sense to delete remote-tracking branches if they no longer exist
-in remote repository or if `git-fetch` was configured not to fetch
+in remote repository or if 'git-fetch' was configured not to fetch
 them again. See also 'prune' subcommand of linkgit:git-remote[1] for way to
 clean up all obsolete remote-tracking branches.
 
@@ -107,14 +107,14 @@ OPTIONS
        Display the full sha1s in output listing rather than abbreviating them.
 
 --track::
-       When creating a new branch, set up configuration so that `git-pull`
+       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
        into the new branch, and if you don't want to use "git pull
        <repository> <refspec>" explicitly. This behavior is the default
        when the start point is a remote branch. Set the
        branch.autosetupmerge configuration variable to `false` if you want
-       `git-checkout` and `git-branch` to always behave as if '--no-track' were
+       'git-checkout' and 'git-branch' to always behave as if '--no-track' were
        given. Set it to `always` if you want this behavior when the
        start-point is either a local or remote branch.
 
index b729db7d28ab6dee1cb05a9bd1bcfb2f90e9bdbd..1b66ab743c64d980a43a028d57ca2f6505d97845 100644 (file)
@@ -21,9 +21,9 @@ Some workflows require that one or more branches of development on one
 machine be replicated on another machine, but the two machines cannot
 be directly connected so the interactive git protocols (git, ssh,
 rsync, http) cannot be used.  This command provides support for
-`git-fetch` and `git-pull` to operate by packaging objects and references
+'git-fetch' and 'git-pull' to operate by packaging objects and references
 in an archive at the originating machine, then importing those into
-another repository using `git-fetch` and `git-pull`
+another repository using 'git-fetch' and 'git-pull'
 after moving the archive by some means (i.e., by sneakernet).  As no
 direct connection between repositories exists, the user must specify a
 basis for the bundle that is held by the destination repository: the
@@ -35,14 +35,14 @@ OPTIONS
 
 create <file>::
        Used to create a bundle named 'file'.  This requires the
-       `git-rev-list` arguments to define the bundle contents.
+       'git-rev-list' arguments to define the bundle contents.
 
 verify <file>::
        Used to check that a bundle file is valid and will apply
        cleanly to the current repository.  This includes checks on the
        bundle format itself as well as checking that the prerequisite
        commits exist and are fully linked in the current repository.
-       `git-bundle` prints a list of missing commits, if any, and exits
+       'git-bundle' prints a list of missing commits, if any, and exits
        with non-zero status.
 
 list-heads <file>::
@@ -51,15 +51,15 @@ list-heads <file>::
        printed out.
 
 unbundle <file>::
-       Passes the objects in the bundle to `git-index-pack`
+       Passes the objects in the bundle to 'git-index-pack'
        for storage in the repository, then prints the names of all
        defined references. If a reflist is given, only references
        matching those in the given list are printed. This command is
-       really plumbing, intended to be called only by `git-fetch`.
+       really plumbing, intended to be called only by 'git-fetch'.
 
 [git-rev-list-args...]::
-       A list of arguments, acceptable to `git-rev-parse` and
-       `git-rev-list`, that specify the specific objects and references
+       A list of arguments, acceptable to 'git-rev-parse' and
+       'git-rev-list', that specify the specific objects and references
        to transport.  For example, "master~10..master" causes the
        current master reference to be packaged along with all objects
        added since its 10th ancestor commit.  There is no explicit
@@ -69,16 +69,16 @@ unbundle <file>::
 
 [refname...]::
        A list of references used to limit the references reported as
-       available. This is principally of use to `git-fetch`, which
+       available. This is principally of use to 'git-fetch', which
        expects to receive only those references asked for and not
-       necessarily everything in the pack (in this case, `git-bundle` is
-       acting like `git-fetch-pack`).
+       necessarily everything in the pack (in this case, 'git-bundle' is
+       acting like 'git-fetch-pack').
 
 SPECIFYING REFERENCES
 ---------------------
 
-`git-bundle` will only package references that are shown by
-`git-show-ref`: this includes heads, tags, and remote heads.  References
+'git-bundle' will only package references that are shown by
+'git-show-ref': this includes heads, tags, and remote heads.  References
 such as master~1 cannot be packaged, but are perfectly suitable for
 defining the basis.  More than one reference may be packaged, and more
 than one basis can be specified.  The objects packaged are those not
index 429083bb6326942ce2027e7e02cd4fbfedbf9d5b..034223cc5ace81dd0b63da44d79db5e83a1d492a 100644 (file)
@@ -47,7 +47,7 @@ refname expressions (see linkgit:git-rev-parse[1]).  Namely:
 . colon `:` is used as in `srcref:dstref` to mean "use srcref\'s
   value and store it in dstref" in fetch and push operations.
   It may also be used to select a specific object such as with
-  `git-cat-file`: "git cat-file blob v1.3.3:refs.c".
+  'git-cat-file': "git cat-file blob v1.3.3:refs.c".
 
 
 GIT
index a833a4dda8a482ea403603f011c361a5b5b3812f..62d84836b8a0d77c2a6ea534566ff8462b0eb37a 100644 (file)
@@ -88,7 +88,7 @@ $ find . -name '*.h' -print0 | xargs -0 git checkout-index -f --
 which will force all existing `*.h` files to be replaced with their
 cached copies. If an empty command line implied "all", then this would
 force-refresh everything in the index, which was not the point.  But
-since `git-checkout-index` accepts --stdin it would be faster to use:
+since 'git-checkout-index' accepts --stdin it would be faster to use:
 
 ----------------
 $ find . -name '*.h' -print0 | git checkout-index -f -z --stdin
@@ -102,7 +102,7 @@ Using `--` is probably a good policy in scripts.
 Using --temp or --stage=all
 ---------------------------
 When `--temp` is used (or implied by `--stage=all`)
-`git-checkout-index` will create a temporary file for each index
+'git-checkout-index' will create a temporary file for each index
 entry being checked out.  The index will not be updated with stat
 information.  These options can be useful if the caller needs all
 stages of all unmerged entries so that the unmerged files can be
@@ -147,9 +147,9 @@ To update and refresh only the files already checked out::
 $ git checkout-index -n -f -a && git update-index --ignore-missing --refresh
 ----------------
 
-Using `git-checkout-index` to "export an entire tree"::
+Using 'git-checkout-index' to "export an entire tree"::
        The prefix ability basically makes it trivial to use
-       `git-checkout-index` as an "export as tree" function.
+       'git-checkout-index' as an "export as tree" function.
        Just read the desired tree into the index, and do:
 +
 ----------------
index c0f9c6e88c24ee3cbfd91d70bb6a1f3d94f0ed4b..2abfbdaadb27ca9a97c23c9c00cc18fb07232d00 100644 (file)
@@ -49,14 +49,14 @@ OPTIONS
 
 -t::
 --track::
-       When creating a new branch, set up configuration so that `git-pull`
+       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
        into the new branch, and if you don't want to use "git pull
        <repository> <refspec>" explicitly. This behavior is the default
        when the start point is a remote branch. Set the
        branch.autosetupmerge configuration variable to `false` if you want
-       `git-checkout` and `git-branch` to always behave as if '--no-track' were
+       'git-checkout' and 'git-branch' to always behave as if '--no-track' were
        given. Set it to `always` if you want this behavior when the
        start-point is either a local or remote branch.
 
index 1b864dacff577c03ba270cd25ed2e1d04aceeff6..a691173ba13370330b97907cf751342cf1c0fe44 100644 (file)
@@ -24,7 +24,7 @@ OPTIONS
 
 -e::
 --edit::
-       With this option, `git-cherry-pick` will let you edit the commit
+       With this option, 'git-cherry-pick' will let you edit the commit
        message prior to committing.
 
 -x::
index 9859bc8f2f28ae0483d1760230aa7bae39c7b95c..d761a73423e606a38f8e390117107a99b9ae3bd3 100644 (file)
@@ -14,7 +14,7 @@ DESCRIPTION
 The changeset (or "diff") of each commit between the fork-point and <head>
 is compared against each commit between the fork-point and <upstream>.
 The commits are compared with their 'patch id', obtained from
-the `git-patch-id` program.
+the 'git-patch-id' program.
 
 Every commit that doesn't exist in the <upstream> branch
 has its id (sha1) reported, prefixed by a symbol.  The ones that have
@@ -37,8 +37,8 @@ to and including <limit> are not reported:
               \__*__*__<limit>__-__+__> <head>
 
 
-Because `git-cherry` compares the changeset rather than the commit id
-(sha1), you can use `git-cherry` to find out if a commit you made locally
+Because 'git-cherry' compares the changeset rather than the commit id
+(sha1), you can use 'git-cherry' to find out if a commit you made locally
 has been applied <upstream> under a different commit id.  For example,
 this will happen if you're feeding patches <upstream> via email rather
 than pushing or pulling commits directly.
index 8e6c7e67cd629dfa13ece84b359079f55af79fc9..670cb02b6cc035e4fbcf1a1016f66b7a85cd4ef7 100644 (file)
@@ -14,9 +14,9 @@ DESCRIPTION
 A Tcl/Tk based graphical interface to review modified files, stage
 them into the index, enter a commit message and record the new
 commit onto the current branch.  This interface is an alternative
-to the less interactive `git-commit` program.
+to the less interactive 'git-commit' program.
 
-`git-citool` is actually a standard alias for `git gui citool`.
+'git-citool' is actually a standard alias for `git gui citool`.
 See linkgit:git-gui[1] for more details.
 
 Author
index 8168bf3bf434cb54fa06240877080ef666687007..7dcc1ba58c3879cb14ce243a4af00bca9e850799 100644 (file)
@@ -27,7 +27,7 @@ OPTIONS
 
 -f::
        If the git configuration specifies clean.requireForce as true,
-       `git-clean` will refuse to run unless given -f or -n.
+       'git-clean' will refuse to run unless given -f or -n.
 
 -n::
 --dry-run::
@@ -41,7 +41,7 @@ OPTIONS
 -x::
        Don't use the ignore rules.  This allows removing all untracked
        files, including build products.  This can be used (possibly in
-       conjunction with `git-reset`) to create a pristine
+       conjunction with 'git-reset') to create a pristine
        working directory to test a clean build.
 
 -X::
index eef95a404a858cc4f4d91d1f40e1079b6d967a41..91efac920ec969455b75f0a5c1761dac648d2b1b 100644 (file)
@@ -68,7 +68,7 @@ it unless you understand what it does. If you clone your
 repository using this option and then delete branches (or use any
 other git command that makes any existing commit unreferenced) in the
 source repository, some objects may become unreferenced (or dangling).
-These objects may be removed by normal git operations (such as `git-commit`)
+These objects may be removed by normal git operations (such as 'git-commit')
 which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
 If these objects are removed and were referenced by the cloned repository,
 then the cloned repository will become corrupt.
@@ -88,7 +88,7 @@ then the cloned repository will become corrupt.
 --quiet::
 -q::
        Operate quietly.  This flag is passed to "rsync" and
-       `git-fetch-pack` commands when given.
+       'git-fetch-pack' commands when given.
 
 --no-checkout::
 -n::
@@ -114,7 +114,7 @@ then the cloned repository will become corrupt.
 --upload-pack <upload-pack>::
 -u <upload-pack>::
        When given, and the repository to clone from is handled
-       by `git-fetch-pack`, `--exec=<upload-pack>` is passed to
+       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.
 
index 9cd8d07c8ad658824285e530f9c8435a01c20ad4..feec58400b64c65c8f96f2d1834016455c89829e 100644 (file)
@@ -70,7 +70,7 @@ is taken from the configuration items user.name and user.email, or, if not
 present, system user name and fully qualified hostname.
 
 A commit comment is read from stdin. If a changelog
-entry is not provided via "<" redirection, `git-commit-tree` will just wait
+entry is not provided via "<" redirection, 'git-commit-tree' will just wait
 for one to be entered and terminated with ^D.
 
 
index 03594cd5dc989ff550426d3f3a066d602f48a856..01bd2d6b77da49b759e1887cf98b8c5b3bf98c38 100644 (file)
@@ -15,16 +15,16 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Use 'git commit' to store the current contents of the index in a new
-commit along with a log message describing the changes you have made.
+Stores the current contents of the index in a new commit along
+with a log message from the user describing the changes.
 
 The content to be added can be specified in several ways:
 
-1. by using `git-add` to incrementally "add" changes to the
+1. by using 'git-add' to incrementally "add" changes to the
    index before using the 'commit' command (Note: even modified
    files must be "added");
 
-2. by using `git-rm` to remove files from the working tree
+2. by using 'git-rm' to remove files from the working tree
    and the index, again before using the 'commit' command;
 
 3. by listing files as arguments to the 'commit' command, in which
@@ -39,15 +39,15 @@ The content to be added can be specified in several ways:
 
 5. by using the --interactive switch with the 'commit' command to decide one
    by one which files should be part of the commit, before finalizing the
-   operation.  Currently, this is done by invoking `git-add --interactive`.
+   operation.  Currently, this is done by invoking 'git-add --interactive'.
 
-The `git-status` command can be used to obtain a
+The 'git-status' command can be used to obtain a
 summary of what is included by any of the above for the next
 commit by giving the same set of parameters you would give to
 this command.
 
 If you make a commit and then find a mistake immediately after
-that, you can recover from it with `git-reset`.
+that, you can recover from it with 'git-reset'.
 
 
 OPTIONS
@@ -155,7 +155,7 @@ but can be used to amend a merge commit.
        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
-       'git commit' if any paths are given on the command line,
+       'git-commit' if any paths are given on the command line,
        in which case this option can be omitted.
        If this option is specified together with '--amend', then
        no paths need be specified, which can be used to amend
@@ -205,10 +205,10 @@ EXAMPLES
 --------
 When recording your own work, the contents of modified files in
 your working tree are temporarily stored to a staging area
-called the "index" with `git-add`.  A file can be
+called the "index" with 'git-add'.  A file can be
 reverted back, only in the index but not in the working tree,
 to that of the last commit with `git reset HEAD -- <file>`,
-which effectively reverts `git-add` and prevents the changes to
+which effectively reverts 'git-add' and prevents the changes to
 this file from participating in the next commit.  After building
 the state to be committed incrementally with these commands,
 `git commit` (without any pathname parameter) is used to record what
@@ -264,13 +264,13 @@ $ git commit
 this second commit would record the changes to `hello.c` and
 `hello.h` as expected.
 
-After a merge (initiated by `git-merge` or `git-pull`) stops
+After a merge (initiated by 'git-merge' or 'git-pull') stops
 because of conflicts, cleanly merged
 paths are already staged to be committed for you, and paths that
 conflicted are left in unmerged state.  You would have to first
-check which paths are conflicting with `git-status`
+check which paths are conflicting with 'git-status'
 and after fixing them manually in your working tree, you would
-stage the result as usual with `git-add`:
+stage the result as usual with 'git-add':
 
 ------------
 $ git status | grep unmerged
index 63ddb2c2f9d868cca1bbf074be986d80042516ba..697824cbabdd4bab487b8c943277d3a1d703e59a 100644 (file)
@@ -37,7 +37,7 @@ you want to handle the lines that do *not* match the regex, just
 prepend a single exclamation mark in front (see also <<EXAMPLES>>).
 
 The type specifier can be either '--int' or '--bool', which will make
-`git-config` ensure that the variable(s) are of the given type and
+'git-config' ensure that the variable(s) are of the given type and
 convert the value to the canonical form (simple decimal number for int,
 a "true" or "false" string for bool).  If no type specifier is passed,
 no checks or transformations are performed on the value.
@@ -122,10 +122,10 @@ See also <<FILES>>.
        List all variables set in config file.
 
 --bool::
-       `git-config` will ensure that the output is "true" or "false"
+       'git-config' will ensure that the output is "true" or "false"
 
 --int::
-       `git-config` will ensure that the output is a simple
+       'git-config' will ensure that the output is a simple
        decimal number.  An optional value suffix of 'k', 'm', or 'g'
        in the config file will cause the value to be multiplied
        by 1024, 1048576, or 1073741824 prior to output.
@@ -162,7 +162,7 @@ FILES
 -----
 
 If not set explicitly with '--file', there are three files where
-`git-config` will search for configuration options:
+'git-config' will search for configuration options:
 
 $GIT_DIR/config::
        Repository specific configuration file. (The filename is
@@ -179,23 +179,18 @@ $(prefix)/etc/gitconfig::
 If no further options are given, all reading options will read all of these
 files that are available. If the global or the system-wide configuration
 file are not available they will be ignored. If the repository configuration
-file is not available or readable, `git-config` will exit with a non-zero
+file is not available or readable, 'git-config' will exit with a non-zero
 error code. However, in neither case will an error message be issued.
 
 All writing options will per default write to the repository specific
 configuration file. Note that this also affects options like '--replace-all'
-and '--unset'. *`git-config` will only ever change one file at a time*.
+and '--unset'. *'git-config' will only ever change one file at a time*.
 
 You can override these rules either by command line options or by environment
 variables. The '--global' and the '--system' options will limit the file used
 to the global or system-wide file respectively. The GIT_CONFIG environment
 variable has a similar effect, but you can specify any filename you want.
 
-The GIT_CONFIG_LOCAL environment variable on the other hand only changes
-the name used instead of the repository configuration file. The global and
-the system-wide configuration files will still be read. (For writing options
-this will obviously result in the same behavior as using GIT_CONFIG.)
-
 
 ENVIRONMENT
 -----------
@@ -205,10 +200,6 @@ GIT_CONFIG::
        Using the "--global" option forces this to ~/.gitconfig. Using the
        "--system" option forces this to $(prefix)/etc/gitconfig.
 
-GIT_CONFIG_LOCAL::
-       Take the configuration from the given file instead if .git/config.
-       Still read the global and the system-wide configuration files, though.
-
 See also <<FILES>>.
 
 
index 2a02ffa7c106b8f1564504a14f52da7df67000ab..2da8588f4fd6edb842a9824181165b3f043ec87b 100644 (file)
@@ -27,7 +27,7 @@ by default.
 
 Supports file additions, removals, and commits that affect binary files.
 
-If the commit is a merge commit, you must tell `git-cvsexportcommit` what
+If the commit is a merge commit, you must tell 'git-cvsexportcommit' what
 parent the changeset should be done against.
 
 OPTIONS
index ed79bb8d5bcae61d59197083a3e264c83992a4df..b7a8c10b8709108c1c8a0d14f661c179c2b4f22c 100644 (file)
@@ -25,12 +25,18 @@ Splitting the CVS log into patch sets is done by 'cvsps'.
 At least version 2.1 is required.
 
 You should *never* do any work of your own on the branches that are
-created by `git-cvsimport`.  By default initial import will create and populate a
+created by 'git-cvsimport'.  By default initial import will create and populate a
 "master" branch from the CVS repository's main branch which you're free
-to work with; after that, you need to `git-merge` incremental imports, or
+to work with; after that, you need to 'git-merge' incremental imports, or
 any CVS branches, yourself.  It is advisable to specify a named remote via
 -r to separate and protect the incoming branches.
 
+If you intend to set up a shared public repository that all developers can
+read/write, or if you want to use linkgit:git-cvsserver[1], then you
+probably want to make a bare clone of the imported repository,
+and use the clone as the shared repository.
+See linkgit:gitcvs-migration[7].
+
 
 OPTIONS
 -------
@@ -40,13 +46,13 @@ OPTIONS
 -d <CVSROOT>::
        The root of the CVS archive. May be local (a simple path) or remote;
        currently, only the :local:, :ext: and :pserver: access methods
-       are supported. If not given, `git-cvsimport` will try to read it
+       are supported. If not given, 'git-cvsimport' will try to read it
        from `CVS/Root`. If no such file exists, it checks for the
        `CVSROOT` environment variable.
 
 <CVS_module>::
        The CVS module you want to import. Relative to <CVSROOT>.
-       If not given, `git-cvsimport` tries to read it from
+       If not given, 'git-cvsimport' tries to read it from
        `CVS/Repository`.
 
 -C <target-dir>::
@@ -56,14 +62,14 @@ OPTIONS
 -r <remote>::
        The git remote to import this CVS repository into.
        Moves all CVS branches into remotes/<remote>/<branch>
-       akin to the `git-clone` "--use-separate-remote" option.
+       akin to the 'git-clone' "--use-separate-remote" option.
 
 -o <branch-for-HEAD>::
        When no remote is specified (via -r) the 'HEAD' branch
        from CVS is imported to the 'origin' branch within the git
        repository, as 'HEAD' already has a special meaning for git.
        When a remote is specified the 'HEAD' branch is named
-       remotes/<remote>/master mirroring `git-clone` behaviour.
+       remotes/<remote>/master mirroring 'git-clone' behaviour.
        Use this option if you want to import into a different
        branch.
 +
@@ -136,17 +142,17 @@ This option can be used several times to provide several detection regexes.
 
 ---------
 +
-`git-cvsimport` will make it appear as those authors had
+'git-cvsimport' will make it appear as those authors had
 their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
 all along.
 +
 For convenience, this data is saved to `$GIT_DIR/cvs-authors`
 each time the '-A' option is provided and read from that same
-file each time `git-cvsimport` is run.
+file each time 'git-cvsimport' is run.
 +
 It is not recommended to use this feature if you intend to
 export changes back to CVS again later with
-`git-cvsexportcommit`.
+'git-cvsexportcommit'.
 
 -h::
        Print a short usage message and exit.
index e0e35dbbb73f1d947992da879282fc066f6e6427..c2d3c90d27084e7de7e0f7c37b40f130f6960244 100644 (file)
@@ -77,7 +77,7 @@ over pserver for anonymous CVS access.
 
 CVS clients cannot tag, branch or perform GIT merges.
 
-`git-cvsserver` maps GIT branches to CVS modules. This is very different
+'git-cvsserver' maps GIT branches to CVS modules. This is very different
 from what most CVS users would expect since in CVS modules usually represent
 one or more directories.
 
@@ -103,7 +103,7 @@ looks like
 ------
 No special setup is needed for SSH access, other than having GIT tools
 in the PATH. If you have clients that do not accept the CVS_SERVER
-environment variable, you can rename `git-cvsserver` to `cvs`.
+environment variable, you can rename 'git-cvsserver' to `cvs`.
 
 Note: Newer CVS versions (>= 1.12.11) also support specifying
 CVS_SERVER directly in CVSROOT like
@@ -113,9 +113,9 @@ cvs -d ":ext;CVS_SERVER=git-cvsserver:user@server/path/repo.git" co <HEAD_name>
 ------
 This has the advantage that it will be saved in your 'CVS/Root' files and
 you don't need to worry about always setting the correct environment
-variable.  SSH users restricted to `git-shell` don't need to override the default
-with CVS_SERVER (and shouldn't) as `git-shell` understands `cvs` to mean
-`git-cvsserver` and pretends that the other end runs the real `cvs` better.
+variable.  SSH users restricted to 'git-shell' don't need to override the default
+with CVS_SERVER (and shouldn't) as 'git-shell' understands `cvs` to mean
+'git-cvsserver' and pretends that the other end runs the real 'cvs' better.
 --
 2. For each repo that you want accessible from CVS you need to edit config in
    the repo and add the following section.
@@ -128,11 +128,14 @@ with CVS_SERVER (and shouldn't) as `git-shell` understands `cvs` to mean
         logfile=/path/to/logfile
 
 ------
-Note: you need to ensure each user that is going to invoke `git-cvsserver` has
+Note: you need to ensure each user that is going to invoke 'git-cvsserver' has
 write access to the log file and to the database (see
 <<dbbackend,Database Backend>>. If you want to offer write access over
 SSH, the users of course also need write access to the git repository itself.
 
+You also need to ensure that each repository is "bare" (without a git index
+file) for `cvs commit` to work. See linkgit:gitcvs-migration[7].
+
 [[configaccessmethod]]
 All configuration variables can also be overridden for a specific method of
 access. Valid method names are "ext" (for SSH access) and "pserver". The
@@ -150,7 +153,7 @@ allowing access over SSH.
    automatically saving it in your 'CVS/Root' files, then you need to set them
    explicitly in your environment.  CVSROOT should be set as per normal, but the
    directory should point at the appropriate git repo.  As above, for SSH clients
-   _not_ restricted to `git-shell`, CVS_SERVER should be set to `git-cvsserver`.
+   _not_ restricted to 'git-shell', CVS_SERVER should be set to 'git-cvsserver'.
 +
 --
 ------
@@ -178,27 +181,27 @@ allowing access over SSH.
 Database Backend
 ----------------
 
-`git-cvsserver` uses one database per git head (i.e. CVS module) to
+'git-cvsserver' uses one database per git head (i.e. CVS module) to
 store information about the repository for faster access. The
 database doesn't contain any persistent data and can be completely
 regenerated from the git repository at any time. The database
 needs to be updated (i.e. written to) after every commit.
 
 If the commit is done directly by using `git` (as opposed to
-using `git-cvsserver`) the update will need to happen on the
-next repository access by `git-cvsserver`, independent of
+using 'git-cvsserver') the update will need to happen on the
+next repository access by 'git-cvsserver', independent of
 access method and requested operation.
 
 That means that even if you offer only read access (e.g. by using
-the pserver method), `git-cvsserver` should have write access to
+the pserver method), 'git-cvsserver' should have write access to
 the database to work reliably (otherwise you need to make sure
-that the database is up-to-date any time `git-cvsserver` is executed).
+that the database is up-to-date any time 'git-cvsserver' is executed).
 
 By default it uses SQLite databases in the git directory, named
 `gitcvs.<module_name>.sqlite`. Note that the SQLite backend creates
 temporary files in the same directory as the database file on
 write so it might not be enough to grant the users using
-`git-cvsserver` write access to the database file without granting
+'git-cvsserver' write access to the database file without granting
 them write access to the directory, too.
 
 You can configure the database backend with the following
@@ -207,7 +210,7 @@ configuration variables:
 Configuring database backend
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-`git-cvsserver` uses the Perl DBI module. Please also read
+'git-cvsserver' uses the Perl DBI module. Please also read
 its documentation if changing these variables, especially
 about `DBI->connect()`.
 
@@ -259,7 +262,7 @@ In `dbdriver` and `dbuser` you can use the following variables:
 %a::
        access method (one of "ext" or "pserver")
 %u::
-       Name of the user running `git-cvsserver`.
+       Name of the user running 'git-cvsserver'.
        If no name can be determined, the
        numeric uid is used.
 
@@ -280,13 +283,13 @@ To get a checkout with the Eclipse CVS client:
 Protocol notes: If you are using anonymous access via pserver, just select that.
 Those using SSH access should choose the 'ext' protocol, and configure 'ext'
 access on the Preferences->Team->CVS->ExtConnection pane. Set CVS_SERVER to
-`git-cvsserver`. Note that password support is not good when using 'ext',
+'git-cvsserver'. Note that password support is not good when using 'ext',
 you will definitely want to have SSH keys setup.
 
 Alternatively, you can just use the non-standard extssh protocol that Eclipse
 offer. In that case CVS_SERVER is ignored, and you will have to replace
-the cvs utility on the server with `git-cvsserver` or manipulate your `.bashrc`
-so that calling 'cvs' effectively calls `git-cvsserver`.
+the cvs utility on the server with 'git-cvsserver' or manipulate your `.bashrc`
+so that calling 'cvs' effectively calls 'git-cvsserver'.
 
 Clients known to work
 ---------------------
@@ -328,13 +331,13 @@ is left blank. But if `gitcvs.allbinary` is set to "guess", then
 the correct '-k' mode will be guessed based on the contents of
 the file.
 
-For best consistency with `cvs`, it is probably best to override the
+For best consistency with 'cvs', it is probably best to override the
 defaults by setting `gitcvs.usecrlfattr` to true,
 and `gitcvs.allbinary` to "guess".
 
 Dependencies
 ------------
-`git-cvsserver` depends on DBD::SQLite.
+'git-cvsserver' depends on DBD::SQLite.
 
 Copyright and Authors
 ---------------------
index 3cf2d3b3d42da0247c0cf39846e0f56345ff10f1..4ba4b75c1126d87c48935e7697e05f0d5210ad2d 100644 (file)
@@ -27,36 +27,36 @@ that service if it is enabled.
 It verifies that the directory has the magic file "git-daemon-export-ok", and
 it will refuse to export any git directory that hasn't explicitly been marked
 for export this way (unless the '--export-all' parameter is specified). If you
-pass some directory paths as `git-daemon` arguments, you can further restrict
+pass some directory paths as 'git-daemon' arguments, you can further restrict
 the offers to a whitelist comprising of those.
 
 By default, only `upload-pack` service is enabled, which serves
-`git-fetch-pack` and `git-ls-remote` clients, which are invoked
-from `git-fetch`, `git-pull`, and `git-clone`.
+'git-fetch-pack' and 'git-ls-remote' clients, which are invoked
+from 'git-fetch', 'git-pull', and 'git-clone'.
 
 This is ideally suited for read-only updates, i.e., pulling from
 git repositories.
 
-An `upload-archive` also exists to serve `git-archive`.
+An `upload-archive` also exists to serve 'git-archive'.
 
 OPTIONS
 -------
 --strict-paths::
        Match paths exactly (i.e. don't allow "/foo/repo" when the real path is
        "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths.
-       `git-daemon` will refuse to start when this option is enabled and no
+       'git-daemon' will refuse to start when this option is enabled and no
        whitelist is specified.
 
 --base-path::
        Remap all the path requests as relative to the given path.
-       This is sort of "GIT root" - if you run `git-daemon` with
+       This is sort of "GIT root" - if you run 'git-daemon' with
        '--base-path=/srv/git' on example.com, then if you later try to pull
-       'git://example.com/hello.git', `git-daemon` will interpret the path
+       'git://example.com/hello.git', 'git-daemon' will interpret the path
        as '/srv/git/hello.git'.
 
 --base-path-relaxed::
        If --base-path is enabled and repo lookup fails, with this option
-       `git-daemon` will attempt to lookup without prefixing the base path.
+       'git-daemon' will attempt to lookup without prefixing the base path.
        This is useful for switching to --base-path usage, while still
        allowing the old paths.
 
@@ -138,7 +138,7 @@ OPTIONS
 +
 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.
+'git-daemon' if needed.
 
 --enable=service::
 --disable=service::
@@ -164,24 +164,24 @@ SERVICES
 
 These services can be globally enabled/disabled using the
 command line options of this command.  If a finer-grained
-control is desired (e.g. to allow `git-archive` to be run
+control is desired (e.g. to allow 'git-archive' to be run
 against only in a few selected repositories the daemon serves),
 the per-repository configuration file can be used to enable or
 disable them.
 
 upload-pack::
-       This serves `git-fetch-pack` and `git-ls-remote`
+       This serves 'git-fetch-pack' and 'git-ls-remote'
        clients.  It is enabled by default, but a repository can
        disable it by setting `daemon.uploadpack` configuration
        item to `false`.
 
 upload-archive::
-       This serves `git-archive --remote`.  It is disabled by
+       This serves 'git-archive --remote'.  It is disabled by
        default, but a repository can enable it by setting
        `daemon.uploadarch` configuration item to `true`.
 
 receive-pack::
-       This serves `git-send-pack` clients, allowing anonymous
+       This serves 'git-send-pack' clients, allowing anonymous
        push.  It is disabled by default, as there is _no_
        authentication in the protocol (in other words, anybody
        can push anything into the repository, including removal
@@ -199,8 +199,8 @@ $ grep 9418 /etc/services
 git            9418/tcp                # Git Version Control System
 ------------
 
-`git-daemon` as inetd server::
-       To set up `git-daemon` as an inetd service that handles any
+'git-daemon' as inetd server::
+       To set up 'git-daemon' as an inetd service that handles any
        repository under the whitelisted set of directories, /pub/foo
        and /pub/bar, place an entry like the following into
        /etc/inetd all on one line:
@@ -212,8 +212,8 @@ git         9418/tcp                # Git Version Control System
 ------------------------------------------------
 
 
-`git-daemon` as inetd server for virtual hosts::
-       To set up `git-daemon` as an inetd service that handles
+'git-daemon' as inetd server for virtual hosts::
+       To set up 'git-daemon' as an inetd service that handles
        repositories for different virtual hosts, `www.example.com`
        and `www.example.org`, place an entry like the following into
        `/etc/inetd` all on one line:
@@ -235,8 +235,8 @@ clients, a symlink from `/software` into the appropriate
 default repository could be made as well.
 
 
-`git-daemon` as regular daemon for virtual hosts::
-       To set up `git-daemon` as a regular, non-inetd service that
+'git-daemon' as regular daemon for virtual hosts::
+       To set up 'git-daemon' as a regular, non-inetd service that
        handles repositories for multiple virtual hosts based on
        their IP addresses, start the daemon like this:
 +
@@ -253,7 +253,7 @@ Repositories can still be accessed by hostname though, assuming
 they correspond to these IP addresses.
 
 selectively enable/disable services per repository::
-       To enable `git-archive --remote` and disable `git-fetch` against
+       To enable 'git-archive --remote' and disable 'git-fetch' against
        a repository, have the following in the configuration file in the
        repository (that is the file 'config' next to 'HEAD', 'refs' and
        'objects').
index 51a0cc044f04cd210d4ced7fb34946bf23896f81..44b166888a00567d12f287416a6fa50135b36cfb 100644 (file)
@@ -92,7 +92,7 @@ of commits which would be displayed by "git log v1.0.4..parent".
 The hash suffix is "-g" + 7-char abbreviation for the tip commit
 of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).
 
-Doing a `git-describe` on a tag-name will just show the tag name:
+Doing a 'git-describe' on a tag-name will just show the tag name:
 
        [torvalds@g5 git]$ git describe v1.0.4
        v1.0.4
@@ -115,13 +115,13 @@ closest tagname without any suffix:
 SEARCH STRATEGY
 ---------------
 
-For each committish supplied, `git-describe` will first look for
+For each committish supplied, 'git-describe' will first look for
 a tag which tags exactly that commit.  Annotated tags will always
 be preferred over lightweight tags, and tags with newer dates will
 always be preferred over tags with older dates.  If an exact match
 is found, its name will be output and searching will stop.
 
-If an exact match was not found, `git-describe` will walk back
+If an exact match was not found, 'git-describe' will walk back
 through the commit history to locate an ancestor commit which
 has been tagged.  The ancestor's tag will be output along with an
 abbreviation of the input committish's SHA1.
index 6c65757eae76eef1454cabeada90f7c22e36b139..5c8c1d95a89b15e936816f486a8114cbc6788fb9 100644 (file)
@@ -15,7 +15,7 @@ DESCRIPTION
 Compares the files in the working tree and the index.  When paths
 are specified, compares only those named paths.  Otherwise all
 entries in the index are compared.  The output format is the
-same as for `git-diff-index` and `git-diff-tree`.
+same as for 'git-diff-index' and 'git-diff-tree'.
 
 OPTIONS
 -------
index 784bbf3b0db68238dc316f5f2ebd0fe3dcd63b3e..26920d4f63cd213ff17ab28d8dd0dbea94482147 100644 (file)
@@ -31,7 +31,7 @@ include::diff-options.txt[]
 -m::
        By default, files recorded in the index but not checked
        out are reported as deleted.  This flag makes
-       `git-diff-index` say that all non-checked-out files are up
+       'git-diff-index' say that all non-checked-out files are up
        to date.
 
 Output format
@@ -50,7 +50,7 @@ Cached Mode
 If '--cached' is specified, it allows you to ask:
 
        show me the differences between HEAD and the current index
-       contents (the ones I'd write using `git-write-tree`)
+       contents (the ones I'd write using 'git-write-tree')
 
 For example, let's say that you have worked on your working directory, updated
 some files in the index and are ready to commit. You want to see exactly
@@ -62,7 +62,7 @@ object and compare it that way, and to do that, you just do
 Example: let's say I had renamed `commit.c` to `git-commit.c`, and I had
 done an `update-index` to make that effective in the index file.
 `git diff-files` wouldn't show anything at all, since the index file
-matches my working directory. But doing a `git-diff-index` does:
+matches my working directory. But doing a 'git-diff-index' does:
 
   torvalds@ppc970:~/git> git diff-index --cached HEAD
   -100644 blob    4161aecc6700a2eb579e842af0b7f22b98443f74        commit.c
@@ -71,10 +71,10 @@ matches my working directory. But doing a `git-diff-index` does:
 You can see easily that the above is a rename.
 
 In fact, `git diff-index --cached` *should* always be entirely equivalent to
-actually doing a `git-write-tree` and comparing that. Except this one is much
+actually doing a 'git-write-tree' and comparing that. Except this one is much
 nicer for the case where you just want to check where you are.
 
-So doing a `git-diff-index --cached` is basically very useful when you are
+So doing a 'git-diff-index --cached' is basically very useful when you are
 asking yourself "what have I already marked for being committed, and
 what's the difference to a previous tree".
 
@@ -82,20 +82,20 @@ Non-cached Mode
 ---------------
 The "non-cached" mode takes a different approach, and is potentially
 the more useful of the two in that what it does can't be emulated with
-a `git-write-tree` + `git-diff-tree`. Thus that's the default mode.
+a 'git-write-tree' + 'git-diff-tree'. Thus that's the default mode.
 The non-cached version asks the question:
 
   show me the differences between HEAD and the currently checked out
   tree - index contents _and_ files that aren't up-to-date
 
 which is obviously a very useful question too, since that tells you what
-you *could* commit. Again, the output matches the `git-diff-tree -r`
+you *could* commit. Again, the output matches the 'git-diff-tree -r'
 output to a tee, but with a twist.
 
 The twist is that if some file doesn't match the index, we don't have
 a backing store thing for it, and we use the magic "all-zero" sha1 to
 show that. So let's say that you have edited `kernel/sched.c`, but
-have not actually done a `git-update-index` on it yet - there is no
+have not actually done a 'git-update-index' on it yet - there is no
 "object" associated with the new state, and you get:
 
   torvalds@ppc970:~/v2.6/linux> git diff-index HEAD
@@ -106,11 +106,11 @@ not up-to-date and may contain new stuff. The all-zero sha1 means that to
 get the real diff, you need to look at the object in the working directory
 directly rather than do an object-to-object diff.
 
-NOTE: As with other commands of this type, `git-diff-index` does not
+NOTE: As with other commands of this type, 'git-diff-index' does not
 actually look at the contents of the file at all. So maybe
 `kernel/sched.c` hasn't actually changed, and it's just that you
 touched it. In either case, it's a note that you need to
-`git-update-index` it to make the index be in sync.
+'git-update-index' it to make the index be in sync.
 
 NOTE: You can have a mixture of files show up as "has been updated"
 and "is still dirty in the working directory" together. You can always
index 68feb081721a139f478f13aa7b533121432b18bd..0e45b58d8332cc9f48e0e18165f536adb94a5c6f 100644 (file)
@@ -20,7 +20,7 @@ Compares the content and mode of the blobs found via two tree objects.
 If there is only one <tree-ish> given, the commit is compared with its parents
 (see --stdin below).
 
-Note that `git-diff-tree` can use the tree encapsulated in a commit object.
+Note that 'git-diff-tree' can use the tree encapsulated in a commit object.
 
 OPTIONS
 -------
@@ -58,25 +58,25 @@ behavior.  This does not apply to the case where two <tree-ish>
 separated with a single space are given.
 
 -m::
-       By default, `git-diff-tree --stdin` does not show
+       By default, 'git-diff-tree --stdin' does not show
        differences for merge commits.  With this flag, it shows
        differences to that commit from all of its parents. See
        also '-c'.
 
 -s::
-       By default, `git-diff-tree --stdin` shows differences,
+       By default, 'git-diff-tree --stdin' shows differences,
        either in machine-readable form (without '-p') or in patch
        form (with '-p').  This output can be suppressed.  It is
        only useful with '-v' flag.
 
 -v::
-       This flag causes `git-diff-tree --stdin` to also show
+       This flag causes 'git-diff-tree --stdin' to also show
        the commit message before the differences.
 
 include::pretty-options.txt[]
 
 --no-commit-id::
-       `git-diff-tree` outputs a line with the commit ID when
+       'git-diff-tree' outputs a line with the commit ID when
        applicable.  This flag suppressed the commit ID output.
 
 -c::
index dbc2b190ed01f27ff057346746beb096a557b8cb..4956964d857fd27d27fbff54de724623b79286db 100644 (file)
@@ -13,18 +13,18 @@ SYNOPSIS
 DESCRIPTION
 -----------
 This program dumps the given revisions in a form suitable to be piped
-into `git-fast-import`.
+into 'git-fast-import'.
 
 You can use it as a human readable bundle replacement (see
 linkgit:git-bundle[1]), or as a kind of an interactive
-`git-filter-branch`.
+'git-filter-branch'.
 
 
 OPTIONS
 -------
 --progress=<n>::
        Insert 'progress' statements every <n> objects, to be shown by
-       `git-fast-import` during import.
+       'git-fast-import' during import.
 
 --signed-tags=(verbatim|warn|strip|abort)::
        Specify how to handle signed tags.  Since any transformation
@@ -85,7 +85,7 @@ referenced by that revision range contains the string
 Limitations
 -----------
 
-Since `git-fast-import` cannot tag trees, you will not be
+Since 'git-fast-import' cannot tag trees, you will not be
 able to export the linux-2.6.git repository completely, as it contains
 a tag referencing a tree instead of a commit.
 
index 70cc8e831f3bee9ba785da318f971bc07d2037ea..2d01d0d1000d1ed3a65a5448029e1b9f6bbe6a39 100644 (file)
@@ -15,7 +15,7 @@ DESCRIPTION
 This program is usually not what the end user wants to run directly.
 Most end users want to use one of the existing frontend programs,
 which parses a specific type of foreign source and feeds the contents
-stored there to `git-fast-import`.
+stored there to 'git-fast-import'.
 
 fast-import reads a mixed command/data stream from standard input and
 writes one or more packfiles directly into the current repository.
@@ -24,7 +24,7 @@ updated branch and tag refs, fully updating the current repository
 with the newly imported data.
 
 The fast-import backend itself can import into an empty repository (one that
-has already been initialized by `git-init`) or incrementally
+has already been initialized by 'git-init') or incrementally
 update an existing populated repository.  Whether or not incremental
 imports are supported from a particular foreign source depends on
 the frontend program in use.
@@ -82,11 +82,11 @@ OPTIONS
        This information may be useful after importing projects
        whose total object set exceeds the 4 GiB packfile limit,
        as these commits can be used as edge points during calls
-       to `git-pack-objects`.
+       to 'git-pack-objects'.
 
 --quiet::
        Disable all non-fatal output, making fast-import silent when it
-       is successful.  This option disables the output shown by
+       is successful.  This option disables the output shown by
        \--stats.
 
 --stats::
@@ -124,9 +124,9 @@ an ideal situation, given that most conversion tools are throw-away
 
 Parallel Operation
 ------------------
-Like `git-push` or `git-fetch`, imports handled by fast-import are safe to
+Like 'git-push' or 'git-fetch', imports handled by fast-import are safe to
 run alongside parallel `git repack -a -d` or `git gc` invocations,
-or any other Git operation (including `git-prune`, as loose objects
+or any other Git operation (including 'git-prune', as loose objects
 are never used by fast-import).
 
 fast-import does not lock the branch or tag refs it is actively importing.
@@ -220,7 +220,7 @@ variation in formatting will cause fast-import to reject the value.
 +
 An example value is ``Tue Feb 6 11:22:18 2007 -0500''.  The Git
 parser is accurate, but a little on the lenient side.  It is the
-same parser used by `git-am` when applying patches
+same parser used by 'git-am' when applying patches
 received from email.
 +
 Some malformed strings may be accepted as valid dates.  In some of
@@ -256,7 +256,7 @@ timezone.
 This particular format is supplied as its short to implement and
 may be useful to a process that wants to create a new commit
 right now, without needing to use a working directory or
-`git-update-index`.
+'git-update-index'.
 +
 If separate `author` and `committer` commands are used in a `commit`
 the timestamps may not match, as the system clock will be polled
@@ -654,7 +654,7 @@ recommended, as the frontend does not (easily) have access to the
 complete set of bytes which normally goes into such a signature.
 If signing is required, create lightweight tags from within fast-import with
 `reset`, then create the annotated versions of those tags offline
-with the standard `git-tag` process.
+with the standard 'git-tag' process.
 
 `reset`
 ~~~~~~~
@@ -955,7 +955,7 @@ is not `refs/heads/TAG_FIXUP`).
 
 When committing fixups, consider using `merge` to connect the
 commit(s) which are supplying file revisions to the fixup branch.
-Doing so will allow tools such as `git-blame` to track
+Doing so will allow tools such as 'git-blame' to track
 through the real commit history and properly annotate the source
 files.
 
@@ -984,7 +984,7 @@ Repacking Historical Data
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 If you are repacking very old imported data (e.g. older than the
 last year), consider expending some extra CPU time and supplying
-\--window=50 (or higher) when you run `git-repack`.
+\--window=50 (or higher) when you run 'git-repack'.
 This will take longer, but will also produce a smaller packfile.
 You only need to expend the effort once, and everyone using your
 project will benefit from the smaller repository.
index a069f8d9a9a9033e4c7796125e44fad6c1820704..47448da22eeebf51fe5829717df2dc7129a9b17e 100644 (file)
@@ -12,14 +12,14 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Usually you would want to use `git-fetch`, which is a
+Usually you would want to use 'git-fetch', which is a
 higher level wrapper of this command, instead.
 
-Invokes `git-upload-pack` on a possibly remote repository
+Invokes 'git-upload-pack' on a possibly remote repository
 and asks it to send objects missing from this repository, to
 update the named heads.  The list of commits available locally
 is found out by scanning local $GIT_DIR/refs/ and sent to
-`git-upload-pack` running on the other end.
+'git-upload-pack' running on the other end.
 
 This command degenerates to download everything to complete the
 asked refs from the remote side when the local side does not
@@ -33,12 +33,12 @@ OPTIONS
 
 -q::
 --quiet::
-       Pass '-q' flag to `git-unpack-objects`; this makes the
+       Pass '-q' flag to 'git-unpack-objects'; this makes the
        cloning process less verbose.
 
 -k::
 --keep::
-       Do not invoke `git-unpack-objects` on received data, but
+       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.
@@ -54,7 +54,7 @@ OPTIONS
        otherwise determine the tags this option made available.
 
 --upload-pack=<git-upload-pack>::
-       Use this to specify the path to `git-upload-pack` on the
+       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
        setup scripts for login shells (e.g. .bash_profile) and
@@ -79,7 +79,7 @@ OPTIONS
 
 <host>::
        A remote host that houses the repository.  When this
-       part is specified, `git-upload-pack` is invoked via
+       part is specified, 'git-upload-pack' is invoked via
        ssh.
 
 <directory>::
index b2255664141b904c81ed5be6b48292baea342da0..9e048a8a280f896c0da2396b07eeeddd211f0b75 100644 (file)
@@ -18,7 +18,7 @@ the objects necessary to complete them.
 
 The ref names and their object names of fetched refs are stored
 in `.git/FETCH_HEAD`.  This information is left for a later merge
-operation done by `git-merge`.
+operation done by 'git-merge'.
 
 When <refspec> stores the fetched result in tracking branches,
 the tags that point at these branches are automatically
index a9388e0e27c11ff9a0efa13cc7485ed17077b56a..a3edc0024600e34d956b8e8d76dd8a6a8bd6c8bd 100644 (file)
@@ -108,7 +108,7 @@ OPTIONS
 --commit-filter <command>::
        This is the filter for performing the commit.
        If this filter is specified, it will be called instead of the
-       `git-commit-tree` command, with arguments of the form
+       'git-commit-tree' command, with arguments of the form
        "<TREE_ID> [-p <PARENT_COMMIT_ID>]..." and the log message on
        stdin.  The commit id is expected on stdout.
 +
@@ -119,7 +119,7 @@ have all of them as parents.
 You can use the 'map' convenience function in this filter, and other
 convenience functions, too.  For example, calling 'skip_commit "$@"'
 will leave out the current commit (but not its changes! If you want
-that, use `git-rebase` instead).
+that, use 'git-rebase' instead).
 
 --tag-name-filter <command>::
        This is the filter for rewriting tag names. When passed,
@@ -163,13 +163,13 @@ to other tags will be rewritten to point to the underlying commit.
 
 -f::
 --force::
-       `git filter-branch` refuses to start with an existing temporary
+       'git-filter-branch' refuses to start with an existing temporary
        directory or when there are already refs starting with
        'refs/original/', unless forced.
 
 <rev-list-options>::
        When options are given after the new branch name, they will
-       be passed to `git-rev-list`.  Only commits in the resulting
+       be passed to 'git-rev-list'.  Only commits in the resulting
        output will be filtered, although the filtered commits can still
        reference parents which are outside of that set.
 
@@ -255,7 +255,7 @@ and all children of the merge will become merge commits with P1,P2
 as their parents instead of the merge commit.
 
 You can rewrite the commit log messages using `--msg-filter`.  For
-example, `git-svn-id` strings in a repository created by `git-svn` can
+example, 'git-svn-id' strings in a repository created by 'git-svn' can
 be removed this way:
 
 -------------------------------------------------------
@@ -266,13 +266,13 @@ git filter-branch --msg-filter '
 
 To restrict rewriting to only part of the history, specify a revision
 range in addition to the new branch name.  The new branch name will
-point to the top-most revision that a `git-rev-list` of this range
+point to the top-most revision that a 'git-rev-list' of this range
 will print.
 
 *NOTE* the changes introduced by the commits, and which are not reverted
 by subsequent commits, will still be in the rewritten branch. If you want
 to throw out _changes_ together with the commits, you should use the
-interactive mode of `git-rebase`.
+interactive mode of 'git-rebase'.
 
 
 Consider this history:
index ddb89f8d60f112e507195b83e83048d727006611..885edf005a8442dba6f509751f67f8c0e1939a08 100644 (file)
@@ -16,10 +16,10 @@ DESCRIPTION
 -----------
 Takes the list of merged objects on stdin and produces a suitable
 commit message to be used for the merge commit, usually to be
-passed as the '<merge-message>' argument of `git-merge`.
+passed as the '<merge-message>' argument of 'git-merge'.
 
 This script is intended mostly for internal use by scripts
-automatically invoking `git-merge`.
+automatically invoking 'git-merge'.
 
 OPTIONS
 -------
index 29c29f88302b5680f639d8ed007c2a2e4b08fdf9..727d84e6735417baa82fe7abff5b6945f6d6cef4 100644 (file)
@@ -79,7 +79,7 @@ objecttype::
        The type of the object (`blob`, `tree`, `commit`, `tag`).
 
 objectsize::
-       The size of the object (the same as `git-cat-file -s` reports).
+       The size of the object (the same as 'git-cat-file -s' reports).
 
 objectname::
        The object name (aka SHA-1).
index 894b82d6be29cee3309e9ae3472ab97218922f54..7c2ff3eb2d496a23bb5d2536c16097697ef8e236 100644 (file)
@@ -27,7 +27,7 @@ DESCRIPTION
 Prepare each commit with its patch in
 one file per commit, formatted to resemble UNIX mailbox format.
 The output of this command is convenient for e-mail submission or
-for use with `git-am`.
+for use with 'git-am'.
 
 There are two ways to specify which commits to operate on.
 
@@ -61,7 +61,7 @@ they are created in the current working directory.
 If -n is specified, instead of "[PATCH] Subject", the first line
 is formatted as "[PATCH n/m] Subject".
 
-If given --thread, `git-format-patch` will generate In-Reply-To and
+If given --thread, 'git-format-patch' will generate In-Reply-To and
 References headers to make the second and subsequent patch mails appear
 as replies to the first mail; this also generates a Message-Id header to
 reference.
@@ -175,10 +175,10 @@ and file suffix, and number patches when outputting more than one.
 
 ------------
 [format]
-        headers = "Organization: git-foo\n"
-        subjectprefix = CHANGE
-        suffix = .txt
-        numbered = auto
+       headers = "Organization: git-foo\n"
+       subjectprefix = CHANGE
+       suffix = .txt
+       numbered = auto
        cc = <email>
 ------------
 
@@ -187,10 +187,10 @@ EXAMPLES
 --------
 
 * Extract commits between revisions R1 and R2, and apply them on top of
-the current branch using `git-am` to cherry-pick them:
+the current branch using 'git-am' to cherry-pick them:
 +
 ------------
-$ git format-patch -k --stdout R1..R2 | git-am -3 -k
+$ git format-patch -k --stdout R1..R2 | git am -3 -k
 ------------
 
 * Extract all commits which are in the current branch but not in the
@@ -206,7 +206,7 @@ For each commit a separate file is created in the current directory.
 project:
 +
 ------------
-$ git format-patch \--root origin
+$ git format-patch --root origin
 ------------
 
 * The same as the previous one:
index ef4ceb3dfdabebbd99d8f238326950701e568e51..d5a76472196a5e67bc6e62411d90377ec3b46e3a 100644 (file)
@@ -21,7 +21,7 @@ OPTIONS
 <object>::
        An object to treat as the head of an unreachability trace.
 +
-If no objects are given, `git-fsck` defaults to using the
+If no objects are given, 'git-fsck' defaults to using the
 index file, all SHA1 references in .git/refs/*, and all reflogs (unless
 --no-reflogs is given) as heads.
 
@@ -83,11 +83,11 @@ So for example
 
 will do quite a _lot_ of verification on the tree. There are a few
 extra validity tests to be added (make sure that tree objects are
-sorted properly etc), but on the whole if `git-fsck` is happy, you
+sorted properly etc), but on the whole if 'git-fsck' is happy, you
 do have a valid tree.
 
 Any corrupt objects you will have to find in backups or other archives
-(i.e., you can just remove them and do an `rsync` with some other site in
+(i.e., you can just remove them and do an 'rsync' with some other site in
 the hopes that somebody else has the object you have corrupted).
 
 Of course, "valid tree" doesn't mean that it wasn't generated by some
index 0cce3894cbef894db7af01ce9d62bd558cae7b3e..7086eea74a38b036130f61db362bae209a065e47 100644 (file)
@@ -15,13 +15,13 @@ DESCRIPTION
 Runs a number of housekeeping tasks within the current repository,
 such as compressing file revisions (to reduce disk space and increase
 performance) and removing unreachable objects which may have been
-created from prior invocations of `git-add`.
+created from prior invocations of 'git-add'.
 
 Users are encouraged to run this task on a regular basis within
 each repository to maintain good disk space utilization and good
 operating performance.
 
-Some git commands may automatically run `git-gc`; see the `--auto` flag
+Some git commands may automatically run 'git-gc'; see the `--auto` flag
 below for details. If you know what you're doing and all you want is to
 disable this behavior permanently without further considerations, just do:
 
@@ -33,15 +33,15 @@ OPTIONS
 -------
 
 --aggressive::
-       Usually `git-gc` runs very quickly while providing good disk
+       Usually 'git-gc' runs very quickly while providing good disk
        space utilization and performance.  This option will cause
-       `git-gc` to more aggressively optimize the repository at the expense
+       'git-gc' to more aggressively optimize the repository at the expense
        of taking much more time.  The effects of this optimization are
        persistent, so this option only needs to be used occasionally; every
        few hundred changesets or so.
 
 --auto::
-       With this option, `git-gc` checks whether any housekeeping is
+       With this option, 'git-gc' checks whether any housekeeping is
        required; if not, it exits without performing any work.
        Some git commands run `git gc --auto` after performing
        operations that could create many loose objects.
@@ -50,13 +50,13 @@ Housekeeping is required if there are too many loose objects or
 too many packs in the repository. If the number of loose objects
 exceeds the value of the `gc.auto` configuration variable, then
 all loose objects are combined into a single pack using
-`git-repack -d -l`.  Setting the value of `gc.auto` to 0
+'git-repack -d -l'.  Setting the value of `gc.auto` to 0
 disables automatic packing of loose objects.
 +
 If the number of packs exceeds the value of `gc.autopacklimit`,
 then existing packs (except those marked with a `.keep` file)
 are consolidated into a single pack by using the `-A` option of
-`git-repack`. Setting `gc.autopacklimit` to 0 disables
+'git-repack'. Setting `gc.autopacklimit` to 0 disables
 automatic consolidation of packs.
 
 --quiet::
@@ -89,7 +89,7 @@ how long records of conflicted merge you have not resolved are
 kept.  This defaults to 15 days.
 
 The optional configuration variable 'gc.packrefs' determines if
-`git-gc` runs `git-pack-refs`. This can be set to "nobare" to enable
+'git-gc' runs 'git-pack-refs'. This can be set to "nobare" to enable
 it within all non-bare repos or it can be set to a boolean value.
 This defaults to true.
 
@@ -108,10 +108,10 @@ default is "2 weeks ago".
 Notes
 -----
 
-`git-gc` tries very hard to be safe about the garbage it collects. In
+'git-gc' tries very hard to be safe about the garbage it collects. In
 particular, it will keep not only objects referenced by your current set
 of branches and tags, but also objects referenced by the index, remote
-tracking branches, refs saved by `git-filter-branch` in
+tracking branches, refs saved by 'git-filter-branch' in
 refs/original/, or reflogs (which may references commits in branches
 that were later amended or rewound).
 
index 50dfdfa19bcf224564ba6f0d9e478ffb97a98d48..84f23ee525336fc2bdd289991b97eafecddc14b2 100644 (file)
@@ -14,12 +14,12 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Acts as a filter, extracting the commit ID stored in archives created by
-`git-archive`.  It reads only the first 1024 bytes of input, thus its
+'git-archive'.  It reads only the first 1024 bytes of input, thus its
 runtime is not influenced by the size of <tarfile> very much.
 
-If no commit ID is found, `git-get-tar-commit-id` quietly exists with a
+If no commit ID is found, 'git-get-tar-commit-id' quietly exists with a
 return code of 1.  This can happen if <tarfile> had not been created
-using `git-archive` or if the first parameter of `git-archive` had been
+using 'git-archive' or if the first parameter of 'git-archive' had been
 a tree ID instead of a commit ID or tag.
 
 
index 25cb64957c34258e36d0c2a67b999082921daf30..fa4d133c1bccc088d3c8da65bce4e15cafd394aa 100644 (file)
@@ -91,7 +91,7 @@ OPTIONS
 --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
+       For better compatibility with 'git-diff', --name-only is a
        synonym for --files-with-matches.
 
 -c::
index 940e43f37e26e88105eb08d274af108728edb061..0e650f497bd456e633334a91bd929053a08eb0d3 100644 (file)
@@ -11,19 +11,19 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-A Tcl/Tk based graphical user interface to Git.  `git-gui` focuses
+A Tcl/Tk based graphical user interface to Git.  'git-gui' focuses
 on allowing users to make changes to their repository by making
 new commits, amending existing ones, creating branches, performing
 local merges, and fetching/pushing to remote repositories.
 
-Unlike `gitk`, `git-gui` focuses on commit generation
+Unlike 'gitk', 'git-gui' focuses on commit generation
 and single file annotation and does not show project history.
-It does however supply menu actions to start a `gitk` session from
-within `git-gui`.
+It does however supply menu actions to start a 'gitk' session from
+within 'git-gui'.
 
-`git-gui` is known to work on all popular UNIX systems, Mac OS X,
+'git-gui' is known to work on all popular UNIX systems, Mac OS X,
 and Windows (under both Cygwin and MSYS).  To the extent possible
-OS specific user interface guidelines are followed, making `git-gui`
+OS specific user interface guidelines are followed, making 'git-gui'
 a fairly native interface for users.
 
 COMMANDS
@@ -34,17 +34,17 @@ blame::
 
 browser::
        Start a tree browser showing all files in the specified
-       commit (or 'HEAD' by default).  Files selected through the
+       commit (or 'HEAD' by default).  Files selected through the
        browser are opened in the blame viewer.
 
 citool::
-       Start `git-gui` and arrange to make exactly one commit before
+       Start 'git-gui' and arrange to make exactly one commit before
        exiting and returning to the shell.  The interface is limited
        to only commit actions, slightly reducing the application's
        startup time and simplifying the menubar.
 
 version::
-       Display the currently running version of `git-gui`.
+       Display the currently running version of 'git-gui'.
 
 
 Examples
@@ -61,7 +61,7 @@ git gui blame Makefile::
 git gui blame v0.99.8 Makefile::
 
        Show the contents of 'Makefile' in revision 'v0.99.8'
-       and provide annotations for each line.  Unlike the above
+       and provide annotations for each line.  Unlike the above
        example the file is read from the object database and not
        the working directory.
 
@@ -71,7 +71,7 @@ git gui citool::
 
 git citool::
 
-       Same as 'git gui citool' (above).
+       Same as `git gui citool` (above).
 
 git gui browser maint::
 
@@ -84,15 +84,15 @@ SEE ALSO
 linkgit:gitk[1]::
        The git repository browser.  Shows branches, commit history
        and file differences.  gitk is the utility started by
-       `git-gui`'s Repository Visualize actions.
+       'git-gui''s Repository Visualize actions.
 
 Other
 -----
-`git-gui` is actually maintained as an independent project, but stable
+'git-gui' is actually maintained as an independent project, but stable
 versions are distributed as part of the Git suite for the convenience
 of end users.
 
-A `git-gui` development repository can be obtained from:
+A 'git-gui' development repository can be obtained from:
 
   git clone git://repo.or.cz/git-gui.git
 
index 05550c5ac7e0fe6e4a480c957df1e18ff04c5456..9e654fc41cc2b4a97806b2cb9430650214522711 100644 (file)
@@ -16,7 +16,7 @@ Computes the object ID value for an object with specified type
 with the contents of the named file (which can be outside of the
 work tree), and optionally writes the resulting object into the
 object database.  Reports its object ID to its standard output.
-This is used by `git-cvsimport` to update the index
+This is used by 'git-cvsimport' to update the index
 without modifying files in the work tree.  When <type> is not
 specified, it defaults to "blob".
 
index 5ace863c10c6c0b29199365f98d8de9832740dea..f414583fc48e85e4785fbf5f9431bb81a96ccd9d 100644 (file)
@@ -23,7 +23,7 @@ If a git command is named, a manual page for that command is brought
 up. The 'man' program is used by default for this purpose, but this
 can be overridden by other options or configuration variables.
 
-Note that 'git --help ...' is identical as 'git help ...' because the
+Note that `git --help ...` is identical to `git help ...` because the
 former is internally converted into the latter.
 
 OPTIONS
@@ -55,8 +55,8 @@ other display programs (see below).
 +
 The web browser can be specified using the configuration variable
 'help.browser', or 'web.browser' if the former is not set. If none of
-these config variables is set, the `git-web--browse` helper script
-(called by `git-help`) will pick a suitable default. See
+these config variables is set, the 'git-web--browse' helper script
+(called by 'git-help') will pick a suitable default. See
 linkgit:git-web--browse[1] for more information about this.
 
 CONFIGURATION VARIABLES
@@ -67,7 +67,7 @@ help.format
 
 If no command line option is passed, the 'help.format' configuration
 variable will be checked. The following values are supported for this
-variable; they make `git-help` behave as their corresponding command
+variable; they make 'git-help' behave as their corresponding command
 line option:
 
 * "man" corresponds to '-m|--man',
@@ -120,7 +120,7 @@ man.<tool>.path
 You can explicitly provide a full path to your preferred man viewer by
 setting the configuration variable 'man.<tool>.path'. For example, you
 can configure the absolute path to konqueror by setting
-'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
+'man.konqueror.path'. Otherwise, 'git-help' assumes the tool is
 available in PATH.
 
 man.<tool>.cmd
index cfc5989b95bb786629309bf29809734d272d5a11..e7c796155fdd0ad644decf5dc488c6d780a2d164 100644 (file)
@@ -35,7 +35,7 @@ commit-id::
 
 --stdin::
        Instead of a commit id on the command line (which is not expected in this
-       case), `git-http-fetch` expects lines on stdin in the format
+       case), 'git-http-fetch' expects lines on stdin in the format
 
                <commit-id>['\t'<filename-as-in--w>]
 
index 776aa254da3df5d443cfe39e6054a114aa9cfc04..b3d8da33ee64730794821440c287f30c4bb85789 100644 (file)
@@ -26,7 +26,7 @@ git format-patch --signoff --stdout --attach origin | git imap-send
 CONFIGURATION
 -------------
 
-`git-imap-send` requires the following values in the repository
+'git-imap-send' requires the following values in the repository
 configuration file (shown with examples):
 
 ..........................
index 194023774134eefd7189a809ecd10ef1cb0a7c10..4b5c743c1e5f11281e2b9df7508d57e9878ee5d2 100644 (file)
@@ -43,10 +43,10 @@ OPTIONS
        a default name determined from the pack content.  If
        <pack-file> is not specified consider using --keep to
        prevent a race condition between this process and
-       `git-repack`.
+       'git-repack'.
 
 --fix-thin::
-       It is possible for `git-pack-objects` to build
+       It is possible for 'git-pack-objects' to build
        "thin" pack, which records objects in deltified form based on
        objects not included in the pack to reduce network traffic.
        Those objects are expected to be present on the receiving end
@@ -59,7 +59,7 @@ OPTIONS
        Before moving the index into its final destination
        create an empty .keep file for the associated pack file.
        This option is usually necessary with --stdin to prevent a
-       simultaneous `git-repack` process from deleting
+       simultaneous 'git-repack' process from deleting
        the newly constructed pack and index before refs can be
        updated to use objects contained in the pack.
 
@@ -86,7 +86,7 @@ Once the index has been created, the list of object names is sorted
 and the SHA1 hash of that list is printed to stdout. If --stdin was
 also used then this is prefixed by either "pack\t", or "keep\t" if a
 new .keep file was successfully created. This is useful to remove a
-.keep file used as a lock to prevent the race with `git-repack`
+.keep file used as a lock to prevent the race with 'git-repack'
 mentioned above.
 
 
index 45244737fda157b81078574ae482ee4a478e9c43..71749c09d309f4cae2da9788969359d2620224a9 100644 (file)
@@ -86,11 +86,11 @@ If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY`
 environment variable then the sha1 directories are created underneath -
 otherwise the default `$GIT_DIR/objects` directory is used.
 
-Running `git-init` in an existing repository is safe. It will not overwrite
-things that are already there. The primary reason for rerunning `git-init`
+Running 'git-init' in an existing repository is safe. It will not overwrite
+things that are already there. The primary reason for rerunning 'git-init'
 is to pick up newly added templates.
 
-Note that `git-init` is the same as `git-init-db`.  The command
+Note that 'git-init' is the same as 'git-init-db'.  The command
 was primarily meant to initialize the object database, but over
 time it has become responsible for setting up the other aspects
 of the repository, such as installing the default hooks and
index e7ca537e3726395eeea79d8fd9d401fdd976b2b7..22da21a54f625c434216945889127ec283d3d09f 100644 (file)
@@ -44,7 +44,7 @@ OPTIONS
 -b::
 --browser::
        The web browser that should be used to view the gitweb
-       page. This will be passed to the `git-web--browse` helper
+       page. This will be passed to the 'git-web--browse' helper
        script along with the URL of the gitweb instance. See
        linkgit:git-web--browse[1] for more information about this. If
        the script fails, the URL will be printed to stdout.
index 3373c2636a879848fb789fc76c1ea031a3af95f0..5a58d5b03ded77d04d3de0857a798b6d3193adb2 100644 (file)
@@ -14,9 +14,9 @@ DESCRIPTION
 -----------
 Shows the commit logs.
 
-The command takes options applicable to the `git-rev-list`
+The command takes options applicable to the 'git-rev-list'
 command to control what is shown and how, and options applicable to
-the `git-diff-*` commands to control how the changes
+the 'git-diff-*' commands to control how the changes
 each commit introduces are shown.
 
 
index a6883bf43b0f7ca1adec5dfe4c65ce7f08d20afb..f43af417404d4f0f658933d57742d23c847f1619 100644 (file)
@@ -143,7 +143,7 @@ which case it outputs:
 
         [<tag> ]<mode> <object> <stage> <file>
 
-`git-ls-files --unmerged` and `git-ls-files --stage` can be used to examine
+'git-ls-files --unmerged' and 'git-ls-files --stage' can be used to examine
 detailed information on unmerged paths.
 
 For an unmerged path, instead of recording a single mode/SHA1 pair,
@@ -160,7 +160,7 @@ respectively.
 Exclude Patterns
 ----------------
 
-`git-ls-files` can use a list of "exclude patterns" when
+'git-ls-files' can use a list of "exclude patterns" when
 traversing the directory tree and finding files to show when the
 flags --others or --ignored are specified.  linkgit:gitignore[5]
 specifies the format of exclude patterns.
@@ -176,7 +176,7 @@ These exclude patterns come from these places, in order:
      in the same order they appear in the file.
 
   3. command line flag --exclude-per-directory=<name> specifies
-     a name of the file in each directory `git-ls-files`
+     a name of the file in each directory 'git-ls-files'
      examines, normally `.gitignore`.  Files in deeper
      directories take precedence.  Patterns are ordered in the
      same order they appear in the files.
index c267cdae4a5ec68ff8476f3a7d16fd8bf6306887..4f252441ed6a5fb0348012e76134aad3d3ddde65 100644 (file)
@@ -31,7 +31,7 @@ OPTIONS
 
 -u <exec>::
 --upload-pack=<exec>::
-       Specify the full path of `git-upload-pack` on the remote
+       Specify the full path of 'git-upload-pack' 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
        user.
index 6ebdeee843b314a45b02f791a837f4ec414023bb..cc52db3befda556a92b225539de0a9b95a1bf96c 100644 (file)
@@ -16,7 +16,7 @@ DESCRIPTION
 Reading a single e-mail message from the standard input, and
 writes the commit log message in <msg> file, and the patches in
 <patch> file.  The author name, e-mail and e-mail subject are
-written out to the standard output to be used by `git-am`
+written out to the standard output to be used by 'git-am'
 to create a commit.  It is usually not necessary to use this
 command directly.  See linkgit:git-am[1] instead.
 
@@ -30,7 +30,7 @@ OPTIONS
        whitespaces, (3) '[' up to ']', typically '[PATCH]', and
        then prepends "[PATCH] ".  This flag forbids this
        munging, and is most useful when used to read back
-       `git-format-patch -k` output.
+       'git-format-patch -k' output.
 
 -u::
        The commit log message, author name and author email are
index 41fb0c76ac2ad11bc16793ee990855c656ef706c..1a7ecbf8f39381b0c7b2da513dfa26eacec15cf6 100644 (file)
@@ -13,7 +13,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-`git-merge-base` finds as good a common ancestor as possible between
+'git-merge-base' finds as good a common ancestor as possible between
 the two commits. That is, given two commits A and B, `git merge-base A
 B` will output a commit which is reachable from both A and B through
 the parent relationship.
@@ -21,7 +21,7 @@ the parent relationship.
 Given a selection of equally good common ancestors it should not be
 relied on to decide in any particular way.
 
-The `git-merge-base` algorithm is still in flux - use the source...
+The 'git-merge-base' algorithm is still in flux - use the source...
 
 OPTIONS
 -------
index f057e49951188efa311997e4f79f1ccd480ed1b3..024ec015a3a3e0d3677a82e082e72a36c4572827 100644 (file)
@@ -15,15 +15,15 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-`git-file-merge` incorporates all changes that lead from the `<base-file>`
+'git-file-merge' incorporates all changes that lead from the `<base-file>`
 to `<other-file>` into `<current-file>`. The result ordinarily goes into
-`<current-file>`. `git-merge-file` is useful for combining separate changes
+`<current-file>`. 'git-merge-file' is useful for combining separate changes
 to an original. Suppose `<base-file>` is the original, and both
 `<current-file>` and `<other-file>` are modifications of `<base-file>`.
-Then `git-merge-file` combines both changes.
+Then 'git-merge-file' combines both changes.
 
 A conflict occurs if both `<current-file>` and `<other-file>` have changes
-in a common segment of lines. If a conflict is found, `git-merge-file`
+in a common segment of lines. If a conflict is found, 'git-merge-file'
 normally outputs a warning and brackets the conflict with <<<<<<< and
 >>>>>>> lines. A typical conflict will look like this:
 
@@ -39,8 +39,8 @@ the alternatives.
 The exit value of this program is negative on error, and the number of
 conflicts otherwise. If the merge was clean, the exit value is 0.
 
-`git-merge-file` is designed to be a minimal clone of RCS `merge`; that is, it
-implements all of RCS merge's functionality which is needed by
+'git-merge-file' is designed to be a minimal clone of RCS 'merge'; that is, it
+implements all of RCS 'merge''s functionality which is needed by
 linkgit:git[1].
 
 
@@ -85,7 +85,7 @@ Written by Johannes Schindelin <johannes.schindelin@gmx.de>
 Documentation
 --------------
 Documentation by Johannes Schindelin and the git-list <git@vger.kernel.org>,
-with parts copied from the original documentation of RCS merge.
+with parts copied from the original documentation of RCS 'merge'.
 
 GIT
 ---
index 43680840e15d677ad54ad5de8561dfff4e63662d..ff088c5c294527dd97c542012483aafe3ca64314 100644 (file)
@@ -36,20 +36,20 @@ OPTIONS
        failure usually indicates conflicts during merge). This is for
        porcelains which might want to emit custom messages.
 
-If `git-merge-index` is called with multiple <file>s (or -a) then it
+If 'git-merge-index' is called with multiple <file>s (or -a) then it
 processes them in turn only stopping if merge returns a non-zero exit
 code.
 
 Typically this is run with a script calling git's imitation of
-the merge command from the RCS package.
+the 'merge' command from the RCS package.
 
-A sample script called `git-merge-one-file` is included in the
+A sample script called 'git-merge-one-file' is included in the
 distribution.
 
 ALERT ALERT ALERT! The git "merge object order" is different from the
-RCS `merge` program merge object order. In the above ordering, the
+RCS 'merge' program merge object order. In the above ordering, the
 original is first. But the argument order to the 3-way merge program
-`merge` is to have the original in the middle. Don't ask me why.
+'merge' is to have the original in the middle. Don't ask me why.
 
 Examples:
 
@@ -68,10 +68,10 @@ or
   This is added AA in the branch B.
   fatal: merge program failed
 
-where the latter example shows how `git-merge-index` will stop trying to
+where the latter example shows how 'git-merge-index' will stop trying to
 merge once anything has returned an error (i.e., `cat` returned an error
 for the AA file, because it didn't exist in the original, and thus
-`git-merge-index` didn't even try to merge the MM thing).
+'git-merge-index' didn't even try to merge the MM thing).
 
 Author
 ------
index 62e09afe13d48393b7dc2a734b416e5302088654..1dd134538da40a1f3547c55c49be3b418e6be0ab 100644 (file)
@@ -12,8 +12,8 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-This is the standard helper program to use with `git-merge-index`
-to resolve a merge after the trivial merge done with `git-read-tree -m`.
+This is the standard helper program to use with 'git-merge-index'
+to resolve a merge after the trivial merge done with 'git-read-tree -m'.
 
 Author
 ------
index e6fa2b9ae45875dade691d2f104bb315a2aa0560..62f99b5f3b8991c93d0f2e06cd382312069bccaf 100644 (file)
@@ -29,8 +29,8 @@ include::merge-options.txt[]
 
 -m <msg>::
        The commit message to be used for the merge commit (in case
-       it is created). The `git-fmt-merge-msg` script can be used
-       to give a good default for automated `git-merge` invocations.
+       it is created). The 'git-fmt-merge-msg' script can be used
+       to give a good default for automated 'git-merge' invocations.
 
 <remote>::
        Other branch head merged into our branch.  You need at
@@ -41,7 +41,7 @@ include::merge-strategies.txt[]
 
 
 If you tried a merge which resulted in a complex conflicts and
-would want to start over, you can recover with `git-reset`.
+would want to start over, you can recover with 'git-reset'.
 
 CONFIGURATION
 -------------
@@ -49,7 +49,7 @@ include::merge-config.txt[]
 
 branch.<name>.mergeoptions::
        Sets default options for merging into branch <name>. The syntax and
-       supported options are equal to that of `git-merge`, but option values
+       supported options are equal to that of 'git-merge', but option values
        containing whitespace characters are currently not supported.
 
 HOW MERGE WORKS
@@ -84,7 +84,7 @@ with `git pull remote rbranch:lbranch`, but your working tree,
 `.git/HEAD` pointer and index file are left intact).
 
 You may have local modifications in the working tree files.  In
-other words, `git-diff` is allowed to report changes.
+other words, 'git-diff' is allowed to report changes.
 However, the merge uses your working tree as the working area,
 and in order to prevent the merge operation from losing such
 changes, it makes sure that they do not interfere with the
@@ -140,14 +140,14 @@ After seeing a conflict, you can do two things:
 
  * Decide not to merge.  The only clean-up you need are to reset
    the index file to the `HEAD` commit to reverse 2. and to clean
-   up working tree changes made by 2. and 3.; `git-reset` can
+   up working tree changes made by 2. and 3.; 'git-reset' can
    be used for this.
 
  * Resolve the conflicts.  `git diff` would report only the
    conflicting paths because of the above 2. and 3.  Edit the
-   working tree files into a desirable shape, `git-add` or `git-rm`
+   working tree files into a desirable shape, 'git-add' or 'git-rm'
    them, to make the index file contain what the merge result
-   should be, and run `git-commit` to commit the result.
+   should be, and run 'git-commit' to commit the result.
 
 
 SEE ALSO
index fedcfa0543fa9f7d44c2c53eedc9258d6eb8de43..31570b1e27af6a603df98868c627da08d91c17cc 100644 (file)
@@ -13,11 +13,11 @@ DESCRIPTION
 -----------
 
 Use `git mergetool` to run one of several merge utilities to resolve
-merge conflicts.  It is typically run after `git-merge`.
+merge conflicts.  It is typically run after 'git-merge'.
 
 If one or more <file> parameters are given, the merge tool program will
 be run to resolve differences on each file.  If no <file> names are
-specified, `git-mergetool` will run the merge tool program on every file
+specified, 'git-mergetool' will run the merge tool program on every file
 with merge conflicts.
 
 OPTIONS
@@ -27,23 +27,23 @@ OPTIONS
        Valid merge tools are:
        kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
 +
-If a merge resolution program is not specified, `git-mergetool`
+If a merge resolution program is not specified, 'git-mergetool'
 will use the configuration variable `merge.tool`.  If the
-configuration variable `merge.tool` is not set, `git-mergetool`
+configuration variable `merge.tool` is not set, 'git-mergetool'
 will pick a suitable default.
 +
 You can explicitly provide a full path to the tool by setting the
 configuration variable `mergetool.<tool>.path`. For example, you
 can configure the absolute path to kdiff3 by setting
-`mergetool.kdiff3.path`. Otherwise, `git-mergetool` assumes the
+`mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the
 tool is available in PATH.
 +
 Instead of running one of the known merge tool programs
-`git-mergetool` can be customized to run an alternative program
+'git-mergetool' can be customized to run an alternative program
 by specifying the command line to invoke in a configration
 variable `mergetool.<tool>.cmd`.
 +
-When `git-mergetool` is invoked with this tool (either through the
+When 'git-mergetool' is invoked with this tool (either through the
 `-t` or `--tool` option or the `merge.tool` configuration
 variable) the configured command line will be invoked with `$BASE`
 set to the name of a temporary file containing the common base for
@@ -57,7 +57,7 @@ merge resolution.
 If the custom merge tool correctly indicates the success of a
 merge resolution with its exit code then the configuration
 variable `mergetool.<tool>.trustExitCode` can be set to `true`.
-Otherwise, `git-mergetool` will prompt the user to indicate the
+Otherwise, 'git-mergetool' will prompt the user to indicate the
 success of the resolution after the custom tool has exited.
 
 Author
index 00b1fa4dcbccf2d083aa1b83ba5353eb06658867..6e77ab135353aaf713b638a70701717db1706c2c 100644 (file)
@@ -15,7 +15,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Finds symbolic names suitable for human digestion for revisions given in any
-format parsable by `git-rev-parse`.
+format parsable by 'git-rev-parse'.
 
 
 OPTIONS
@@ -38,7 +38,7 @@ OPTIONS
        Instead of printing both the SHA-1 and the name, print only
        the name.  If given with --tags the usual tag prefix of
        "tags/" is also omitted from the name, matching the output
-       of `git-describe` more closely.  This option
+       of 'git-describe' more closely.  This option
        cannot be combined with --stdin.
 
 --no-undefined::
@@ -56,7 +56,7 @@ wrote you about that fantastic commit 33db5f4d9027a10e477ccf054b2c1ab94f74c85a.
 Of course, you look into the commit, but that only tells you what happened, but
 not the context.
 
-Enter `git-name-rev`:
+Enter 'git-name-rev':
 
 ------------
 % git name-rev 33db5f4d9027a10e477ccf054b2c1ab94f74c85a
index d9cd16ae16f488319e15ac88f934ac70070cd6ae..8c354bd47014825de71243d73158b6b080ecb350 100644 (file)
@@ -30,7 +30,7 @@ Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
 any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
 enables git to read from such an archive.
 
-The `git-unpack-objects` command can read the packed archive and
+The 'git-unpack-objects' command can read the packed archive and
 expand the objects contained in the pack into "one-file
 one-object" format; this is typically done by the smart-pull
 commands when a pack is created on-the-fly for efficient network
@@ -59,7 +59,7 @@ base-name::
 --revs::
        Read the revision arguments from the standard input, instead of
        individual object names.  The revision arguments are processed
-       the same way as `git-rev-list` with the `--objects` flag
+       the same way as 'git-rev-list' with the `--objects` flag
        uses its `commit` arguments to build the list of objects it
        outputs.  The objects on the resulting list are packed.
 
@@ -170,7 +170,7 @@ base-name::
        A packed archive can express base object of a delta as
        either 20-byte object name or as an offset in the
        stream, but older version of git does not understand the
-       latter.  By default, `git-pack-objects` only uses the
+       latter.  By default, 'git-pack-objects' only uses the
        former format for better compatibility.  This option
        allows the command to use the latter format for
        compactness.  Depending on the average delta chain
index 80fc1bae35a57aacc203395dc93e9c915863231d..5f9435e59b49fec1e37c65f1bfdc38be3704c4e5 100644 (file)
@@ -16,7 +16,7 @@ This program computes which packs in your repository
 are redundant. The output is suitable for piping to
 `xargs rm` if you are in the root of the repository.
 
-`git-pack-redundant` accepts a list of objects on standard input. Any objects
+'git-pack-redundant' accepts a list of objects on standard input. Any objects
 given will be ignored when checking which packs are required. This makes the
 following command useful when wanting to remove packs which contain unreachable
 objects.
index 421312eca91d68711a08e6747e7730d77ba006aa..cd43069874d59504627211e011250a3554aeee5a 100644 (file)
@@ -32,7 +32,7 @@ get_remote_refs_for_fetch::
 get_remote_refs_for_push::
        Given the list of user-supplied `<repo> <refspec>...`,
        return the list of refs to push in a form suitable to be
-       fed to the `git-send-pack` command.  When `<refspec>...`
+       fed to the 'git-send-pack' command.  When `<refspec>...`
        is empty the returned list of refs consists of the
        defaults for the given `<repo>`, if specified in
        `$GIT_DIR/remotes/`.
index 17c178f8677c42bdb232abdf32581df515621afc..477785e13418e1971156f5210015da4ab9d77cab 100644 (file)
@@ -18,7 +18,7 @@ ID" are almost guaranteed to be the same thing.
 
 IOW, you can use this thing to look for likely duplicate commits.
 
-When dealing with `git-diff-tree` output, it takes advantage of
+When dealing with 'git-diff-tree' output, it takes advantage of
 the fact that the patch is prefixed with the object name of the
 commit, and outputs two 40-byte hexadecimal string.  The first
 string is the patch ID, and the second string is the commit ID.
index c3ed4a10f4d9ba015ebe20a9ca039d44796c0784..79c03ee7f7ea886094e2dfa85211f0539f51a4ab 100644 (file)
@@ -12,12 +12,12 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-This command is deprecated; use `git-ls-remote` instead.
+This command is deprecated; use 'git-ls-remote' instead.
 
 OPTIONS
 -------
 --upload-pack=<git-upload-pack>::
-       Use this to specify the path to `git-upload-pack` on the
+       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
        setup scripts for login shells (e.g. .bash_profile) and
@@ -30,7 +30,7 @@ OPTIONS
 
 <host>::
        A remote host that houses the repository.  When this
-       part is specified, `git-upload-pack` is invoked via
+       part is specified, 'git-upload-pack' is invoked via
        ssh.
 
 <directory>::
index a4a0d56cae66275b324173cb64d5d9ebb05af951..54f1dab38de9e01d8452753ac6028875b91d5f6b 100644 (file)
@@ -13,16 +13,16 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-NOTE: In most cases, users should run `git-gc`, which calls
-`git-prune`. See the section "NOTES", below.
+NOTE: In most cases, users should run 'git-gc', which calls
+'git-prune'. See the section "NOTES", below.
 
-This runs `git-fsck --unreachable` using all the refs
+This runs 'git-fsck --unreachable' using all the refs
 available in `$GIT_DIR/refs`, optionally with additional set of
 objects specified on the command line, and prunes all unpacked
 objects unreachable from any of these head objects from the object database.
 In addition, it
 prunes the unpacked objects that are also found in packs by
-running `git-prune-packed`.
+running 'git-prune-packed'.
 
 Note that unreachable, packed objects will remain.  If this is
 not desired, see linkgit:git-repack[1].
@@ -59,12 +59,12 @@ $ git prune $(cd ../another && $(git rev-parse --all))
 Notes
 -----
 
-In most cases, users will not need to call `git-prune` directly, but
-should instead call `git-gc`, which handles pruning along with
+In most cases, users will not need to call 'git-prune' directly, but
+should instead call 'git-gc', which handles pruning along with
 many other housekeeping tasks.
 
 For a description of which objects are considered for pruning, see
-`git-fsck`'s --unreachable option.
+'git-fsck''s --unreachable option.
 
 SEE ALSO
 --------
index d9537ebc6a8df5311275965eb62ca106566a7f8c..092d1b8a3e49b3c512bf4d2daf3b70b5a7694b60 100644 (file)
@@ -13,16 +13,16 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Runs `git-fetch` with the given parameters, and calls `git-merge`
+Runs 'git-fetch' with the given parameters, and calls 'git-merge'
 to merge the retrieved head(s) into the current branch.
-With `--rebase`, calls `git-rebase` instead of `git-merge`.
+With `--rebase`, calls 'git-rebase' instead of 'git-merge'.
 
 Note that you can use `.` (current directory) as the
 <repository> to pull from the local repository -- this is useful
 when merging local branches into the current branch.
 
-Also note that options meant for `git-pull` itself and underlying
-`git-merge` must be given before the options meant for `git-fetch`.
+Also note that options meant for 'git-pull' itself and underlying
+'git-merge' must be given before the options meant for 'git-fetch'.
 
 OPTIONS
 -------
@@ -182,7 +182,7 @@ The final command then merges the newly fetched `tmp` into master.
 
 
 If you tried a pull which resulted in a complex conflicts and
-would want to start over, you can recover with `git-reset`.
+would want to start over, you can recover with 'git-reset'.
 
 
 SEE ALSO
index 1f70e72758254fe3e4774935c89c5b9d4954bedb..c44dce374a39566c2ad349c657e582c6a8a8d8ec 100644 (file)
@@ -85,7 +85,7 @@ nor in any Push line of the corresponding remotes file---see below).
        line.
 
 --receive-pack=<git-receive-pack>::
-       Path to the `git-receive-pack` program on the remote
+       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.
@@ -106,7 +106,7 @@ nor in any Push line of the corresponding remotes file---see below).
 
 --thin::
 --no-thin::
-       These options are passed to `git-send-pack`.  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.
 
index 0c7cc6b940a0c39e89e114b41e69bf6aba631196..6f4b9b017f7b504a2b9e909639a61b1ef7750af0 100644 (file)
@@ -22,8 +22,8 @@ fast-forward (i.e. 2-way) merge, or a 3-way merge, with the `-m`
 flag.  When used with `-m`, the `-u` flag causes it to also update
 the files in the work tree with the result of the merge.
 
-Trivial merges are done by `git-read-tree` itself.  Only conflicting paths
-will be in unmerged state when `git-read-tree` returns.
+Trivial merges are done by 'git-read-tree' itself.  Only conflicting paths
+will be in unmerged state when 'git-read-tree' returns.
 
 OPTIONS
 -------
@@ -54,13 +54,13 @@ OPTIONS
        Show the progress of checking files out.
 
 --trivial::
-       Restrict three-way merge by `git-read-tree` to happen
+       Restrict three-way merge by 'git-read-tree' to happen
        only if there is no file-level merging required, instead
        of resolving merge for trivial cases and leaving
        conflicting files unresolved in the index.
 
 --aggressive::
-       Usually a three-way merge by `git-read-tree` resolves
+       Usually a three-way merge by 'git-read-tree' resolves
        the merge for really trivial cases and leaves other
        cases unresolved in the index, so that Porcelains can
        implement different merge policies.  This flag makes the
@@ -113,7 +113,7 @@ OPTIONS
 
 Merging
 -------
-If `-m` is specified, `git-read-tree` can perform 3 kinds of
+If `-m` is specified, 'git-read-tree' can perform 3 kinds of
 merge, a single tree merge if only 1 tree is given, a
 fast-forward merge with 2 trees, or a 3-way merge if 3 trees are
 provided.
@@ -121,18 +121,18 @@ provided.
 
 Single Tree Merge
 ~~~~~~~~~~~~~~~~~
-If only 1 tree is specified, `git-read-tree` operates as if the user did not
+If only 1 tree is specified, 'git-read-tree' operates as if the user did not
 specify `-m`, except that if the original index has an entry for a
 given pathname, and the contents of the path matches with the tree
 being read, the stat info from the index is used. (In other words, the
 index's stat()s take precedence over the merged tree's).
 
 That means that if you do a `git read-tree -m <newtree>` followed by a
-`git checkout-index -f -u -a`, the `git-checkout-index` only checks out
+`git checkout-index -f -u -a`, the 'git-checkout-index' only checks out
 the stuff that really changed.
 
-This is used to avoid unnecessary false hits when `git-diff-files` is
-run after `git-read-tree`.
+This is used to avoid unnecessary false hits when 'git-diff-files' is
+run after 'git-read-tree'.
 
 
 Two Tree Merge
@@ -143,7 +143,7 @@ is the head commit of the current repository, and $M is the head
 of a foreign tree, which is simply ahead of $H (i.e. we are in a
 fast forward situation).
 
-When two trees are specified, the user is telling `git-read-tree`
+When two trees are specified, the user is telling 'git-read-tree'
 the following:
 
      1. The current index and work tree is derived from $H, but
@@ -193,10 +193,10 @@ Here are the "carry forward" rules:
 
 In all "keep index" cases, the index entry stays as in the
 original index file.  If the entry were not up to date,
-`git-read-tree` keeps the copy in the work tree intact when
+'git-read-tree' keeps the copy in the work tree intact when
 operating under the -u flag.
 
-When this form of `git-read-tree` returns successfully, you can
+When this form of 'git-read-tree' returns successfully, you can
 see what "local changes" you made are carried forward by running
 `git diff-index --cached $M`.  Note that this does not
 necessarily match `git diff-index --cached $H` would have
@@ -213,7 +213,7 @@ output after two-tree merge.
 Each "index" entry has two bits worth of "stage" state. stage 0 is the
 normal one, and is the only one you'd see in any kind of normal use.
 
-However, when you do `git-read-tree` with three trees, the "stage"
+However, when you do 'git-read-tree' with three trees, the "stage"
 starts out at 1.
 
 This means that you can do
@@ -229,7 +229,7 @@ branch into the current branch, we use the common ancestor tree
 as <tree1>, the current branch head as <tree2>, and the other
 branch head as <tree3>.
 
-Furthermore, `git-read-tree` has special-case logic that says: if you see
+Furthermore, 'git-read-tree' has special-case logic that says: if you see
 a file that matches in all respects in the following states, it
 "collapses" back to "stage0":
 
@@ -245,7 +245,7 @@ a file that matches in all respects in the following states, it
    - stage 1 and stage 3 are the same and stage 2 is different take
      stage 2 (we did something while they did nothing)
 
-The `git-write-tree` command refuses to write a nonsensical tree, and it
+The 'git-write-tree' command refuses to write a nonsensical tree, and it
 will complain about unmerged entries if it sees a single entry that is not
 stage 0.
 
@@ -261,7 +261,7 @@ start a 3-way merge with an index file that is already
 populated.  Here is an outline of how the algorithm works:
 
 - if a file exists in identical format in all three trees, it will
-  automatically collapse to "merged" state by `git-read-tree`.
+  automatically collapse to "merged" state by 'git-read-tree'.
 
 - a file that has _any_ difference what-so-ever in the three trees
   will stay as separate entries in the index. It's up to "porcelain
@@ -285,8 +285,8 @@ populated.  Here is an outline of how the algorithm works:
     matching "stage1" entry if it exists too.  .. all the normal
     trivial rules ..
 
-You would normally use `git-merge-index` with supplied
-`git-merge-one-file` to do this last step.  The script updates
+You would normally use 'git-merge-index' with supplied
+'git-merge-one-file' to do this last step.  The script updates
 the files in the working tree as it merges each path and at the
 end of a successful merge.
 
@@ -308,7 +308,7 @@ $ JC=`git rev-parse --verify "HEAD^0"`
 $ git checkout-index -f -u -a $JC
 ----------------
 
-You do random edits, without running `git-update-index`.  And then
+You do random edits, without running 'git-update-index'.  And then
 you notice that the tip of your "upstream" tree has advanced
 since you pulled from him:
 
@@ -334,14 +334,14 @@ your work-in-progress changes, and your work tree would be
 updated to the result of the merge.
 
 However, if you have local changes in the working tree that
-would be overwritten by this merge, `git-read-tree` will refuse
+would be overwritten by this merge, 'git-read-tree' will refuse
 to run to prevent your changes from being lost.
 
 In other words, there is no need to worry about what exists only
 in the working tree.  When you have local changes in a part of
 the project that is not involved in the merge, your changes do
 not interfere with the merge, and are kept intact.  When they
-*do* interfere, the merge does not even start (`git-read-tree`
+*do* interfere, the merge does not even start ('git-read-tree'
 complains loudly and fails without modifying anything).  In such
 a case, you can simply continue doing what you were in the
 middle of doing, and when your working tree is ready (i.e. you
index 754230e4621a11f04ff693cd1eb942d55272c2cc..f3459c7de7c9629f2abfdb684a359bb264ea82ed 100644 (file)
@@ -16,7 +16,7 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-If <branch> is specified, `git-rebase` will perform an automatic
+If <branch> is specified, 'git-rebase' will perform an automatic
 `git checkout <branch>` before doing anything else.  Otherwise
 it remains on the current branch.
 
@@ -167,8 +167,8 @@ This is useful if F and G were flawed in some way, or should not be
 part of topicA.  Note that the argument to --onto and the <upstream>
 parameter can be any valid commit-ish.
 
-In case of conflict, `git-rebase` will stop at the first problematic commit
-and leave conflict markers in the tree.  You can use `git-diff` to locate
+In case of conflict, 'git-rebase' will stop at the first problematic commit
+and leave conflict markers in the tree.  You can use 'git-diff' to locate
 the markers (<<<<<<) and make edits to resolve the conflict.  For each
 file you edit, you need to tell git that the conflict has been resolved,
 typically this would be done with
@@ -184,7 +184,7 @@ desired resolution, you can continue the rebasing process with
     git rebase --continue
 
 
-Alternatively, you can undo the `git-rebase` with
+Alternatively, you can undo the 'git-rebase' with
 
 
     git rebase --abort
@@ -224,8 +224,8 @@ OPTIONS
        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.
+       is used instead ('git-merge-recursive' when merging a single
+       head, 'git-merge-octopus' otherwise).  This implies --merge.
 
 -v::
 --verbose::
@@ -238,7 +238,7 @@ OPTIONS
        ever ignored.
 
 --whitespace=<nowarn|warn|error|error-all|strip>::
-       This flag is passed to the `git-apply` program
+       This flag is passed to the 'git-apply' program
        (see linkgit:git-apply[1]) that applies the patch.
 
 -i::
@@ -259,10 +259,10 @@ NOTES
 When you rebase a branch, you are changing its history in a way that
 will cause problems for anyone who already has a copy of the branch
 in their repository and tries to pull updates from you.  You should
-understand the implications of using 'git rebase' on a repository that
+understand the implications of using 'git-rebase' on a repository that
 you share.
 
-When the git rebase command is run, it will first execute a "pre-rebase"
+When the git-rebase command is run, it will first execute a "pre-rebase"
 hook if one exists.  You can use this hook to do sanity checks and
 reject the rebase if it isn't appropriate.  Please see the template
 pre-rebase hook script for an example.
@@ -314,12 +314,12 @@ pick fa1afe1 The oneline of the next commit
 ...
 -------------------------------------------
 
-The oneline descriptions are purely for your pleasure; `git-rebase` will
+The oneline descriptions are purely for your pleasure; 'git-rebase' will
 not look at them but at the commit names ("deadbee" and "fa1afe1" in this
 example), so do not delete or edit the names.
 
 By replacing the command "pick" with the command "edit", you can tell
-`git-rebase` to stop after applying that commit, so that you can edit
+'git-rebase' to stop after applying that commit, so that you can edit
 the files and/or the commit message, amend the commit, and continue
 rebasing.
 
@@ -334,7 +334,7 @@ the loop with `git rebase --continue`.
 
 For example, if you want to reorder the last 5 commits, such that what
 was HEAD~4 becomes the new HEAD. To achieve that, you would call
-`git-rebase` like this:
+'git-rebase' like this:
 
 ----------------------
 $ git rebase -i HEAD~5
@@ -364,7 +364,7 @@ SPLITTING COMMITS
 -----------------
 
 In interactive mode, you can mark commits with the action "edit".  However,
-this does not necessarily mean that `git-rebase` expects the result of this
+this does not necessarily mean that 'git-rebase' expects the result of this
 edit to be exactly one commit.  Indeed, you can undo the commit, or you can
 add other commits.  This can be used to split a commit into two:
 
@@ -380,7 +380,7 @@ add other commits.  This can be used to split a commit into two:
 
 - Now add the changes to the index that you want to have in the first
   commit.  You can use `git add` (possibly interactively) or
-  `git-gui` (or both) to do that.
+  'git-gui' (or both) to do that.
 
 - Commit the now-current index with whatever commit message is appropriate
   now.
@@ -391,7 +391,7 @@ add other commits.  This can be used to split a commit into two:
 
 If you are not absolutely sure that the intermediate revisions are
 consistent (they compile, pass the testsuite, etc.) you should use
-`git-stash` to stash away the not-yet-committed changes
+'git-stash' to stash away the not-yet-committed changes
 after each commit, test, and amend the commit if fixes are necessary.
 
 
index 207684d1c117e0e4cb3bb3bc1293b9fda90e3806..6b2f8c4de7c32927f270e561362d4766193986fa 100644 (file)
@@ -12,23 +12,23 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Invoked by `git-send-pack` and updates the repository with the
+Invoked by 'git-send-pack' and updates the repository with the
 information fed from the remote end.
 
 This command is usually not invoked directly by the end user.
-The UI for the protocol is on the `git-send-pack` side, and the
+The UI for the protocol is on the 'git-send-pack' side, and the
 program pair is meant to be used to push updates to remote
 repository.  For pull operations, see linkgit:git-fetch-pack[1].
 
 The command allows for creation and fast forwarding of sha1 refs
 (heads/tags) on the remote end (strictly speaking, it is the
-local end `git-receive-pack` runs, but to the user who is sitting at
+local end 'git-receive-pack' runs, but to the user who is sitting at
 the send-pack end, it is updating the remote.  Confused?)
 
 There are other real-world examples of using update and
 post-update hooks found in the Documentation/howto directory.
 
-`git-receive-pack` honours the receive.denyNonFastForwards config
+'git-receive-pack' honours the receive.denyNonFastForwards config
 option, which tells it if updates to a ref should be denied if they
 are not fast-forwards.
 
@@ -125,7 +125,7 @@ non-zero exit code will generate an error message.
 
 Note that it is possible for refname to not have sha1-new when this
 hook runs.  This can easily occur if another user modifies the ref
-after it was updated by `git-receive-pack`, but before the hook was able
+after it was updated by 'git-receive-pack', but before the hook was able
 to evaluate it.  It is recommended that hooks rely on sha1-new
 rather than the current value of refname.
 
@@ -137,7 +137,7 @@ post-update will called with the list of refs that have been updated.
 This can be used to implement any repository wide cleanup tasks.
 
 The exit code from this hook invocation is ignored; the only thing
-left for `git-receive-pack` to do at that point is to exit itself
+left for 'git-receive-pack' to do at that point is to exit itself
 anyway.
 
 This hook can be used, for example, to run `git update-server-info`
index 8492aeacf1823bed947d4dc318f45e2488cac574..146d7f545cb2f85177c8143b7e7b999ae8303d71 100644 (file)
@@ -16,12 +16,12 @@ The command takes various subcommands, and different options
 depending on the subcommand:
 
 [verse]
-git reflog expire [--dry-run] [--stale-fix] [--verbose]
+'git reflog expire' [--dry-run] [--stale-fix] [--verbose]
        [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
-
-git reflog delete ref@\{specifier\}...
-
-git reflog [show] [log-options] [<ref>]
++
+'git reflog delete' ref@\{specifier\}...
++
+'git reflog' ['show'] [log-options] [<ref>]
 
 Reflog is a mechanism to record when the tip of branches are
 updated.  This command is to manage the information recorded in it.
@@ -36,7 +36,7 @@ The subcommand "show" (which is also the default, in the absence of any
 subcommands) will take all the normal log options, and show the log of
 the reference provided in the command-line (or `HEAD`, by default).
 The reflog will cover all recent actions (HEAD reflog records branch switching
-as well).  It is an alias for 'git log -g --abbrev-commit --pretty=oneline';
+as well).  It is an alias for `git log -g --abbrev-commit --pretty=oneline`;
 see linkgit:git-log[1].
 
 The reflog is useful in various git commands, to specify the old value
@@ -46,7 +46,7 @@ point to one week ago", and so on. See linkgit:git-rev-parse[1] for
 more details.
 
 To delete single entries from the reflog, use the subcommand "delete"
-and specify the _exact_ entry (e.g. ``git reflog delete master@\{2\}'').
+and specify the _exact_ entry (e.g. "`git reflog delete master@\{2\}`").
 
 
 OPTIONS
@@ -60,7 +60,7 @@ OPTIONS
        refs.
 +
 This computation involves traversing all the reachable objects, i.e. it
-has the same cost as 'git prune'.  Fortunately, once this is run, we
+has the same cost as 'git-prune'.  Fortunately, once this is run, we
 should not have to ever worry about missing objects, because the current
 prune and pack-objects know about reflogs and protect objects referred by
 them.
index 32db0aed11bee4fd97785fcd963dc3f5461f5657..bb99810ec76f93ff1cdc59aacdf592c64419701a 100644 (file)
@@ -10,11 +10,11 @@ SYNOPSIS
 --------
 [verse]
 'git remote' [-v | --verbose]
-'git remote' add [-t <branch>] [-m <master>] [-f] [--mirror] <name> <url>
-'git remote' rm <name>
-'git remote' show [-n] <name>
-'git remote' prune [-n | --dry-run] <name>
-'git remote' update [group]
+'git remote add' [-t <branch>] [-m <master>] [-f] [--mirror] <name> <url>
+'git remote rm' <name>
+'git remote show' [-n] <name>
+'git remote prune' [-n | --dry-run] <name>
+'git remote update' [group]
 
 DESCRIPTION
 -----------
@@ -124,7 +124,7 @@ $ git checkout -b nfs linux-nfs/master
 ...
 ------------
 
-* Imitate 'git clone' but track only selected branches
+* Imitate 'git-clone' but track only selected branches
 +
 ------------
 $ mkdir project.git
index 0d72e83023328f23e742a7a59309a43a796a87d1..38ac60947bc6c4cbfc8aae70a92f9163fefed442 100644 (file)
@@ -47,32 +47,32 @@ OPTIONS
        deleted by way of being left in the old pack and then
        removed.  Instead, the loose unreachable objects
        will be pruned according to normal expiry rules
-       with the next `git-gc` invocation. See linkgit:git-gc[1].
+       with the next 'git-gc' invocation. See linkgit:git-gc[1].
 
 -d::
        After packing, if the newly created packs make some
        existing packs redundant, remove the redundant packs.
-       Also run  `git-prune-packed` to remove redundant
+       Also run  'git-prune-packed' to remove redundant
        loose object files.
 
 -l::
-       Pass the `--local` option to `git-pack-objects`. See
+       Pass the `--local` option to 'git-pack-objects'. See
        linkgit:git-pack-objects[1].
 
 -f::
-       Pass the `--no-reuse-delta` option to `git-pack-objects`. See
+       Pass the `--no-reuse-delta` option to 'git-pack-objects'. See
        linkgit:git-pack-objects[1].
 
 -q::
-       Pass the `-q` option to `git-pack-objects`. See
+       Pass the `-q` option to 'git-pack-objects'. See
        linkgit:git-pack-objects[1].
 
 -n::
        Do not update the server information with
-       `git-update-server-info`.  This option skips
+       'git-update-server-info'.  This option skips
        updating local catalog files needed to publish
        this repository (or a direct copy of it)
-       over HTTP or FTP.  See gitlink:git-update-server-info[1].
+       over HTTP or FTP.  See linkgit:git-update-server-info[1].
 
 --window=[N]::
 --depth=[N]::
@@ -107,7 +107,7 @@ Configuration
 
 When configuration variable `repack.UseDeltaBaseOffset` is set
 for the repository, the command passes `--delta-base-offset`
-option to `git-pack-objects`; this typically results in slightly
+option to 'git-pack-objects'; this typically results in slightly
 smaller packs, but the generated packs are incompatible with
 versions of git older than (and including) v1.4.3; do not set
 the variable in a repository that older version of git needs to
index 34580290427589a271dc3a0a51b7b95db259e4f9..678bfd3cdeb1e223138438431bd46257ec8adcea 100644 (file)
@@ -7,7 +7,7 @@ git-rerere - Reuse recorded resolution of conflicted merges
 
 SYNOPSIS
 --------
-'git rerere' [clear|diff|status|gc]
+'git rerere' ['clear'|'diff'|'status'|'gc']
 
 DESCRIPTION
 -----------
@@ -30,14 +30,14 @@ enable this command.
 COMMANDS
 --------
 
-Normally, `git-rerere` is run without arguments or user-intervention.
+Normally, 'git-rerere' is run without arguments or user-intervention.
 However, it has several commands that allow it to interact with
 its working state.
 
 'clear'::
 
 This resets the metadata used by rerere if a merge resolution is to be
-is aborted.  Calling `git-am --skip` or `git-rebase [--skip|--abort]`
+is aborted.  Calling 'git-am --skip' or 'git-rebase [--skip|--abort]'
 will automatically invoke this command.
 
 'diff'::
@@ -45,11 +45,11 @@ will automatically invoke this command.
 This displays diffs for the current state of the resolution.  It is
 useful for tracking what has changed while the user is resolving
 conflicts.  Additional arguments are passed directly to the system
-`diff` command installed in PATH.
+'diff' command installed in PATH.
 
 'status'::
 
-Like diff, but this only prints the filenames that will be tracked
+Like 'diff', but this only prints the filenames that will be tracked
 for resolutions.
 
 'gc'::
@@ -142,33 +142,33 @@ finally ready and merged into the master branch.  This merge
 would require you to resolve the conflict, introduced by the
 commits marked with `*`.  However, often this conflict is the
 same conflict you resolved when you created the test merge you
-blew away.  `git-rerere` command helps you to resolve this final
+blew away.  'git-rerere' command helps you to resolve this final
 conflicted merge using the information from your earlier hand
 resolve.
 
-Running the `git-rerere` command immediately after a conflicted
+Running the 'git-rerere' command immediately after a conflicted
 automerge records the conflicted working tree files, with the
 usual conflict markers `<<<<<<<`, `=======`, and `>>>>>>>` in
 them.  Later, after you are done resolving the conflicts,
-running `git-rerere` again records the resolved state of these
+running 'git-rerere' again records the resolved state of these
 files.  Suppose you did this when you created the test merge of
 master into the topic branch.
 
-Next time, running `git-rerere` after seeing a conflicted
+Next time, running 'git-rerere' after seeing a conflicted
 automerge, if the conflict is the same as the earlier one
 recorded, it is noticed and a three-way merge between the
 earlier conflicted automerge, the earlier manual resolution, and
 the current conflicted automerge is performed by the command.
 If this three-way merge resolves cleanly, the result is written
 out to your working tree file, so you would not have to manually
-resolve it.  Note that `git-rerere` leaves the index file alone,
+resolve it.  Note that 'git-rerere' leaves the index file alone,
 so you still need to do the final sanity checks with `git diff`
-(or `git diff -c`) and `git add` when you are satisfied.
+(or `git diff -c`) and 'git-add' when you are satisfied.
 
-As a convenience measure, `git-merge` automatically invokes
-`git-rerere` when it exits with a failed automerge, which
+As a convenience measure, 'git-merge' automatically invokes
+'git-rerere' when it exits with a failed automerge, which
 records it if it is a new conflict, or reuses the earlier hand
-resolve when it is not.  `git-commit` also invokes `git-rerere`
+resolve when it is not.  'git-commit' also invokes 'git-rerere'
 when recording a merge result.  What this means is that you do
 not have to do anything special yourself (Note: you still have
 to set the config variable rerere.enabled to enable this command).
@@ -178,8 +178,8 @@ resolution is recorded, and it will be reused when you do the
 actual merge later with updated master and topic branch, as long
 as the earlier resolution is still applicable.
 
-The information `git-rerere` records is also used when running
-`git-rebase`.  After blowing away the test merge and continuing
+The information 'git-rerere' records is also used when running
+'git-rebase'.  After blowing away the test merge and continuing
 development on the topic branch:
 
 ------------
@@ -198,7 +198,7 @@ you could run `git rebase master topic`, to keep yourself
 up-to-date even before your topic is ready to be sent upstream.
 This would result in falling back to three-way merge, and it
 would conflict the same way the test merge you resolved earlier.
-`git-rerere` is run by `git-rebase` to help you resolve this
+'git-rerere' is run by 'git-rebase' to help you resolve this
 conflict.
 
 
index dc05f58f1882ef5e8751da5a7e64747042dd3b32..c8d175768cc665533517952fc613279b42e47f18 100644 (file)
@@ -37,7 +37,7 @@ OPTIONS
 --soft::
        Does not touch the index file nor the working tree at all, but
        requires them to be in a good order. This leaves all your changed
-       files "Changes to be committed", as `git-status` would
+       files "Changes to be committed", as 'git-status' would
        put it.
 
 --hard::
index e7d736ffa4e1619778c93ff2eab3497f645ad7e5..fd1de92e34b459cdc89928e1561ee6934cd63c19 100644 (file)
@@ -83,11 +83,11 @@ between the two operands.  The following two commands are equivalent:
        $ git rev-list A...B
 -----------------------------------------------------------------------
 
-`git-rev-list` is a very essential git program, since it
+'git-rev-list' is a very essential git program, since it
 provides the ability to build and traverse commit ancestry graphs. For
 this reason, it has a lot of different options that enables it to be
-used by commands as different as `git-bisect` and
-`git-repack`.
+used by commands as different as 'git-bisect' and
+'git-repack'.
 
 OPTIONS
 -------
index 6825ae27c450225a7d6e0948797a606c32bbbe0d..088f971b790ddd11d39ab2c3b441833961e53a0f 100644 (file)
@@ -15,16 +15,16 @@ DESCRIPTION
 
 Many git porcelainish commands take mixture of flags
 (i.e. parameters that begin with a dash '-') and parameters
-meant for the underlying `git-rev-list` command they use internally
+meant for the underlying 'git-rev-list' command they use internally
 and flags and parameters for the other commands they use
-downstream of `git-rev-list`.  This command is used to
+downstream of 'git-rev-list'.  This command is used to
 distinguish between them.
 
 
 OPTIONS
 -------
 --parseopt::
-       Use `git-rev-parse` in option parsing mode (see PARSEOPT section below).
+       Use 'git-rev-parse' in option parsing mode (see PARSEOPT section below).
 
 --keep-dash-dash::
        Only meaningful in `--parseopt` mode. Tells the option parser to echo
@@ -32,11 +32,11 @@ OPTIONS
 
 --revs-only::
        Do not output flags and parameters not meant for
-       `git-rev-list` command.
+       'git-rev-list' command.
 
 --no-revs::
        Do not output flags and parameters meant for
-       `git-rev-list` command.
+       'git-rev-list' command.
 
 --flags::
        Do not output non-flag parameters.
@@ -64,7 +64,7 @@ OPTIONS
        properly quoted for consumption by shell.  Useful when
        you expect your parameter to contain whitespaces and
        newlines (e.g. when using pickaxe `-S` with
-       `git-diff-\*`).
+       'git-diff-\*').
 
 --not::
        When showing object names, prefix them with '{caret}' and
@@ -129,12 +129,12 @@ OPTIONS
 --since=datestring::
 --after=datestring::
        Parse the date string, and output the corresponding
-       --max-age= parameter for `git-rev-list`.
+       --max-age= parameter for 'git-rev-list'.
 
 --until=datestring::
 --before=datestring::
        Parse the date string, and output the corresponding
-       --min-age= parameter for `git-rev-list`.
+       --min-age= parameter for 'git-rev-list'.
 
 <args>...::
        Flags and parameters to be parsed.
@@ -155,7 +155,7 @@ blobs contained in a commit.
   name the same commit object if there are no other object in
   your repository whose object name starts with dae86e.
 
-* An output from `git-describe`; i.e. a closest tag, followed by a
+* An output from 'git-describe'; i.e. a closest tag, followed by a
   dash, a `g`, and an abbreviated object name.
 
 * A symbolic ref name.  E.g. 'master' typically means the commit
@@ -166,7 +166,7 @@ blobs contained in a commit.
   first match in the following rules:
 
   . if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
-    useful only for `HEAD`, `FETCH_HEAD` and `MERGE_HEAD`);
+    useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
 
   . otherwise, `$GIT_DIR/refs/<name>` if exists;
 
@@ -177,6 +177,16 @@ blobs contained in a commit.
   . otherwise, `$GIT_DIR/refs/remotes/<name>` if exists;
 
   . otherwise, `$GIT_DIR/refs/remotes/<name>/HEAD` if exists.
++
+HEAD names the commit your changes in the working tree is based on.
+FETCH_HEAD records the branch you fetched from a remote repository
+with your last 'git-fetch' invocation.
+ORIG_HEAD is created by commands that moves your HEAD in a drastic
+way, to record the position of the HEAD before their operation, so that
+you can change the tip of the branch back to the state before you ran
+them easily.
+MERGE_HEAD records the commit(s) you are merging into your branch
+when you run 'git-merge'.
 
 * A ref followed by the suffix '@' with a date specification
   enclosed in a brace
@@ -278,7 +288,7 @@ G   H   I   J
 SPECIFYING RANGES
 -----------------
 
-History traversing commands such as `git-log` operate on a set
+History traversing commands such as 'git-log' operate on a set
 of commits, not just a single commit.  To these commands,
 specifying a single revision with the notation described in the
 previous section means the set of commits reachable from that
@@ -289,10 +299,10 @@ notation is used.  E.g. "`{caret}r1 r2`" means commits reachable
 from `r2` but exclude the ones reachable from `r1`.
 
 This set operation appears so often that there is a shorthand
-for it.  "`r1..r2`" is equivalent to "`{caret}r1 r2`".  It is
-the difference of two sets (subtract the set of commits
-reachable from `r1` from the set of commits reachable from
-`r2`).
+for it.  When you have two commits `r1` and `r2` (named according
+to the syntax explained in SPECIFYING REVISIONS above), you can ask
+for commits that are reachable from r2 excluding those that are reachable
+from r1 by "`{caret}r1 r2`" and it can be written as "`r1..r2`".
 
 A similar notation "`r1\...r2`" is called symmetric difference
 of `r1` and `r2` and is defined as
@@ -301,9 +311,9 @@ It is the set of commits that are reachable from either one of
 `r1` or `r2` but not from both.
 
 Two other shorthands for naming a set that is formed by a commit
-and its parent commits exists.  `r1{caret}@` notation means all
+and its parent commits exist.  The `r1{caret}@` notation means all
 parents of `r1`.  `r1{caret}!` includes commit `r1` but excludes
-its all parents.
+all of its parents.
 
 Here are a handful of examples:
 
@@ -319,7 +329,7 @@ Here are a handful of examples:
 PARSEOPT
 --------
 
-In `--parseopt` mode, `git-rev-parse` helps massaging options to bring to shell
+In `--parseopt` mode, 'git-rev-parse' helps massaging options to bring to shell
 scripts the same facilities C builtins have. It works as an option normalizer
 (e.g. splits single switches aggregate values), a bit like `getopt(1)` does.
 
@@ -331,7 +341,7 @@ usage on the standard error stream, and exits with code 129.
 Input Format
 ~~~~~~~~~~~~
 
-`git-rev-parse --parseopt` input format is fully text based. It has two parts,
+'git-rev-parse --parseopt' input format is fully text based. It has two parts,
 separated by a line that contains only `--`. The lines before the separator
 (should be more than one) are used for the usage.
 The lines after the separator describe the options.
index 3d0c5aba93391ed6bb3ffcc9a3919450b3520395..5411edca96b50e28996357bf75ce4e32796ee620 100644 (file)
@@ -24,7 +24,7 @@ OPTIONS
 
 -e::
 --edit::
-       With this option, `git-revert` will let you edit the commit
+       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.
 
@@ -37,7 +37,7 @@ OPTIONS
        relative to the specified parent.
 
 --no-edit::
-       With this option, `git-revert` will not start the commit
+       With this option, 'git-revert' will not start the commit
        message editor.
 
 -n::
index 01b63be385fb72372126fb7877fd3bde050420d5..4d0c495bc3ecb5482165a46956efe73dfdc5ee72 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Remove files from the index, or from the working tree and the index.
-`git-rm` will not remove a file from just your working directory.
+'git-rm' will not remove a file from just your working directory.
 (There is no option to remove a file only from the work tree
 and yet keep it in the index; use `/bin/rm` if you want to do that.)
 The files being removed have to be identical to the tip of the branch,
@@ -63,7 +63,7 @@ OPTIONS
 
 -q::
 --quiet::
-       `git-rm` normally outputs one line (in the form of an "rm" command)
+       'git-rm' normally outputs one line (in the form of an "rm" command)
        for each file removed. This option suppresses that output.
 
 
index 410504df4630bb9fe5d6b2582f0e2c3a0d3ae150..399821832c2a5cd6a718a7dc37a87e6b5bc0b213 100644 (file)
@@ -12,17 +12,17 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Usually you would want to use `git-push`, which is a
+Usually you would want to use 'git-push', which is a
 higher-level wrapper of this command, instead. See linkgit:git-push[1].
 
-Invokes `git-receive-pack` on a possibly remote repository, and
+Invokes 'git-receive-pack' on a possibly remote repository, and
 updates it from the current repository, sending named refs.
 
 
 OPTIONS
 -------
 --receive-pack=<git-receive-pack>::
-       Path to the `git-receive-pack` program on the remote
+       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.
@@ -53,7 +53,7 @@ OPTIONS
 
 <host>::
        A remote host to house the repository.  When this
-       part is specified, `git-receive-pack` is invoked via
+       part is specified, 'git-receive-pack' is invoked via
        ssh.
 
 <directory>::
@@ -86,7 +86,7 @@ and the destination side (after the colon).  The ref to be
 pushed is determined by finding a match that matches the source
 side, and where it is pushed is determined by using the
 destination side. The rules used to match a ref are the same
-rules used by `git-rev-parse` to resolve a symbolic ref
+rules used by 'git-rev-parse' to resolve a symbolic ref
 name. See linkgit:git-rev-parse[1].
 
  - It is an error if <src> does not match exactly one of the
index 6731f9ac4cc15a757600375307e4a10e32f4424a..18f14b5be89b4e0240f59b13313308f3c09d012c 100644 (file)
@@ -16,7 +16,7 @@ This is not a command the end user would want to run.  Ever.
 This documentation is meant for people who are studying the
 Porcelain-ish scripts and/or are writing new ones.
 
-The `git-sh-setup` scriptlet is designed to be sourced (using
+The 'git-sh-setup' scriptlet is designed to be sourced (using
 `.`) by other shell scripts to set up some variables pointing at
 the normal git directories and a few helper shell functions.
 
index 9b2ae7f268c75298afc02de04c79d0ef65e12c9a..ff420f8f8c52eb598976a134916000da9b8f3976 100644 (file)
@@ -18,7 +18,7 @@ of server-side GIT commands implementing the pull/push functionality.
 The commands can be executed only by the '-c' option; the shell is not
 interactive.
 
-Currently, only the `git-receive-pack` and `git-upload-pack` commands
+Currently, only the 'git-receive-pack' and 'git-upload-pack' commands
 are permitted to be called, with a single required argument.
 
 Author
index 6e4cbc4fdd37758a7021675bd3e81aea620651cc..7ccf31ccc401fd35a0ed65667be001805436249b 100644 (file)
@@ -3,7 +3,7 @@ git-shortlog(1)
 
 NAME
 ----
-git-shortlog - Summarize 'git log' output
+git-shortlog - Summarize 'git-log' output
 
 SYNOPSIS
 --------
@@ -13,7 +13,7 @@ git shortlog [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[
 
 DESCRIPTION
 -----------
-Summarizes `git-log` output in a format suitable for inclusion
+Summarizes 'git-log' output in a format suitable for inclusion
 in release announcements. Each commit will be grouped by author and
 the first line of the commit message will be shown.
 
index 578bdb7850a1d661ccb85f9da71071106e6b3bff..14e10362b164379bb8fb7eb4e7925f916bea0c12 100644 (file)
@@ -75,7 +75,7 @@ OPTIONS
 
 --merge-base::
        Instead of showing the commit list, just act like the
-       `git-merge-base -a` command, except that it can accept
+       'git-merge-base -a' command, except that it can accept
        more than two heads.
 
 --independent::
index 4ae6ede11eb132e2311ee90a9f206789fc8d6de4..e3285aacfd310cc269cdb03aa9243c939c24def7 100644 (file)
@@ -14,10 +14,10 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Reads given idx file for packed git archive created with
-`git-pack-objects` command, and dumps its contents.
+'git-pack-objects' command, and dumps its contents.
 
 The information it outputs is subset of what you can get from
-`git-verify-pack -v`; this command only shows the packfile
+'git-verify-pack -v'; this command only shows the packfile
 offset and SHA1 of each object.
 
 
index a78a7dcf7a277b44c922b880497c0909301449f9..9a4389981ca067633d773e28393a1d72ac6552ae 100644 (file)
@@ -74,7 +74,7 @@ OPTIONS
 --exclude-existing::
 --exclude-existing=pattern::
 
-       Make `git-show-ref` act as a filter that reads refs from stdin of the
+       Make 'git-show-ref' act as a filter that reads refs from stdin of the
        form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
        following actions on each:
        (1) strip "^{}" at the end of line if any;
@@ -137,7 +137,7 @@ When using the '--verify' flag, the command requires an exact path:
 
 will only match the exact branch called "master".
 
-If nothing matches, `git-show-ref` will return an error code of 1,
+If nothing matches, 'git-show-ref' will return an error code of 1,
 and in the case of verification, it will show an error message.
 
 For scripting, you can ask it to be quiet with the "--quiet" flag, which
index 70b54aec2f56111e4ca79b9bb8f40cff19ed19e6..e0b52bcb3732c4d3d320010f9af07f40bdff49bc 100644 (file)
@@ -16,16 +16,16 @@ Shows one or more objects (blobs, trees, tags and commits).
 
 For commits it shows the log message and textual diff. It also
 presents the merge commit in a special format as produced by
-`git-diff-tree --cc`.
+'git-diff-tree --cc'.
 
 For tags, it shows the tag message and the referenced objects.
 
-For trees, it shows the names (equivalent to `git-ls-tree`
+For trees, it shows the names (equivalent to 'git-ls-tree'
 with \--name-only).
 
 For plain blobs, it shows the plain contents.
 
-The command takes options applicable to the `git-diff-tree` command to
+The command takes options applicable to the 'git-diff-tree' command to
 control how the changes the commit introduces are shown.
 
 This manual page describes only the most frequently used options.
index a4cbd0ce60e73b4e1ec9ffadfaeee132f7ea054b..7d50d74cc9a945f0dd82b0c26509bf0392eff837 100644 (file)
@@ -39,12 +39,15 @@ is also possible).
 OPTIONS
 -------
 
-save [<message>]::
+save [--keep-index] [<message>]::
 
        Save your local modifications to a new 'stash', and run `git reset
        --hard` to revert them.  This is the default action when no
        subcommand is given. The <message> part is optional and gives
        the description along with the stashed state.
++
+If the `--keep-index` option is used, all changes already added to the
+index are left intact.
 
 list [<options>]::
 
@@ -59,7 +62,7 @@ stash@{0}: WIP on submit: 6ebd0e2... Update git-stash documentation
 stash@{1}: On master: 9cc0589... Add git-stash
 ----------------------------------------------------------------
 +
-The command takes options applicable to the `git-log`
+The command takes options applicable to the 'git-log'
 command to control what is shown and how. See linkgit:git-log[1].
 
 show [<stash>]::
@@ -67,7 +70,7 @@ show [<stash>]::
        Show the changes recorded in the stash as a diff between the
        stashed state and its original parent. When no `<stash>` is given,
        shows the latest one. By default, the command shows the diffstat, but
-       it will accept any format known to `git-diff` (e.g., `git stash show
+       it will accept any format known to 'git-diff' (e.g., `git stash show
        -p stash@\{1}` to view the second most recent stash in patch form).
 
 apply [--index] [<stash>]::
@@ -175,7 +178,7 @@ $ git reset --soft HEAD^
 ... continue hacking ...
 ----------------------------------------------------------------
 +
-You can use `git-stash` to simplify the above, like this:
+You can use 'git-stash' to simplify the above, like this:
 +
 ----------------------------------------------------------------
 ... hack hack hack ...
@@ -186,6 +189,24 @@ $ git stash apply
 ... continue hacking ...
 ----------------------------------------------------------------
 
+Testing partial commits::
+
+You can use `git stash save --keep-index` when you want to make two or
+more commits out of the changes in the work tree, and you want to test
+each change before committing:
++
+----------------------------------------------------------------
+... hack hack hack ...
+$ git add --patch foo            # add just first part to the index
+$ git stash save --keep-index    # save all other changes to the stash
+$ edit/build/test first part
+$ git commit foo -m 'First part' # commit fully tested change
+$ git stash pop                  # prepare to work on all other changes
+... repeat above five steps until one commit remains ...
+$ edit/build/test remaining parts
+$ git commit foo -m 'Remaining parts'
+----------------------------------------------------------------
+
 SEE ALSO
 --------
 linkgit:git-checkout[1],
index c9d4a046c70bea973612d002c997fbdba9aa3aa6..57b7498239287779e7bae92bb09a0bb9eb0eed76 100644 (file)
@@ -17,12 +17,12 @@ current HEAD commit, paths that have differences between the working
 tree and the index file, and paths in the working tree that are not
 tracked by git (and are not ignored by linkgit:gitignore[5]). The first
 are what you _would_ commit by running `git commit`; the second and
-third are what you _could_ commit by running `git-add` before running
+third are what you _could_ commit by running 'git-add' before running
 `git commit`.
 
-The command takes the same set of options as `git-commit`; it
+The command takes the same set of options as 'git-commit'; it
 shows what would be committed if the same options are given to
-`git-commit`.
+'git-commit'.
 
 If there is no path that is different between the index file and
 the current HEAD commit (i.e., there is nothing to commit by running
index 9c4052c58af776feb8a0702596d40d448e640406..105fc2dcdceb454a7a45e7d4c92f2fd43f44c6c7 100644 (file)
@@ -32,11 +32,11 @@ add::
 status::
        Show the status of the submodules. This will print the SHA-1 of the
        currently checked out commit for each submodule, along with the
-       submodule path and the output of `git-describe` for the
+       submodule path and the output of 'git-describe' for the
        SHA-1. Each SHA-1 will be prefixed with `-` if the submodule is not
        initialized and `+` if the currently checked out submodule commit
        does not match the SHA-1 found in the index of the containing
-       repository. This command is the default command for `git-submodule`.
+       repository. This command is the default command for 'git-submodule'.
 
 init::
        Initialize the submodules, i.e. register in .git/config each submodule
index 6caa130611d335d2cdefc75680554e23490313c7..e7c0f1c959d39739e177096875dd8aac5fd185d9 100644 (file)
@@ -11,17 +11,17 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-`git-svn` is a simple conduit for changesets between Subversion and git.
+'git-svn' is a simple conduit for changesets between Subversion and git.
 It is not to be confused with linkgit:git-svnimport[1], which is
 read-only.
 
-`git-svn` was originally designed for an individual developer who wants a
+'git-svn' was originally designed for an individual developer who wants a
 bidirectional flow of changesets between a single branch in Subversion
 and an arbitrary number of branches in git.  Since its inception,
-`git-svn` has gained the ability to track multiple branches in a manner
-similar to `git-svnimport`.
+'git-svn' has gained the ability to track multiple branches in a manner
+similar to 'git-svnimport'.
 
-`git-svn` is especially useful when it comes to tracking repositories
+'git-svn' is especially useful when it comes to tracking repositories
 not organized in the way Subversion developers recommend (trunk,
 branches, tags directories).
 
@@ -31,7 +31,7 @@ COMMANDS
 
 'init'::
        Initializes an empty git repository with additional
-       metadata directories for `git-svn`.  The Subversion URL
+       metadata directories for 'git-svn'.  The Subversion URL
        may be specified as a command-line argument, or as full
        URL arguments to -T/-t/-b.  Optionally, the target
        directory to operate on can be specified as a second
@@ -107,20 +107,20 @@ COMMANDS
        This fetches revisions from the SVN parent of the current HEAD
        and rebases the current (uncommitted to SVN) work against it.
 
-This works similarly to `svn update` or `git-pull` except that
-it preserves linear history with `git-rebase` instead of
-`git-merge` for ease of dcommiting with `git-svn`.
+This works similarly to `svn update` or 'git-pull' except that
+it preserves linear history with 'git-rebase' instead of
+'git-merge' for ease of dcommiting with 'git-svn'.
 
-This accepts all options that `git-svn fetch` and `git-rebase`
+This accepts all options that 'git-svn fetch' and 'git-rebase'
 accept.  However, '--fetch-all' only fetches from the current
 [svn-remote], and not all [svn-remote] definitions.
 
-Like `git-rebase`; this requires that the working tree be clean
+Like 'git-rebase'; this requires that the working tree be clean
 and have no uncommitted changes.
 
 -l;;
 --local;;
-       Do not fetch remotely; only run `git-rebase` against the
+       Do not fetch remotely; only run 'git-rebase' against the
        last fetched commit from the upstream SVN.
 
 'dcommit'::
@@ -128,7 +128,7 @@ and have no uncommitted changes.
        repository, and then rebase or reset (depending on whether or
        not there is a diff between SVN and head).  This will create
        a revision in SVN for each commit in git.
-       It is recommended that you run `git-svn` fetch and rebase (not
+       It is recommended that you run 'git-svn' fetch and rebase (not
        pull or merge) your commits against the latest changes in the
        SVN repository.
        An optional command-line argument may be specified as an
@@ -173,7 +173,7 @@ NOTE: SVN itself only stores times in UTC and nothing else. The regular svn
 client converts the UTC time to the local time (or based on the TZ=
 environment). This command has the same behaviour.
 +
-Any other arguments are passed directly to `git-log`
+Any other arguments are passed directly to 'git-log'
 
 'blame'::
        Show what revision and author last modified each line of a file. The
@@ -181,10 +181,10 @@ Any other arguments are passed directly to `git-log`
        `svn blame' by default. Like the SVN blame command,
        local uncommitted changes in the working copy are ignored;
        the version of the file in the HEAD revision is annotated. Unknown
-       arguments are passed directly to `git-blame`.
+       arguments are passed directly to 'git-blame'.
 +
 --git-format;;
-       Produce output in the same format as `git-blame`, but with
+       Produce output in the same format as 'git-blame', but with
        SVN revision numbers instead of git commit hashes. In this mode,
        changes that haven't been committed to SVN (including local
        working-copy edits) are shown as revision 0.
@@ -203,7 +203,7 @@ Any other arguments are passed directly to `git-log`
        absolutely no attempts to do patching when committing to SVN, it
        simply overwrites files with those specified in the tree or
        commit.  All merging is assumed to have taken place
-       independently of `git-svn` functions.
+       independently of 'git-svn' functions.
 
 'create-ignore'::
        Recursively finds the svn:ignore property on directories and
@@ -219,12 +219,12 @@ Any other arguments are passed directly to `git-log`
 'commit-diff'::
        Commits the diff of two tree-ish arguments from the
        command-line.  This command is intended for interoperability with
-       `git-svnimport` and does not rely on being inside an `git-svn
+       'git-svnimport' and does not rely on being inside an `git-svn
        init`-ed repository.  This command takes three arguments, (a) the
        original tree to diff against, (b) the new tree result, (c) the
        URL of the target Subversion repository.  The final argument
-       (URL) may be omitted if you are working from a `git-svn`-aware
-       repository (that has been `init`-ed with `git-svn`).
+       (URL) may be omitted if you are working from a 'git-svn'-aware
+       repository (that has been `init`-ed with 'git-svn').
        The -r<revision> option is required for this.
 
 'info'::
@@ -255,7 +255,7 @@ OPTIONS
 --shared[={false|true|umask|group|all|world|everybody}]::
 --template=<template_directory>::
        Only used with the 'init' command.
-       These are passed directly to `git-init`.
+       These are passed directly to 'git-init'.
 
 -r <ARG>::
 --revision <ARG>::
@@ -277,7 +277,7 @@ Only used with the 'set-tree' command.
 
 Read a list of commits from stdin and commit them in reverse
 order.  Only the leading sha1 is read from each line, so
-`git-rev-list --pretty=oneline` output can be used.
+'git-rev-list --pretty=oneline' output can be used.
 
 --rmdir::
 
@@ -307,7 +307,7 @@ config key: svn.edit
 
 Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
 
-They are both passed directly to `git-diff-tree`; see
+They are both passed directly to 'git-diff-tree'; see
 linkgit:git-diff-tree[1] for more information.
 
 [verse]
@@ -317,24 +317,24 @@ config key: svn.findcopiesharder
 -A<filename>::
 --authors-file=<filename>::
 
-Syntax is compatible with the files used by `git-svnimport` and
-`git-cvsimport`:
+Syntax is compatible with the files used by 'git-svnimport' and
+'git-cvsimport':
 
 ------------------------------------------------------------------------
        loginname = Joe User <user@example.com>
 ------------------------------------------------------------------------
 
-If this option is specified and `git-svn` encounters an SVN
-committer name that does not exist in the authors-file, `git-svn`
+If this option is specified and 'git-svn' encounters an SVN
+committer name that does not exist in the authors-file, 'git-svn'
 will abort operation. The user will then have to add the
-appropriate entry.  Re-running the previous `git-svn` command
+appropriate entry.  Re-running the previous 'git-svn' command
 after the authors-file is modified should continue operation.
 
 config key: svn.authorsfile
 
 -q::
 --quiet::
-       Make `git-svn` less verbose.
+       Make 'git-svn' less verbose.
 
 --repack[=<n>]::
 --repack-flags=<flags>::
@@ -346,7 +346,7 @@ with many revisions.
 to fetch before repacking.  This defaults to repacking every
 1000 commits fetched if no argument is specified.
 
---repack-flags are passed directly to `git-repack`.
+--repack-flags are passed directly to 'git-repack'.
 
 [verse]
 config key: svn.repack
@@ -359,8 +359,8 @@ config key: svn.repackflags
 
 These are only used with the 'dcommit' and 'rebase' commands.
 
-Passed directly to `git-rebase` when using 'dcommit' if a
-`git-reset` cannot be used (see 'dcommit').
+Passed directly to 'git-rebase' when using 'dcommit' if a
+'git-reset' cannot be used (see 'dcommit').
 
 -n::
 --dry-run::
@@ -413,18 +413,18 @@ svn-remote.<name>.noMetadata::
 
 This gets rid of the 'git-svn-id:' lines at the end of every commit.
 
-If you lose your .git/svn/git-svn/.rev_db file, `git-svn` will not
+If you lose your .git/svn/git-svn/.rev_db file, 'git-svn' will not
 be able to rebuild it and you won't be able to fetch again,
 either.  This is fine for one-shot imports.
 
-The `git-svn log` command will not work on repositories using
+The 'git-svn log' command will not work on repositories using
 this, either.  Using this conflicts with the 'useSvmProps'
 option for (hopefully) obvious reasons.
 
 svn.useSvmProps::
 svn-remote.<name>.useSvmProps::
 
-This allows `git-svn` to re-map repository URLs and UUIDs from
+This allows 'git-svn' to re-map repository URLs and UUIDs from
 mirrors created using SVN::Mirror (or svk) for metadata.
 
 If an SVN revision has a property, "svm:headrev", it is likely
@@ -443,7 +443,7 @@ svn-remote.<name>.useSvnsyncprops::
 
 svn-remote.<name>.rewriteRoot::
        This allows users to create repositories from alternate
-       URLs.  For example, an administrator could run `git-svn` on the
+       URLs.  For example, an administrator could run 'git-svn' on the
        server locally (accessing via file://) but wish to distribute
        the repository with a public http:// or svn:// URL in the
        metadata so users of it will see the public URL.
@@ -451,7 +451,7 @@ svn-remote.<name>.rewriteRoot::
 --
 
 Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
-options all affect the metadata generated and used by `git-svn`; they
+options all affect the metadata generated and used by 'git-svn'; they
 *must* be set in the configuration file before any history is imported
 and these settings should never be changed once they are set.
 
@@ -498,12 +498,12 @@ Tracking and contributing to an entire Subversion-managed project
 # of dcommit/rebase/show-ignore should be the same as above.
 ------------------------------------------------------------------------
 
-The initial `git-svn clone` can be quite time-consuming
+The initial 'git-svn clone' can be quite time-consuming
 (especially for large Subversion repositories). If multiple
 people (or one person with multiple machines) want to use
-`git-svn` to interact with the same Subversion repository, you can
-do the initial `git-svn clone` to a repository on a server and
-have each person clone that repository with `git-clone`:
+'git-svn' to interact with the same Subversion repository, you can
+do the initial 'git-svn clone' to a repository on a server and
+have each person clone that repository with 'git-clone':
 
 ------------------------------------------------------------------------
 # Do the initial import on a server
@@ -524,7 +524,7 @@ have each person clone that repository with `git-clone`:
 REBASE VS. PULL/MERGE
 ---------------------
 
-Originally, `git-svn` recommended that the 'remotes/git-svn' branch be
+Originally, 'git-svn' recommended that the 'remotes/git-svn' branch be
 pulled or merged from.  This is because the author favored
 `git svn set-tree B` to commit a single head rather than the
 `git svn set-tree A..B` notation to commit multiple commits.
@@ -539,7 +539,7 @@ previous commits in SVN.
 DESIGN PHILOSOPHY
 -----------------
 Merge tracking in Subversion is lacking and doing branched development
-with Subversion can be cumbersome as a result.  While `git-svn` can track
+with Subversion can be cumbersome as a result.  While 'git-svn' can track
 copy history (including branches and tags) for repositories adopting a
 standard layout, it cannot yet represent merge history that happened
 inside git back upstream to SVN users.  Therefore it is advised that
@@ -550,25 +550,25 @@ CAVEATS
 -------
 
 For the sake of simplicity and interoperating with a less-capable system
-(SVN), it is recommended that all `git-svn` users clone, fetch and dcommit
-directly from the SVN server, and avoid all `git-clone`/`pull`/`merge`/`push`
+(SVN), it is recommended that all 'git-svn' users clone, fetch and dcommit
+directly from the SVN server, and avoid all 'git-clone'/'pull'/'merge'/'push'
 operations between git repositories and branches.  The recommended
 method of exchanging code between git branches and users is
-`git-format-patch` and `git-am`, or just 'dcommit'ing to the SVN repository.
+'git-format-patch' and 'git-am', or just 'dcommit'ing to the SVN repository.
 
-Running `git-merge` or `git-pull` is NOT recommended on a branch you
+Running 'git-merge' or 'git-pull' is NOT recommended on a branch you
 plan to 'dcommit' from.  Subversion does not represent merges in any
 reasonable or useful fashion; so users using Subversion cannot see any
 merges you've made.  Furthermore, if you merge or pull from a git branch
 that is a mirror of an SVN branch, 'dcommit' may commit to the wrong
 branch.
 
-`git-clone` does not clone branches under the refs/remotes/ hierarchy or
-any `git-svn` metadata, or config.  So repositories created and managed with
-using `git-svn` should use `rsync` for cloning, if cloning is to be done
+'git-clone' does not clone branches under the refs/remotes/ hierarchy or
+any 'git-svn' metadata, or config.  So repositories created and managed with
+using 'git-svn' should use 'rsync' for cloning, if cloning is to be done
 at all.
 
-Since 'dcommit' uses rebase internally, any git branches you `git-push` to
+Since 'dcommit' uses rebase internally, any git branches you 'git-push' to
 before 'dcommit' on will require forcing an overwrite of the existing ref
 on the remote repository.  This is generally considered bad practice,
 see the linkgit:git-push[1] documentation for details.
@@ -594,7 +594,7 @@ for git to detect them.
 CONFIGURATION
 -------------
 
-`git-svn` stores [svn-remote] configuration information in the
+'git-svn' stores [svn-remote] configuration information in the
 repository .git/config file.  It is similar the core git
 [remote] sections except 'fetch' keys do not accept glob
 arguments; but they are instead handled by the 'branches'
@@ -615,7 +615,7 @@ Keep in mind that the '*' (asterisk) wildcard of the local ref
 however the remote wildcard may be anywhere as long as it's own
 independent path component (surrounded by '/' or EOL).   This
 type of configuration is not automatically created by 'init' and
-should be manually entered with a text-editor or using `git-config`.
+should be manually entered with a text-editor or using 'git-config'.
 
 SEE ALSO
 --------
index a4962413d39c3aea500abf226409536581c89ccc..6266e6f6589388571d981153500ee52c55e9870d 100644 (file)
@@ -49,7 +49,7 @@ cumbersome.  On some platforms, `ln -sf` does not even work as
 advertised (horrors).  Therefore symbolic links are now deprecated
 and symbolic refs are used by default.
 
-`git-symbolic-ref` will exit with status 0 if the contents of the
+'git-symbolic-ref' will exit with status 0 if the contents of the
 symbolic ref were printed correctly, with status 1 if the requested
 name is not a symbolic ref, or 128 if another error occurs.
 
index 1db98e2d0d1e342ebce647b1c05da710a055bf34..b605e6caa2a9510ffd0825d6f721b881f1826863 100644 (file)
@@ -82,7 +82,7 @@ OPTIONS
 
 CONFIGURATION
 -------------
-By default, `git-tag` in sign-with-default mode (-s) will use your
+By default, 'git-tag' in sign-with-default mode (-s) will use your
 committer identity (of the form "Your Name <your@email.address>") to
 find a key.  If you want to use a different default key, you can specify
 it in the repository configuration as follows:
@@ -118,12 +118,12 @@ and be done with it.
 
 . The insane thing.
 You really want to call the new version "X" too, 'even though'
-others have already seen the old one. So just use `git-tag -f`
+others have already seen the old one. So just use 'git-tag -f'
 again, as if you hadn't already published the old one.
 
 However, Git does *not* (and it should not) change tags behind
 users back. So if somebody already got the old tag, doing a
-`git-pull` on your tree shouldn't just make them overwrite the old
+'git-pull' on your tree shouldn't just make them overwrite the old
 one.
 
 If somebody got a release tag from you, you cannot just change
@@ -177,7 +177,7 @@ private anchor point tags from the other person.
 
 You would notice "please pull" messages on the mailing list says
 repo URL and branch name alone.  This is designed to be easily
-cut&pasted to a `git-fetch` command line:
+cut&pasted to a 'git-fetch' command line:
 
 ------------
 Linus, please pull from
index b3097aa79cda0346cc83d0dc9a2db2fa2ca47276..a5d9558dd1eabd71e838026721d707c5f1ecc369 100644 (file)
@@ -12,19 +12,19 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-THIS COMMAND IS DEPRECATED.  Use `git-archive` with `--format=tar`
+THIS COMMAND IS DEPRECATED.  Use 'git-archive' with `--format=tar`
 option instead (and move the <base> argument to `--prefix=base/`).
 
 Creates a tar archive containing the tree structure for the named tree.
 When <base> is specified it is added as a leading path to the files in the
 generated tar archive.
 
-`git-tar-tree` behaves differently when given a tree ID versus when given
+'git-tar-tree' behaves differently when given a tree ID versus when given
 a commit ID or tag ID.  In the first case the current time is used as
 modification time of each file in the archive.  In the latter case the
 commit time as recorded in the referenced commit object is used instead.
 Additionally the commit ID is stored in a global extended pax header.
-It can be extracted using `git-get-tar-commit-id`.
+It can be extracted using 'git-get-tar-commit-id'.
 
 OPTIONS
 -------
index 999e9a7c84b22cb5fde3369245bd1570cc82d062..a91fd214d2246b6fbf20543a8d285f619ecd7e58 100644 (file)
@@ -31,7 +31,7 @@ cleared.
 See also linkgit:git-add[1] for a more user-friendly way to do some of
 the most common operations on the index.
 
-The way `git-update-index` handles files it is told about can be modified
+The way 'git-update-index' handles files it is told about can be modified
 using the various options:
 
 OPTIONS
@@ -53,7 +53,7 @@ OPTIONS
 -q::
         Quiet.  If --refresh finds that the index needs an update, the
         default behavior is to error out.  This option makes
-       `git-update-index` continue anyway.
+       'git-update-index' continue anyway.
 
 --ignore-submodules:
        Do not try to update submodules.  This option is only respected
@@ -61,7 +61,7 @@ OPTIONS
 
 --unmerged::
         If --refresh finds unmerged changes in the index, the default
-       behavior is to error out.  This option makes `git-update-index`
+       behavior is to error out.  This option makes 'git-update-index'
         continue anyway.
 
 --ignore-missing::
@@ -91,7 +91,7 @@ OPTIONS
 
 -g::
 --again::
-       Runs `git-update-index` itself on the paths whose index
+       Runs 'git-update-index' itself on the paths whose index
        entries are different from those from the `HEAD` commit.
 
 --unresolve::
@@ -109,7 +109,7 @@ OPTIONS
 
 --replace::
        By default, when a file `path` exists in the index,
-       `git-update-index` refuses an attempt to add `path/file`.
+       'git-update-index' refuses an attempt to add `path/file`.
        Similarly if a file `path/file` exists, a file `path`
        cannot be added.  With --replace flag, existing entries
        that conflicts with the entry being added are
@@ -145,7 +145,7 @@ up-to-date for mode/content changes. But what it *does* do is to
 can refresh the index for a file that hasn't been changed but where
 the stat entry is out of date.
 
-For example, you'd want to do this after doing a `git-read-tree`, to link
+For example, you'd want to do this after doing a 'git-read-tree', to link
 up the stat index details with the proper files.
 
 Using --cacheinfo or --info-only
@@ -186,13 +186,13 @@ back on 3-way merge.
 
     . mode SP type SP sha1          TAB path
 +
-The second format is to stuff `git-ls-tree` output
+The second format is to stuff 'git-ls-tree' output
 into the index file.
 
     . mode         SP sha1 SP stage TAB path
 +
 This format is to put higher order stages into the
-index file and matches `git-ls-files --stage` output.
+index file and matches 'git-ls-files --stage' output.
 
 To place a higher stage entry to the index, the path should
 first be removed by feeding a mode=0 entry for the path, and
@@ -249,8 +249,8 @@ option.  To unset, use `--no-assume-unchanged`.
 The command looks at `core.ignorestat` configuration variable.  When
 this is true, paths updated with `git update-index paths...` and
 paths updated with other git commands that update both index and
-working tree (e.g. `git-apply --index`, `git-checkout-index -u`,
-and `git-read-tree -u`) are automatically marked as "assume
+working tree (e.g. 'git-apply --index', 'git-checkout-index -u',
+and 'git-read-tree -u') are automatically marked as "assume
 unchanged".  Note that "assume unchanged" bit is *not* set if
 `git update-index --refresh` finds the working tree file matches
 the index (use `git update-index --really-refresh` if you want
@@ -303,7 +303,7 @@ unreliable, this should be set to 'false' (see linkgit:git-config[1]).
 This causes the command to ignore differences in file modes recorded
 in the index and the file mode on the filesystem if they differ only on
 executable bit.   On such an unfortunate filesystem, you may
-need to use `git-update-index --chmod=`.
+need to use 'git-update-index --chmod='.
 
 Quite similarly, if `core.symlinks` configuration variable is set
 to 'false' (see linkgit:git-config[1]), symbolic links are checked out
index 526e5bdd22bed5fef12c9b27dfe41011d264a3fa..bbd7617587084b0c66fd8e0b9f623cac50be2c03 100644 (file)
@@ -16,7 +16,7 @@ Invoked by 'git-archive --remote' and sends a generated archive to the
 other end over the git protocol.
 
 This command is usually not invoked directly by the end user.  The UI
-for the protocol is on the `git-archive` side, and the program pair
+for the protocol is on the 'git-archive' side, and the program pair
 is meant to be used to get an archive from a remote repository.
 
 OPTIONS
index 52724d4c659438156393164c56db290f1daa8f89..b8e49dce4a19a4d7083459468f27c273c1d91fea 100644 (file)
@@ -12,13 +12,13 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Invoked by `git-fetch-pack`, learns what
+Invoked by 'git-fetch-pack', learns what
 objects the other side is missing, and sends them after packing.
 
 This command is usually not invoked directly by the end user.
-The UI for the protocol is on the `git-fetch-pack` side, and the
+The UI for the protocol is on the 'git-fetch-pack' side, and the
 program pair is meant to be used to pull updates from a remote
-repository.  For push operations, see `git-send-pack`.
+repository.  For push operations, see 'git-send-pack'.
 
 
 OPTIONS
index 10d1e19cc051364f5ad1e7d830211864f5e735ce..3647dd6c8f9c74a688f7a143119386ba89a8f13d 100644 (file)
@@ -20,7 +20,7 @@ OPTIONS
        Cause the logical variables to be listed. In addition, all the
        variables of the git configuration file .git/config are listed
        as well. (However, the configuration variables listing functionality
-       is deprecated in favor of `git-config -l`.)
+       is deprecated in favor of 'git-config -l'.)
 
 EXAMPLE
 --------
index 4d95c6c8914d6db7d4ea3de4a25fff17ed887582..53a9ce308541c73b6a0fc880d699ed7bed1817cb 100644 (file)
@@ -14,7 +14,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Reads given idx file for packed git archive created with the
-`git-pack-objects` command and verifies idx file and the
+'git-pack-objects' command and verifies idx file and the
 corresponding pack file.
 
 OPTIONS
index de4a89a105dbed30366cb7604b3174dd4d32926b..ba837df4bc66e2b828fcd49c94f35957c27322df 100644 (file)
@@ -11,7 +11,7 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Validates the gpg signature created by `git-tag`.
+Validates the gpg signature created by 'git-tag'.
 
 OPTIONS
 -------
index fefa6fd38bbebc6304f35aef37654b663de28a31..36afad8d4e0d67a8d9dd33d3bc590789e9f6604d 100644 (file)
@@ -61,7 +61,7 @@ browser.<tool>.path
 You can explicitly provide a full path to your preferred browser by
 setting the configuration variable 'browser.<tool>.path'. For example,
 you can configure the absolute path to firefox by setting
-'browser.firefox.path'. Otherwise, `git-web--browse` assumes the tool
+'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
 is available in PATH.
 
 browser.<tool>.cmd
@@ -70,7 +70,7 @@ browser.<tool>.cmd
 When the browser, specified by options or configuration variables, is
 not among the supported ones, then the corresponding
 'browser.<tool>.cmd' configuration variable will be looked up. If this
-variable exists then `git-web--browse` will treat the specified tool
+variable exists then 'git-web--browse' will treat the specified tool
 as a custom command and will use a shell eval to run the command with
 the URLs passed as arguments.
 
@@ -112,7 +112,7 @@ See linkgit:git-config[1] for more information about this.
 Author
 ------
 Written by Christian Couder <chriscool@tuxfamily.org> and the git-list
-<git@vger.kernel.org>, based on `git-mergetool` by Theodore Y. Ts'o.
+<git@vger.kernel.org>, based on 'git-mergetool' by Theodore Y. Ts'o.
 
 Documentation
 -------------
index 3b0ea2c591941b9de3f0166f6a27c52c9b62961d..d7fad1532936d909f9daf59f209e9c59c17c74c5 100644 (file)
@@ -13,8 +13,8 @@ SYNOPSIS
 DESCRIPTION
 -----------
 Shows commit logs and diff output each commit introduces.  The
-command internally invokes `git-rev-list` piped to
-`git-diff-tree`, and takes command line options for both of
+command internally invokes 'git-rev-list' piped to
+'git-diff-tree', and takes command line options for both of
 these commands.
 
 This manual page describes only the most frequently used options.
index 19d979bcc7952c2960053ee0c884d05a5dd64ecf..26d3850e7317c22dcf0999e0c4a6afe9a5ea2e03 100644 (file)
@@ -16,17 +16,17 @@ Creates a tree object using the current index.
 
 The index must be in a fully merged state.
 
-Conceptually, `git-write-tree` sync()s the current index contents
+Conceptually, 'git-write-tree' sync()s the current index contents
 into a set of tree files.
 In order to have that match what is actually in your directory right
-now, you need to have done a `git-update-index` phase before you did the
-`git-write-tree`.
+now, you need to have done a 'git-update-index' phase before you did the
+'git-write-tree'.
 
 
 OPTIONS
 -------
 --missing-ok::
-       Normally `git-write-tree` ensures that the objects referenced by the
+       Normally 'git-write-tree' ensures that the objects referenced by the
        directory exist in the object database.  This option disables this
        check.
 
index 22702c260c6aaed53dd29e2b33bb40ae1b2b5faa..4ecdc9f876143bc23197ef7361576f995cd998fb 100644 (file)
@@ -43,9 +43,10 @@ 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.1/git.html[documentation for release 1.5.6.1]
+* link:v1.5.6.2/git.html[documentation for release 1.5.6.2]
 
 * release notes for
+  link:RelNotes-1.5.6.2.txt[1.5.6.2].
   link:RelNotes-1.5.6.1.txt[1.5.6.1].
   link:RelNotes-1.5.6.txt[1.5.6].
 
@@ -135,13 +136,13 @@ OPTIONS
 +
 Other options are available to control how the manual page is
 displayed. See linkgit:git-help[1] for more information,
-because 'git --help ...' is converted internally into 'git
-help ...'.
+because `git --help ...` is converted internally into `git
+help ...`.
 
 --exec-path::
        Path to wherever your core git programs are installed.
        This can also be controlled by setting the GIT_EXEC_PATH
-       environment variable. If no path is given 'git' will print
+       environment variable. If no path is given, 'git' will print
        the current setting and then exit.
 
 -p::
@@ -426,6 +427,14 @@ git so take care if using Cogito etc.
        This can also be controlled by the '--work-tree' command line
        option and the core.worktree configuration variable.
 
+'GIT_CEILING_DIRECTORIES'::
+       This should be a colon-separated list of absolute paths.
+       If set, it is a list of directories that git should not chdir
+       up into while looking for a repository directory.
+       It will not exclude the current working directory or
+       a GIT_DIR set on the command line or in the environment.
+       (Useful for excluding slow-loading network directories.)
+
 git Commits
 ~~~~~~~~~~~
 'GIT_AUTHOR_NAME'::
@@ -483,9 +492,9 @@ other
        a pager.
 
 'GIT_SSH'::
-       If this environment variable is set then `git-fetch`
-       and `git-push` will use this command instead
-       of `ssh` when they need to connect to a remote system.
+       If this environment variable is set then 'git-fetch'
+       and 'git-push' will use this command instead
+       of 'ssh' when they need to connect to a remote system.
        The '$GIT_SSH' command will be given exactly two arguments:
        the 'username@host' (or just 'host') from the URL and the
        shell command to execute on that remote system.
@@ -500,8 +509,8 @@ for further details.
 
 'GIT_FLUSH'::
        If this environment variable is set to "1", then commands such
-       as `git-blame` (in incremental mode), `git-rev-list`, `git-log`,
-       and `git-whatchanged` will force a flush of the output stream
+       as 'git-blame' (in incremental mode), 'git-rev-list', 'git-log',
+       and 'git-whatchanged' will force a flush of the output stream
        after each commit-oriented record have been flushed.   If this
        variable is set to "0", the output of these commands will be done
        using completely buffered I/O.   If this environment variable is
@@ -591,7 +600,7 @@ contributors on the git-list <git@vger.kernel.org>.
 SEE ALSO
 --------
 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
-linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
+linkgit:everyday[7], linkgit:gitcvs-migration[7],
 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual]
 
index 124170a967e676214c27de03f0af308c39f6c756..d7b41142d2c843bc5460f03c73c609b1c53ff4a6 100644 (file)
@@ -87,9 +87,9 @@ Checking-out and checking-in
 
 These attributes affect how the contents stored in the
 repository are copied to the working tree files when commands
-such as `git-checkout` and `git-merge` run.  They also affect how
+such as 'git-checkout' and 'git-merge' run.  They also affect how
 git stores the contents you prepare in the working tree in the
-repository upon `git-add` and `git-commit`.
+repository upon 'git-add' and 'git-commit'.
 
 `crlf`
 ^^^^^^
@@ -148,16 +148,16 @@ an irreversible conversion.  The safety triggers to prevent such
 a conversion done to the files in the work tree, but there are a
 few exceptions.  Even though...
 
-- `git-add` itself does not touch the files in the work tree, the
+- 'git-add' itself does not touch the files in the work tree, the
   next checkout would, so the safety triggers;
 
-- `git-apply` to update a text file with a patch does touch the files
+- 'git-apply' to update a text file with a patch does touch the files
   in the work tree, but the operation is about text files and CRLF
   conversion is about fixing the line ending inconsistencies, so the
   safety does not trigger;
 
-- `git-diff` itself does not touch the files in the work tree, it is
-  often run to inspect the changes you intend to next `git-add`.  To
+- 'git-diff' itself does not touch the files in the work tree, it is
+  often run to inspect the changes you intend to next 'git-add'.  To
   catch potential problems early, safety triggers.
 
 
@@ -214,7 +214,7 @@ with `crlf`, and then `ident` and fed to `filter`.
 Generating diff text
 ~~~~~~~~~~~~~~~~~~~~
 
-The attribute `diff` affects if `git-diff` generates textual
+The attribute `diff` affects if 'git-diff' generates textual
 patch for the path or just says `Binary files differ`.  It also
 can affect what line is shown on the hunk header `@@ -k,l +n,m @@`
 line.
@@ -278,7 +278,7 @@ is prefixed with a line of the form:
 
 The text is called 'hunk header', and by default a line that
 begins with an alphabet, an underscore or a dollar sign is used,
-which matches what GNU `diff -p` output uses.  This default
+which matches what GNU 'diff -p' output uses.  This default
 selection however is not suited for some contents, and you can
 use customized pattern to make a selection.
 
@@ -322,7 +322,7 @@ and other programs such as `git revert` and `git cherry-pick`.
 Set::
 
        Built-in 3-way merge driver is used to merge the
-       contents in a way similar to `merge` command of `RCS`
+       contents in a way similar to 'merge' command of `RCS`
        suite.  This is suitable for ordinary text files.
 
 Unset::
@@ -426,7 +426,7 @@ Checking whitespace errors
 ^^^^^^^^^^^^
 
 The `core.whitespace` configuration variable allows you to define what
-`diff` and `apply` should consider whitespace errors for all paths in
+'diff' and 'apply' should consider whitespace errors for all paths in
 the project (See linkgit:git-config[1]).  This attribute gives you finer
 control per path.
 
@@ -450,6 +450,29 @@ String::
        variable.
 
 
+Creating an archive
+~~~~~~~~~~~~~~~~~~~
+
+`export-ignore`
+^^^^^^^^^^^^^^^
+
+Files and directories with the attribute `export-ignore` won't be added to
+archive files.
+
+`export-subst`
+^^^^^^^^^^^^^^
+
+If the attribute `export-subst` is set for a file then git will expand
+several placeholders when adding this file to an archive.  The
+expansion depends on the availability of a commit ID, i.e., if
+linkgit:git-archive[1] has been given a tree instead of a commit or a
+tag then no replacement will be done.  The placeholders are the same
+as those for the option `--pretty=format:` of linkgit:git-log[1],
+except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
+in the file.  E.g. the string `$Format:%H$` will be replaced by the
+commit hash.
+
+
 EXAMPLE
 -------
 
@@ -499,28 +522,6 @@ frotz      unspecified
 ----------------------------------------------------------------
 
 
-Creating an archive
-~~~~~~~~~~~~~~~~~~~
-
-`export-ignore`
-^^^^^^^^^^^^^^^
-
-Files and directories with the attribute `export-ignore` won't be added to
-archive files.
-
-`export-subst`
-^^^^^^^^^^^^^^
-
-If the attribute `export-subst` is set for a file then git will expand
-several placeholders when adding this file to an archive.  The
-expansion depends on the availability of a commit ID, i.e., if
-`git-archive` has been given a tree instead of a commit or a
-tag then no replacement will be done.  The placeholders are the same
-as those for the option `--pretty=format:` of linkgit:git-log[1],
-except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
-in the file.  E.g. the string `$Format:%H$` will be replaced by the
-commit hash.
-
 
 GIT
 ---
index 7d721c5b084dd0e17c05d8fbd1758509d8146a1c..49179b0a00fad1ecda1fdf0537ccbce77f5fc494 100644 (file)
@@ -42,9 +42,9 @@ one for a totally new project, or an existing working tree that you want
 to import into git.
 
 For our first example, we're going to start a totally new repository from
-scratch, with no pre-existing files, and we'll call it `git-tutorial`.
+scratch, with no pre-existing files, and we'll call it 'git-tutorial'.
 To start up, create a subdirectory for it, change into that
-subdirectory, and initialize the git infrastructure with `git-init`:
+subdirectory, and initialize the git infrastructure with 'git-init':
 
 ------------------------------------------------
 $ mkdir git-tutorial
@@ -61,7 +61,7 @@ Initialized empty Git repository in .git/
 which is just git's way of saying that you haven't been doing anything
 strange, and that it will have created a local `.git` directory setup for
 your new project. You will now have a `.git` directory, and you can
-inspect that with `ls`. For your new empty project, it should show you
+inspect that with 'ls'. For your new empty project, it should show you
 three entries, among other things:
 
  - a file called `HEAD`, that has `ref: refs/heads/master` in it.
@@ -139,7 +139,7 @@ but to actually check in your hard work, you will have to go through two steps:
  - commit that index file as an object.
 
 The first step is trivial: when you want to tell git about any changes
-to your working tree, you use the `git-update-index` program. That
+to your working tree, you use the 'git-update-index' program. That
 program normally just takes a list of filenames you want to update, but
 to avoid trivial mistakes, it refuses to add new entries to the index
 (or remove existing ones) unless you explicitly tell it that you're
@@ -173,14 +173,14 @@ and see two files:
 which correspond with the objects with names of `557db...` and
 `f24c7...` respectively.
 
-If you want to, you can use `git-cat-file` to look at those objects, but
+If you want to, you can use 'git-cat-file' to look at those objects, but
 you'll have to use the object name, not the filename of the object:
 
 ----------------
 $ git cat-file -t 557db03de997c86a4a028e1ebd3a1ceb225be238
 ----------------
 
-where the `-t` tells `git-cat-file` to tell you what the "type" of the
+where the `-t` tells 'git-cat-file' to tell you what the "type" of the
 object is. git will tell you that you have a "blob" object (i.e., just a
 regular file), and you can see the contents with
 
@@ -205,7 +205,7 @@ hexadecimal digits in most places.
 Anyway, as we mentioned previously, you normally never actually take a
 look at the objects themselves, and typing long 40-character hex
 names is not something you'd normally want to do. The above digression
-was just to show that `git-update-index` did something magical, and
+was just to show that 'git-update-index' did something magical, and
 actually saved away the contents of your files into the git object
 database.
 
@@ -228,18 +228,18 @@ $ echo "It's a new day for git" >>hello
 
 and you can now, since you told git about the previous state of `hello`, ask
 git what has changed in the tree compared to your old index, using the
-`git-diff-files` command:
+'git-diff-files' command:
 
 ------------
 $ git diff-files
 ------------
 
 Oops. That wasn't very readable. It just spit out its own internal
-version of a `diff`, but that internal version really just tells you
+version of a 'diff', but that internal version really just tells you
 that it has noticed that "hello" has been modified, and that the old object
 contents it had have been replaced with something else.
 
-To make it readable, we can tell `git-diff-files` to output the
+To make it readable, we can tell 'git-diff-files' to output the
 differences as a patch, using the `-p` flag:
 
 ------------
@@ -255,7 +255,7 @@ index 557db03..263414f 100644
 
 i.e. the diff of the change we caused by adding another line to `hello`.
 
-In other words, `git-diff-files` always shows us the difference between
+In other words, 'git-diff-files' always shows us the difference between
 what is recorded in the index, and what is currently in the working
 tree. That's very useful.
 
@@ -283,7 +283,7 @@ that in two phases: creating a 'tree' object, and committing that 'tree'
 object as a 'commit' object together with an explanation of what the
 tree was all about, along with information of how we came to that state.
 
-Creating a tree object is trivial, and is done with `git-write-tree`.
+Creating a tree object is trivial, and is done with 'git-write-tree'.
 There are no options or other input: `git write-tree` will take the
 current index state, and write an object that describes that whole
 index. In other words, we're now tying together all the different
@@ -307,23 +307,23 @@ is not a "blob" object, but a "tree" object (you can also use
 `git cat-file` to actually output the raw object contents, but you'll see
 mainly a binary mess, so that's less interesting).
 
-However -- normally you'd never use `git-write-tree` on its own, because
+However -- normally you'd never use 'git-write-tree' on its own, because
 normally you always commit a tree into a commit object using the
-`git-commit-tree` command. In fact, it's easier to not actually use
-`git-write-tree` on its own at all, but to just pass its result in as an
-argument to `git-commit-tree`.
+'git-commit-tree' command. In fact, it's easier to not actually use
+'git-write-tree' on its own at all, but to just pass its result in as an
+argument to 'git-commit-tree'.
 
-`git-commit-tree` normally takes several arguments -- it wants to know
+'git-commit-tree' normally takes several arguments -- it wants to know
 what the 'parent' of a commit was, but since this is the first commit
 ever in this new repository, and it has no parents, we only need to pass in
-the object name of the tree. However, `git-commit-tree` also wants to get a
+the object name of the tree. However, 'git-commit-tree' also wants to get a
 commit message on its standard input, and it will write out the resulting
 object name for the commit to its standard output.
 
 And this is where we create the `.git/refs/heads/master` file
 which is pointed at by `HEAD`. This file is supposed to contain
 the reference to the top-of-tree of the master branch, and since
-that's exactly what `git-commit-tree` spits out, we can do this
+that's exactly what 'git-commit-tree' spits out, we can do this
 all with a sequence of simple shell commands:
 
 ------------------------------------------------
@@ -345,11 +345,11 @@ instead, and it would have done the above magic scripting for you.
 Making a change
 ---------------
 
-Remember how we did the `git-update-index` on file `hello` and then we
+Remember how we did the 'git-update-index' on file `hello` and then we
 changed `hello` afterward, and could compare the new state of `hello` with the
 state we saved in the index file?
 
-Further, remember how I said that `git-write-tree` writes the contents
+Further, remember how I said that 'git-write-tree' writes the contents
 of the *index* file to the tree, and thus what we just committed was in
 fact the *original* contents of the file `hello`, not the new ones. We did
 that on purpose, to show the difference between the index state, and the
@@ -360,12 +360,12 @@ As before, if we do `git diff-files -p` in our git-tutorial project,
 we'll still see the same difference we saw last time: the index file
 hasn't changed by the act of committing anything. However, now that we
 have committed something, we can also learn to use a new command:
-`git-diff-index`.
+'git-diff-index'.
 
-Unlike `git-diff-files`, which showed the difference between the index
-file and the working tree, `git-diff-index` shows the differences
+Unlike 'git-diff-files', which showed the difference between the index
+file and the working tree, 'git-diff-index' shows the differences
 between a committed *tree* and either the index file or the working
-tree. In other words, `git-diff-index` wants a tree to be diffed
+tree. In other words, 'git-diff-index' wants a tree to be diffed
 against, and before we did the commit, we couldn't do that, because we
 didn't have anything to diff against.
 
@@ -375,7 +375,7 @@ But now we can do
 $ git diff-index -p HEAD
 ----------------
 
-(where `-p` has the same meaning as it did in `git-diff-files`), and it
+(where `-p` has the same meaning as it did in 'git-diff-files'), and it
 will show us the same difference, but for a totally different reason.
 Now we're comparing the working tree not against the index file,
 but against the tree we just wrote. It just so happens that those two
@@ -390,7 +390,7 @@ $ git diff HEAD
 
 which ends up doing the above for you.
 
-In other words, `git-diff-index` normally compares a tree against the
+In other words, 'git-diff-index' normally compares a tree against the
 working tree, but when given the `\--cached` flag, it is told to
 instead compare against just the index cache contents, and ignore the
 current working tree state entirely. Since we just wrote the index
@@ -399,7 +399,7 @@ an empty set of differences, and that's exactly what it does.
 
 [NOTE]
 ================
-`git-diff-index` really always uses the index for its
+'git-diff-index' really always uses the index for its
 comparisons, and saying that it compares a tree against the working
 tree is thus not strictly accurate. In particular, the list of
 files to compare (the "meta-data") *always* comes from the index file,
@@ -428,11 +428,11 @@ $ git update-index hello
 (note how we didn't need the `\--add` flag this time, since git knew
 about the file already).
 
-Note what happens to the different `git-diff-\*` versions here. After
+Note what happens to the different 'git-diff-\*' versions here. After
 we've updated `hello` in the index, `git diff-files -p` now shows no
 differences, but `git diff-index -p HEAD` still *does* show that the
 current state is different from the state we committed. In fact, now
-`git-diff-index` shows the same difference whether we use the `--cached`
+'git-diff-index' shows the same difference whether we use the `--cached`
 flag or not, since now the index is coherent with the working tree.
 
 Now, since we've updated `hello` in the index, we can commit the new
@@ -460,7 +460,7 @@ You've now made your first real git commit. And if you're interested in
 looking at what `git commit` really does, feel free to investigate:
 it's a few very simple shell scripts to generate the helpful (?) commit
 message headers, and a few one-liners that actually do the
-commit itself (`git-commit`).
+commit itself ('git-commit').
 
 
 Inspecting Changes
@@ -468,9 +468,9 @@ Inspecting Changes
 
 While creating changes is useful, it's even more useful if you can tell
 later what changed. The most useful command for this is another of the
-`diff` family, namely `git-diff-tree`.
+'diff' family, namely 'git-diff-tree'.
 
-`git-diff-tree` can be given two arbitrary trees, and it will tell you the
+'git-diff-tree' can be given two arbitrary trees, and it will tell you the
 differences between them. Perhaps even more commonly, though, you can
 give it just a single commit object, and it will figure out the parent
 of that commit itself, and show the difference directly. Thus, to get
@@ -518,15 +518,15 @@ various diff-\* commands compare things.
                     +-----------+
 ============
 
-More interestingly, you can also give `git-diff-tree` the `--pretty` flag,
+More interestingly, you can also give 'git-diff-tree' the `--pretty` flag,
 which tells it to also show the commit message and author and date of the
 commit, and you can tell it to show a whole series of diffs.
 Alternatively, you can tell it to be "silent", and not show the diffs at
 all, but just show the actual commit message.
 
-In fact, together with the `git-rev-list` program (which generates a
-list of revisions), `git-diff-tree` ends up being a veritable fount of
-changes. A trivial (but very useful) script called `git-whatchanged` is
+In fact, together with the 'git-rev-list' program (which generates a
+list of revisions), 'git-diff-tree' ends up being a veritable fount of
+changes. A trivial (but very useful) script called 'git-whatchanged' is
 included with git which does exactly this, and shows a log of recent
 activities.
 
@@ -553,14 +553,14 @@ When using the above two commands, the initial commit will be shown.
 If this is a problem because it is huge, you can hide it by setting
 the log.showroot configuration variable to false. Having this, you
 can still show it for each command just adding the `\--root` option,
-which is a flag for `git-diff-tree` accepted by both commands.
+which is a flag for 'git-diff-tree' accepted by both commands.
 
 With that, you should now be having some inkling of what git does, and
 can explore on your own.
 
 [NOTE]
 Most likely, you are not directly using the core
-git Plumbing commands, but using Porcelain such as `git-add`, `git-rm'
+git Plumbing commands, but using Porcelain such as 'git-add', `git-rm'
 and `git-commit'.
 
 
@@ -595,7 +595,7 @@ pointer to the state you want to tag, but also a small tag name and
 message, along with optionally a PGP signature that says that yes,
 you really did
 that tag. You create these annotated tags with either the `-a` or
-`-s` flag to `git tag`:
+`-s` flag to 'git-tag':
 
 ----------------
 $ git tag -s <tagname>
@@ -642,7 +642,7 @@ and it will be gone. There's no external repository, and there's no
 history outside the project you created.
 
  - if you want to move or duplicate a git repository, you can do so. There
-   is `git clone` command, but if all you want to do is just to
+   is 'git-clone' command, but if all you want to do is just to
    create a copy of your repository (with all the full history that
    went along with it), you can do so with a regular
    `cp -a git-tutorial new-git-tutorial`.
@@ -660,13 +660,13 @@ in the new repository to make sure that the index file is up-to-date.
 
 Note that the second point is true even across machines. You can
 duplicate a remote git repository with *any* regular copy mechanism, be it
-`scp`, `rsync` or `wget`.
+'scp', 'rsync' or 'wget'.
 
 When copying a remote repository, you'll want to at a minimum update the
 index cache when you do this, and especially with other peoples'
 repositories you often want to make sure that the index cache is in some
 known state (you don't know *what* they've done and not yet checked in),
-so usually you'll precede the `git-update-index` with a
+so usually you'll precede the 'git-update-index' with a
 
 ----------------
 $ git read-tree --reset HEAD
@@ -674,7 +674,7 @@ $ git update-index --refresh
 ----------------
 
 which will force a total index re-build from the tree pointed to by `HEAD`.
-It resets the index contents to `HEAD`, and then the `git-update-index`
+It resets the index contents to `HEAD`, and then the 'git-update-index'
 makes sure to match up all index entries with the checked-out files.
 If the original repository had uncommitted changes in its
 working tree, `git update-index --refresh` notices them and
@@ -689,8 +689,8 @@ $ git reset
 and in fact a lot of the common git command combinations can be scripted
 with the `git xyz` interfaces.  You can learn things by just looking
 at what the various git scripts do.  For example, `git reset` used to be
-the above two lines implemented in `git-reset`, but some things like
-`git-status` and `git-commit` are slightly more complex scripts around
+the above two lines implemented in 'git-reset', but some things like
+'git-status' and 'git-commit' are slightly more complex scripts around
 the basic git commands.
 
 Many (most?) public remote repositories will not contain any of
@@ -729,7 +729,7 @@ where the `-u` flag means that you want the checkout to keep the index
 up-to-date (so that you don't have to refresh it afterward), and the
 `-a` flag means "check out all files" (if you have a stale copy or an
 older version of a checked out tree you may also need to add the `-f`
-flag first, to tell `git-checkout-index` to *force* overwriting of any old
+flag first, to tell 'git-checkout-index' to *force* overwriting of any old
 files).
 
 Again, this can all be simplified with
@@ -776,7 +776,7 @@ to it.
 ================================================
 If you make the decision to start your new branch at some
 other point in the history than the current `HEAD`, you can do so by
-just telling `git checkout` what the base of the checkout would be.
+just telling 'git-checkout' what the base of the checkout would be.
 In other words, if you have an earlier tag or branch, you'd just do
 
 ------------
@@ -819,7 +819,7 @@ $ git branch <branchname> [startingpoint]
 
 which will simply _create_ the branch, but will not do anything further.
 You can then later -- once you decide that you want to actually develop
-on that branch -- switch to that branch with a regular `git checkout`
+on that branch -- switch to that branch with a regular 'git-checkout'
 with the branchname as the argument.
 
 
@@ -878,10 +878,10 @@ means: normally it will just show you your current `HEAD`) and their
 histories. You can also see exactly how they came to be from a common
 source.
 
-Anyway, let's exit `gitk` (`^Q` or the File menu), and decide that we want
+Anyway, let's exit 'gitk' (`^Q` or the File menu), and decide that we want
 to merge the work we did on the `mybranch` branch into the `master`
 branch (which is currently our `HEAD` too). To do that, there's a nice
-script called `git merge`, which wants to know which branches you want
+script called 'git-merge', which wants to know which branches you want
 to resolve and what the merge is all about:
 
 ------------
@@ -925,7 +925,7 @@ $ git commit -i hello
 
 which will very loudly warn you that you're now committing a merge
 (which is correct, so never mind), and you can write a small merge
-message about your adventures in `git-merge`-land.
+message about your adventures in 'git-merge'-land.
 
 After you're done, start up `gitk \--all` to see graphically what the
 history looks like. Notice that `mybranch` still exists, and you can
@@ -967,21 +967,21 @@ branch head.  Please see linkgit:git-rev-parse[1] if you want to
 see more complex cases.
 
 [NOTE]
-Without the '--more=1' option, `git-show-branch` would not output the
+Without the '--more=1' option, 'git-show-branch' would not output the
 '[master^]' commit, as '[mybranch]' commit is a common ancestor of
 both 'master' and 'mybranch' tips.  Please see linkgit:git-show-branch[1]
 for details.
 
 [NOTE]
 If there were more commits on the 'master' branch after the merge, the
-merge commit itself would not be shown by `git-show-branch` by
+merge commit itself would not be shown by 'git-show-branch' by
 default.  You would need to provide '--sparse' option to make the
 merge commit visible in this case.
 
 Now, let's pretend you are the one who did all the work in
 `mybranch`, and the fruit of your hard work has finally been merged
 to the `master` branch. Let's go back to `mybranch`, and run
-`git-merge` to get the "upstream changes" back to your branch.
+'git-merge' to get the "upstream changes" back to your branch.
 
 ------------
 $ git checkout mybranch
@@ -1006,7 +1006,7 @@ the tree of your branch to that of the `master` branch. This is
 often called 'fast forward' merge.
 
 You can run `gitk \--all` again to see how the commit ancestry
-looks like, or run `show-branch`, which tells you this.
+looks like, or run 'show-branch', which tells you this.
 
 ------------------------------------------------
 $ git show-branch master mybranch
@@ -1023,12 +1023,12 @@ Merging external work
 It's usually much more common that you merge with somebody else than
 merging with your own branches, so it's worth pointing out that git
 makes that very easy too, and in fact, it's not that different from
-doing a `git merge`. In fact, a remote merge ends up being nothing
+doing a 'git-merge'. In fact, a remote merge ends up being nothing
 more than "fetch the work from a remote repository into a temporary tag"
-followed by a `git merge`.
+followed by a 'git-merge'.
 
 Fetching from a remote repository is done by, unsurprisingly,
-`git fetch`:
+'git-fetch':
 
 ----------------
 $ git fetch <remote-repository>
@@ -1066,9 +1066,9 @@ most efficient way to exchange git objects between repositories.
 Local directory::
        `/path/to/repo.git/`
 +
-This transport is the same as SSH transport but uses `sh` to run
+This transport is the same as SSH transport but uses 'sh' to run
 both ends on the local machine instead of running other end on
-the remote machine via `ssh`.
+the remote machine via 'ssh'.
 
 git Native::
        `git://remote.machine/path/to/repo.git/`
@@ -1095,7 +1095,7 @@ The 'commit walkers' are sometimes also called 'dumb
 transports', because they do not require any git aware smart
 server like git Native transport does.  Any stock HTTP server
 that does not even support directory index would suffice.  But
-you must prepare your repository with `git-update-server-info`
+you must prepare your repository with 'git-update-server-info'
 to help dumb transport downloaders.
 
 Once you fetch from the remote repository, you `merge` that
@@ -1115,7 +1115,7 @@ argument.
 [NOTE]
 You could do without using any branches at all, by
 keeping as many local repositories as you would like to have
-branches, and merging between them with `git pull`, just like
+branches, and merging between them with 'git-pull', just like
 you merge between branches. The advantage of this approach is
 that it lets you keep a set of files for each `branch` checked
 out and you may find it easier to switch back and forth if you
@@ -1132,7 +1132,7 @@ like this:
 $ git config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
 ------------------------------------------------
 
-and use the "linus" keyword with `git pull` instead of the full URL.
+and use the "linus" keyword with 'git-pull' instead of the full URL.
 
 Examples.
 
@@ -1168,7 +1168,7 @@ $ git show-branch --more=2 master mybranch
 +* [master^] Some fun.
 ------------
 
-Remember, before running `git merge`, our `master` head was at
+Remember, before running 'git-merge', our `master` head was at
 "Some fun." commit, while our `mybranch` head was at "Some
 work." commit.
 
@@ -1195,7 +1195,7 @@ Now we are ready to experiment with the merge by hand.
 
 `git merge` command, when merging two branches, uses 3-way merge
 algorithm.  First, it finds the common ancestor between them.
-The command it uses is `git-merge-base`:
+The command it uses is 'git-merge-base':
 
 ------------
 $ mb=$(git merge-base HEAD mybranch)
@@ -1219,7 +1219,7 @@ this:
 $ git read-tree -m -u $mb HEAD mybranch
 ------------
 
-This is the same `git-read-tree` command we have already seen,
+This is the same 'git-read-tree' command we have already seen,
 but it takes three trees, unlike previous examples.  This reads
 the contents of each tree into different 'stage' in the index
 file (the first tree goes to stage 1, the second to stage 2,
@@ -1260,8 +1260,8 @@ $ git ls-files --unmerged
 
 The next step of merging is to merge these three versions of the
 file, using 3-way merge.  This is done by giving
-`git-merge-one-file` command as one of the arguments to
-`git-merge-index` command:
+'git-merge-one-file' command as one of the arguments to
+'git-merge-index' command:
 
 ------------
 $ git merge-index git-merge-one-file hello
@@ -1271,12 +1271,12 @@ ERROR: Merge conflict in hello.
 fatal: merge program failed
 ------------
 
-`git-merge-one-file` script is called with parameters to
+'git-merge-one-file' script is called with parameters to
 describe those three versions, and is responsible to leave the
 merge results in the working tree.
 It is a fairly straightforward shell script, and
-eventually calls `merge` program from RCS suite to perform a
-file-level 3-way merge.  In this case, `merge` detects
+eventually calls 'merge' program from RCS suite to perform a
+file-level 3-way merge.  In this case, 'merge' detects
 conflicts, and the merge result with conflict marks is left in
 the working tree..  This can be seen if you run `ls-files
 --stage` again at this point:
@@ -1290,9 +1290,9 @@ $ git ls-files --stage
 ------------
 
 This is the state of the index file and the working file after
-`git-merge` returns control back to you, leaving the conflicting
+'git-merge' returns control back to you, leaving the conflicting
 merge for you to resolve.  Notice that the path `hello` is still
-unmerged, and what you see with `git-diff` at this point is
+unmerged, and what you see with 'git-diff' at this point is
 differences since stage 2 (i.e. your version).
 
 
@@ -1320,7 +1320,7 @@ how git repositories at `kernel.org` are managed.
 Publishing the changes from your local (private) repository to
 your remote (public) repository requires a write privilege on
 the remote machine. You need to have an SSH account there to
-run a single command, `git-receive-pack`.
+run a single command, 'git-receive-pack'.
 
 First, you need to create an empty repository on the remote
 machine that will house your public repository. This empty
@@ -1329,8 +1329,8 @@ into it later. Obviously, this repository creation needs to be
 done only once.
 
 [NOTE]
-`git-push` uses a pair of programs,
-`git-send-pack` on your local machine, and `git-receive-pack`
+'git-push' uses a pair of programs,
+'git-send-pack' on your local machine, and 'git-receive-pack'
 on the remote machine. The communication between the two over
 the network internally uses an SSH connection.
 
@@ -1345,7 +1345,7 @@ $ mkdir my-git.git
 ------------
 
 Then, make that directory into a git repository by running
-`git init`, but this time, since its name is not the usual
+'git-init', but this time, since its name is not the usual
 `.git`, we do things slightly differently:
 
 ------------
@@ -1354,15 +1354,15 @@ $ GIT_DIR=my-git.git git init
 
 Make sure this directory is available for others you want your
 changes to be pulled by via the transport of your choice. Also
-you need to make sure that you have the `git-receive-pack`
+you need to make sure that you have the 'git-receive-pack'
 program on the `$PATH`.
 
 [NOTE]
 Many installations of sshd do not invoke your shell as the login
 shell when you directly run programs; what this means is that if
-your login shell is `bash`, only `.bashrc` is read and not
+your login shell is 'bash', only `.bashrc` is read and not
 `.bash_profile`. As a workaround, make sure `.bashrc` sets up
-`$PATH` so that you can run `git-receive-pack` program.
+`$PATH` so that you can run 'git-receive-pack' program.
 
 [NOTE]
 If you plan to publish this repository to be accessed over http,
@@ -1407,7 +1407,7 @@ $ git repack
 
 will do it for you. If you followed the tutorial examples, you
 would have accumulated about 17 objects in `.git/objects/??/`
-directories by now. `git repack` tells you how many objects it
+directories by now. 'git-repack' tells you how many objects it
 packed, and stores the packed file in `.git/objects/pack`
 directory.
 
@@ -1420,7 +1420,7 @@ them together. The former holds all the data from the objects
 in the pack, and the latter holds the index for random
 access.
 
-If you are paranoid, running `git-verify-pack` command would
+If you are paranoid, running 'git-verify-pack' command would
 detect if you have a corrupt pack, but do not worry too much.
 Our programs are always perfect ;-).
 
@@ -1487,17 +1487,17 @@ If other people are pulling from your repository over dumb
 transport protocols (HTTP), you need to keep this repository
 'dumb transport friendly'.  After `git init`,
 `$GIT_DIR/hooks/post-update` copied from the standard templates
-would contain a call to `git-update-server-info` but the
+would contain a call to 'git-update-server-info' but the
 `post-update` hook itself is disabled by default -- enable it
-with `chmod +x post-update`.  This makes sure `git-update-server-info`
+with `chmod +x post-update`.  This makes sure 'git-update-server-info'
 keeps the necessary files up-to-date.
 
 3. Push into the public repository from your primary
    repository.
 
-4. `git-repack` the public repository. This establishes a big
+4. 'git-repack' the public repository. This establishes a big
    pack that contains the initial set of objects as the
-   baseline, and possibly `git-prune` if the transport
+   baseline, and possibly 'git-prune' if the transport
    used for pulling from your repository supports packed
    repositories.
 
@@ -1518,7 +1518,7 @@ You can repack this private repository whenever you feel like.
 A recommended work cycle for a "subsystem maintainer" who works
 on that project and has an own "public repository" goes like this:
 
-1. Prepare your work repository, by `git-clone` the public
+1. Prepare your work repository, by 'git-clone' the public
    repository of the "project lead". The URL used for the
    initial cloning is stored in the remote.origin.url
    configuration variable.
@@ -1533,7 +1533,7 @@ on that project and has an own "public repository" goes like this:
    point at the repository you are borrowing from.
 
 4. Push into the public repository from your primary
-   repository. Run `git-repack`, and possibly `git-prune` if the
+   repository. Run 'git-repack', and possibly 'git-prune' if the
    transport used for pulling from your repository supports
    packed repositories.
 
@@ -1550,7 +1550,7 @@ like.
    "project lead" and possibly your "sub-subsystem
    maintainers" to pull from it.
 
-7. Every once in a while, `git-repack` the public repository.
+7. Every once in a while, 'git-repack' the public repository.
    Go back to step 5. and continue working.
 
 
@@ -1558,7 +1558,7 @@ A recommended work cycle for an "individual developer" who does
 not have a "public" repository is somewhat different. It goes
 like this:
 
-1. Prepare your work repository, by `git-clone` the public
+1. Prepare your work repository, by 'git-clone' the public
    repository of the "project lead" (or a "subsystem
    maintainer", if you work on a subsystem). The URL used for
    the initial cloning is stored in the remote.origin.url
@@ -1655,9 +1655,9 @@ branch before these two merges by resetting it to 'master~2':
 $ git reset --hard master~2
 ------------
 
-You can make sure 'git show-branch' matches the state before
-those two 'git merge' you just did.  Then, instead of running
-two 'git merge' commands in a row, you would merge these two
+You can make sure `git show-branch` matches the state before
+those two 'git-merge' you just did.  Then, instead of running
+two 'git-merge' commands in a row, you would merge these two
 branch heads (this is known as 'making an Octopus'):
 
 ------------
@@ -1690,7 +1690,7 @@ to follow, not easier.
 SEE ALSO
 --------
 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
-linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
+linkgit:everyday[7], linkgit:gitcvs-migration[7],
 link:user-manual.html[The Git User's Manual]
 
 GIT
index 4dc7ec5407fdcf58cc4e2c876a9093e6a58a2794..aaa7ef737a4c190c60e37e2849ce42f3bdb5dda7 100644 (file)
@@ -34,7 +34,7 @@ $ git clone foo.com:/pub/repo.git/ my-project
 $ cd my-project
 ------------------------------------------------
 
-and hack away.  The equivalent of `cvs update` is
+and hack away.  The equivalent of 'cvs update' is
 
 ------------------------------------------------
 $ git pull origin
@@ -46,28 +46,28 @@ them first before running git pull.
 
 [NOTE]
 ================================
-The `pull` command knows where to get updates from because of certain
-configuration variables that were set by the first `git-clone`
+The 'pull' command knows where to get updates from because of certain
+configuration variables that were set by the first 'git-clone'
 command; see `git config -l` and the linkgit:git-config[1] man
 page for details.
 ================================
 
 You can update the shared repository with your changes by first committing
-your changes, and then using the `git-push` command:
+your changes, and then using the 'git-push' command:
 
 ------------------------------------------------
 $ git push origin master
 ------------------------------------------------
 
 to "push" those commits to the shared repository.  If someone else has
-updated the repository more recently, `git-push`, like `cvs commit`, will
+updated the repository more recently, 'git-push', like 'cvs commit', will
 complain, in which case you must pull any changes before attempting the
 push again.
 
-In the `git-push` command above we specify the name of the remote branch
-to update (`master`).  If we leave that out, `git-push` tries to update
+In the 'git-push' command above we specify the name of the remote branch
+to update (`master`).  If we leave that out, 'git-push' tries to update
 any branches in the remote repository that have the same name as a branch
-in the local repository.  So the last `push` can be done with either of:
+in the local repository.  So the last 'push' can be done with either of:
 
 ------------
 $ git push origin
@@ -118,7 +118,7 @@ Importing a CVS archive
 First, install version 2.1 or higher of cvsps from
 link:http://www.cobite.com/cvsps/[http://www.cobite.com/cvsps/] and make
 sure it is in your path.  Then cd to a checked out CVS working directory
-of the project you are interested in and run `git-cvsimport`:
+of the project you are interested in and run 'git-cvsimport':
 
 -------------------------------------------
 $ git cvsimport -C <destination> <module>
@@ -143,6 +143,11 @@ work, you must not modify the imported branches; instead, create new
 branches for your own changes, and merge in the imported branches as
 necessary.
 
+If you want a shared repository, you will need to make a bare clone
+of the imported directory, as described above. Then treat the imported
+directory as another development clone for purposes of merging
+incremental imports.
+
 Advanced Shared Repository Management
 -------------------------------------
 
index 0b7daeda2dd02e20f52e6bca42b0fe76c60b1c16..2bdbc3d4f6a97c1a1d970f0c5f27222ef9e31274 100644 (file)
@@ -7,34 +7,34 @@ gitdiffcore - Tweaking diff output (June 2005)
 
 SYNOPSIS
 --------
-git diff *
+'git diff' *
 
 DESCRIPTION
 -----------
 
-The diff commands `git-diff-index`, `git-diff-files`, and `git-diff-tree`
+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` output.  The manipulation
+unconventional ways before showing 'diff' 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.
+describes what they are and how to use them to produce 'diff' output
+that is easier to understand than the conventional kind.
 
 
 The chain of operation
 ----------------------
 
-The `git-diff-{asterisk}` family works by first comparing two sets of
+The 'git-diff-{asterisk}' family works by first comparing two sets of
 files:
 
- - `git-diff-index` compares contents of a "tree" object and the
+ - '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
+ - 'git-diff-files' compares contents of the index file and the
    working directory;
 
- - `git-diff-tree` compares contents of two "tree" objects;
+ - '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
@@ -61,12 +61,12 @@ into another list.  There are currently 6 such transformations:
 - diffcore-pickaxe
 - diffcore-order
 
-These are applied in sequence.  The set of filepairs `git-diff-{asterisk}`
+These are applied in sequence.  The set of filepairs 'git-diff-{asterisk}'
 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-{asterisk}` commands) or
+format sections of the manual for 'git-diff-{asterisk}' commands) or
 diff-patch format.
 
 
@@ -75,7 +75,7 @@ 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-{asterisk}` commands on the command line.  The pathspec is used
+'git-diff-{asterisk}' 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:
@@ -88,7 +88,7 @@ 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`
+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.
@@ -98,7 +98,7 @@ 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-{asterisk}` commands.  This is
+controlled by the -B option to the 'git-diff-{asterisk}' 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:
@@ -134,7 +134,7 @@ 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-{asterisk}` commands.  If the
+(to detect copies as well) to the 'git-diff-{asterisk}' commands.  If the
 input contained these filepairs:
 
 ------------------------------------------------
@@ -179,11 +179,11 @@ 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-{asterisk}` commands feed unmodified filepairs to
+option, 'git-diff-{asterisk}' 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-{asterisk}` commands can detect copies only if the file that was
+'git-diff-{asterisk}' commands can detect copies only if the file that was
 copied happened to have been modified in the same changeset.
 
 
@@ -234,7 +234,7 @@ 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-{asterisk}`
+-S option and the `\--pickaxe-all` option to the 'git-diff-{asterisk}'
 commands.
 
 When diffcore-pickaxe is in use, it checks if there are
@@ -257,7 +257,7 @@ 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-{asterisk}` commands.
+'git-diff-{asterisk}' 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
index 5c5c31d31c6057d9f3c6da7a5f6d6cdc40c023f6..565719ed5f8516e17229ec11bbec5e1354580397 100644 (file)
@@ -17,7 +17,7 @@ include::glossary-content.txt[]
 SEE ALSO
 --------
 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
-linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
+linkgit:everyday[7], linkgit:gitcvs-migration[7],
 link:user-manual.html[The Git User's Manual]
 
 GIT
index 6a0d098f7c71ec3d7aa7e066900e11f3c683c5d8..046a2a7fe7cf8ec301d3a20f7ebc587a09d210e3 100644 (file)
@@ -15,7 +15,7 @@ DESCRIPTION
 
 Hooks are little scripts you can place in `$GIT_DIR/hooks`
 directory to trigger action at certain points.  When
-`git-init` is run, a handful example hooks are copied in the
+'git-init' is run, a handful example hooks are copied in the
 `hooks` directory of the new repository, but by default they are
 all disabled.  To enable a hook, rename it by removing its `.sample`
 suffix.
@@ -25,10 +25,10 @@ This document describes the currently defined hooks.
 applypatch-msg
 --------------
 
-This hook is invoked by `git-am` script.  It takes a single
+This hook is invoked by 'git-am' script.  It takes a single
 parameter, the name of the file that holds the proposed commit
 log message.  Exiting with non-zero status causes
-`git-am` to abort before applying the patch.
+'git-am' to abort before applying the patch.
 
 The hook is allowed to edit the message file in place, and can
 be used to normalize the message into some project standard
@@ -41,7 +41,7 @@ The default 'applypatch-msg' hook, when enabled, runs the
 pre-applypatch
 --------------
 
-This hook is invoked by `git-am`.  It takes no parameter, and is
+This hook is invoked by 'git-am'.  It takes no parameter, and is
 invoked after the patch is applied, but before a commit is made.
 
 If it exits with non-zero status, then the working tree will not be
@@ -56,33 +56,33 @@ The default 'pre-applypatch' hook, when enabled, runs the
 post-applypatch
 ---------------
 
-This hook is invoked by `git-am`.  It takes no parameter,
+This hook is invoked by 'git-am'.  It takes no parameter,
 and is invoked after the patch is applied and a commit is made.
 
 This hook is meant primarily for notification, and cannot affect
-the outcome of `git-am`.
+the outcome of 'git-am'.
 
 pre-commit
 ----------
 
-This hook is invoked by `git-commit`, and can be bypassed
+This hook is invoked by 'git-commit', and can be bypassed
 with `\--no-verify` option.  It takes no parameter, and is
 invoked before obtaining the proposed commit log message and
 making a commit.  Exiting with non-zero status from this script
-causes the `git-commit` to abort.
+causes the 'git-commit' to abort.
 
 The default 'pre-commit' hook, when enabled, catches introduction
 of lines with trailing whitespaces and aborts the commit when
 such a line is found.
 
-All the `git-commit` hooks are invoked with the environment
+All the 'git-commit' hooks are invoked with the environment
 variable `GIT_EDITOR=:` if the command will not bring up an editor
 to modify the commit message.
 
 prepare-commit-msg
 ------------------
 
-This hook is invoked by `git-commit` right after preparing the
+This hook is invoked by 'git-commit' right after preparing the
 default log message, and before the editor is started.
 
 It takes one to three parameters.  The first is the name of the file
@@ -94,7 +94,7 @@ commit is a merge or a `.git/MERGE_MSG` file exists); `squash`
 (if a `.git/SQUASH_MSG` file exists); or `commit`, followed by
 a commit SHA1 (if a `\-c`, `\-C` or `\--amend` option was given).
 
-If the exit status is non-zero, `git-commit` will abort.
+If the exit status is non-zero, 'git-commit' will abort.
 
 The purpose of the hook is to edit the message file in place, and
 it is not suppressed by the `\--no-verify` option.  A non-zero exit
@@ -107,10 +107,10 @@ out the `Conflicts:` part of a merge's commit message.
 commit-msg
 ----------
 
-This hook is invoked by `git-commit`, and can be bypassed
+This hook is invoked by 'git-commit', and can be bypassed
 with `\--no-verify` option.  It takes a single parameter, the
 name of the file that holds the proposed commit log message.
-Exiting with non-zero status causes the `git-commit` to
+Exiting with non-zero status causes the 'git-commit' to
 abort.
 
 The hook is allowed to edit the message file in place, and can
@@ -124,21 +124,21 @@ The default 'commit-msg' hook, when enabled, detects duplicate
 post-commit
 -----------
 
-This hook is invoked by `git-commit`.  It takes no
+This hook is invoked by 'git-commit'.  It takes no
 parameter, and is invoked after a commit is made.
 
 This hook is meant primarily for notification, and cannot affect
-the outcome of `git-commit`.
+the outcome of 'git-commit'.
 
 post-checkout
 -----------
 
-This hook is invoked when a `git-checkout` is run after having updated the
+This hook is invoked when a 'git-checkout' is run after having updated the
 worktree.  The hook is given three parameters: the ref of the previous HEAD,
 the ref of the new HEAD (which may or may not have changed), and a flag
 indicating whether the checkout was a branch checkout (changing branches,
 flag=1) or a file checkout (retrieving a file from the index, flag=0).
-This hook cannot affect the outcome of `git-checkout`.
+This hook cannot affect the outcome of 'git-checkout'.
 
 This hook can be used to perform repository validity checks, auto-display
 differences from the previous HEAD if different, or set working dir metadata
@@ -147,10 +147,10 @@ properties.
 post-merge
 -----------
 
-This hook is invoked by `git-merge`, which happens when a `git-pull`
+This hook is invoked by 'git-merge', which happens when a 'git-pull'
 is done on a local repository.  The hook takes a single parameter, a status
 flag specifying whether or not the merge being done was a squash merge.
-This hook cannot affect the outcome of `git-merge` and is not executed,
+This hook cannot affect the outcome of 'git-merge' and is not executed,
 if the merge failed due to conflicts.
 
 This hook can be used in conjunction with a corresponding pre-commit hook to
@@ -162,8 +162,8 @@ for an example of how to do this.
 pre-receive
 -----------
 
-This hook is invoked by `git-receive-pack` on the remote repository,
-which happens when a `git-push` is done on a local repository.
+This hook is invoked by 'git-receive-pack' on the remote repository,
+which happens when a 'git-push' is done on a local repository.
 Just before starting to update refs on the remote repository, the
 pre-receive hook is invoked.  Its exit status determines the success
 or failure of the update.
@@ -184,15 +184,15 @@ updated. If the hook exits with zero, updating of individual refs can
 still be prevented by the <<update,'update'>> hook.
 
 Both standard output and standard error output are forwarded to
-`git-send-pack` on the other end, so you can simply `echo` messages
+'git-send-pack' on the other end, so you can simply `echo` messages
 for the user.
 
 [[update]]
 update
 ------
 
-This hook is invoked by `git-receive-pack` on the remote repository,
-which happens when a `git-push` is done on a local repository.
+This hook is invoked by 'git-receive-pack' on the remote repository,
+which happens when a 'git-push' is done on a local repository.
 Just before updating the ref on the remote repository, the update hook
 is invoked.  Its exit status determines the success or failure of
 the ref update.
@@ -205,7 +205,7 @@ three parameters:
  - and the new objectname to be stored in the ref.
 
 A zero exit from the update hook allows the ref to be updated.
-Exiting with a non-zero status prevents `git-receive-pack`
+Exiting with a non-zero status prevents 'git-receive-pack'
 from updating that ref.
 
 This hook can be used to prevent 'forced' update on certain refs by
@@ -223,7 +223,7 @@ implement access control which is finer grained than the one
 based on filesystem group.
 
 Both standard output and standard error output are forwarded to
-`git-send-pack` on the other end, so you can simply `echo` messages
+'git-send-pack' on the other end, so you can simply `echo` messages
 for the user.
 
 The default 'update' hook, when enabled--and with
@@ -234,8 +234,8 @@ unannotated tags to be pushed.
 post-receive
 ------------
 
-This hook is invoked by `git-receive-pack` on the remote repository,
-which happens when a `git-push` is done on a local repository.
+This hook is invoked by 'git-receive-pack' on the remote repository,
+which happens when a 'git-push' is done on a local repository.
 It executes on the remote repository once after all the refs have
 been updated.
 
@@ -244,7 +244,7 @@ arguments, but gets the same information as the
 <<pre-receive,'pre-receive'>>
 hook does on its standard input.
 
-This hook does not affect the outcome of `git-receive-pack`, as it
+This hook does not affect the outcome of 'git-receive-pack', as it
 is called after the real work is done.
 
 This supersedes the <<post-update,'post-update'>> hook in that it gets
@@ -252,7 +252,7 @@ both old and new values of all the refs in addition to their
 names.
 
 Both standard output and standard error output are forwarded to
-`git-send-pack` on the other end, so you can simply `echo` messages
+'git-send-pack' on the other end, so you can simply `echo` messages
 for the user.
 
 The default 'post-receive' hook is empty, but there is
@@ -264,8 +264,8 @@ emails.
 post-update
 -----------
 
-This hook is invoked by `git-receive-pack` on the remote repository,
-which happens when a `git-push` is done on a local repository.
+This hook is invoked by 'git-receive-pack' on the remote repository,
+which happens when a 'git-push' is done on a local repository.
 It executes on the remote repository once after all the refs have
 been updated.
 
@@ -273,7 +273,7 @@ It takes a variable number of parameters, each of which is the
 name of ref that was actually updated.
 
 This hook is meant primarily for notification, and cannot affect
-the outcome of `git-receive-pack`.
+the outcome of 'git-receive-pack'.
 
 The 'post-update' hook can tell what are the heads that were pushed,
 but it does not know what their original and updated values are,
@@ -283,20 +283,20 @@ updated values of the refs. You might consider it instead if you need
 them.
 
 When enabled, the default 'post-update' hook runs
-`git-update-server-info` to keep the information used by dumb
+'git-update-server-info' to keep the information used by dumb
 transports (e.g., HTTP) up-to-date.  If you are publishing
 a git repository that is accessible via HTTP, you should
 probably enable this hook.
 
 Both standard output and standard error output are forwarded to
-`git-send-pack` on the other end, so you can simply `echo` messages
+'git-send-pack' on the other end, so you can simply `echo` messages
 for the user.
 
 pre-auto-gc
 -----------
 
-This hook is invoked by `git-gc --auto`. It takes no parameter, and
-exiting with non-zero status from this script causes the `git-gc --auto`
+This hook is invoked by 'git-gc --auto'. It takes no parameter, and
+exiting with non-zero status from this script causes the 'git-gc --auto'
 to abort.
 
 GIT
index cafdac7e3daafb4df5e7eb1d237e44ab83734be8..fc0efd8ec8dcc791c528d0eca362172f7e445164 100644 (file)
@@ -51,10 +51,10 @@ the user's editor of choice) generally go into a file specified by
 `core.excludesfile` in the user's `~/.gitconfig`.
 
 The underlying git plumbing tools, such as
-`git-ls-files` and `git-read-tree`, read
+'git-ls-files' and 'git-read-tree', read
 `gitignore` patterns specified by command-line options, or from
 files specified by command-line options.  Higher-level git
-tools, such as `git-status` and `git-add`,
+tools, such as 'git-status' and 'git-add',
 use patterns from the sources specified above.
 
 Patterns have the following format:
index 03688bfa6bf288c467800de01ba367efd9ebf3fd..e02ecf57444df14d61d82dcf2f9e0c3f6b990b91 100644 (file)
@@ -22,7 +22,7 @@ git repository.
 OPTIONS
 -------
 To control which revisions to shown, the command takes options applicable to
-the `git-rev-list` command (see linkgit:git-rev-list[1]).
+the 'git-rev-list' command (see linkgit:git-rev-list[1]).
 This manual page describes only the most
 frequently used options.
 
index ade812e0e655f36811d0ca9833f0592d5b0ed15b..a969b3fbc3efc99ce490455b93c8bfb912994e2e 100644 (file)
@@ -64,7 +64,7 @@ objects/info/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
+       published for dumb transports.  'git-repack' does this
        by default.
 
 objects/info/alternates::
@@ -85,7 +85,7 @@ objects/info/http-alternates::
 
 refs::
        References are stored in subdirectories of this
-       directory.  The `git-prune` command knows to keep
+       directory.  The 'git-prune' command knows to keep
        objects reachable from refs found in this directory and
        its subdirectories.
 
@@ -125,7 +125,7 @@ details.
 
 branches::
        A slightly deprecated way to store shorthands to be used
-       to specify URL to `git-fetch`, `git-pull` and `git-push`
+       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.
@@ -133,7 +133,7 @@ branches::
 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
+       'git-init' is run, but all of them are disabled by
        default.  To enable, they need to be made executable.
        Read linkgit:githooks[5] for more details about
        each hook.
@@ -150,10 +150,10 @@ 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
+       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
+       'git-receive-pack' command when you 'git-push' into the
        repository.
 
 info/grafts::
@@ -167,14 +167,14 @@ info/grafts::
 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
+       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.
+       'git-fetch', 'git-pull' and 'git-push' commands.
 
 logs::
        Records of changes made to refs are stored in this
index 6c93445cc1d57f509e31c69870b2e1738e2883e7..660904686c656fd00078aa272d0b9a5a198e1833 100644 (file)
@@ -255,7 +255,7 @@ index a042389..513feba 100644
 +hello world, again
 ------------------------------------------------
 
-So `git-diff` is comparing against something other than the head.
+So 'git-diff' is comparing against something other than the head.
 The thing that it's comparing against is actually the index file,
 which is stored in .git/index in a binary format, but whose contents
 we can examine with ls-files:
@@ -270,9 +270,9 @@ hello world!
 hello world, again
 ------------------------------------------------
 
-So what our `git-add` did was store a new blob and then put
+So what our 'git-add' did was store a new blob and then put
 a reference to it in the index file.  If we modify the file again,
-we'll see that the new modifications are reflected in the `git-diff`
+we'll see that the new modifications are reflected in the 'git-diff'
 output:
 
 ------------------------------------------------
@@ -287,7 +287,7 @@ index 513feba..ba3da7b 100644
 +again?
 ------------------------------------------------
 
-With the right arguments, `git-diff` can also show us the difference
+With the right arguments, 'git-diff' can also show us the difference
 between the working directory and the last commit, or between the
 index and the last commit:
 
@@ -311,7 +311,7 @@ index a042389..513feba 100644
 +hello world, again
 ------------------------------------------------
 
-At any time, we can create a new commit using `git-commit` (without
+At any time, we can create a new commit using 'git-commit' (without
 the "-a" option), and verify that the state committed only includes the
 changes stored in the index file, not the additional change that is
 still only in our working tree:
@@ -329,11 +329,11 @@ index 513feba..ba3da7b 100644
 +again?
 ------------------------------------------------
 
-So by default `git-commit` uses the index to create the commit, not
+So by default 'git-commit' uses the index to create the commit, not
 the working tree; the "-a" option to commit tells it to first update
 the index with all changes in the working tree.
 
-Finally, it's worth looking at the effect of `git-add` on the index
+Finally, it's worth looking at the effect of 'git-add' on the index
 file:
 
 ------------------------------------------------
@@ -341,7 +341,7 @@ $ echo "goodbye, world" >closing.txt
 $ git add closing.txt
 ------------------------------------------------
 
-The effect of the `git-add` was to add one entry to the index file:
+The effect of the 'git-add' was to add one entry to the index file:
 
 ------------------------------------------------
 $ git ls-files --stage
index 036a27c41c7d64f44f032de79e29066c1222bbbf..e71b561172030bbd4c524891f6525fadd160b54b 100644 (file)
@@ -58,7 +58,7 @@ You've now initialized the working directory--you may notice a new
 directory created, named ".git".
 
 Next, tell git to take a snapshot of the contents of all files under the
-current directory (note the '.'), with `git-add`:
+current directory (note the '.'), with 'git-add':
 
 ------------------------------------------------
 $ git add .
@@ -66,7 +66,7 @@ $ git add .
 
 This snapshot is now stored in a temporary staging area which git calls
 the "index".  You can permanently store the contents of the index in the
-repository with `git-commit`:
+repository with 'git-commit':
 
 ------------------------------------------------
 $ git commit
@@ -85,15 +85,15 @@ $ git add file1 file2 file3
 ------------------------------------------------
 
 You are now ready to commit.  You can see what is about to be committed
-using `git-diff` with the --cached option:
+using 'git-diff' with the --cached option:
 
 ------------------------------------------------
 $ git diff --cached
 ------------------------------------------------
 
-(Without --cached, `git-diff` will show you any changes that
+(Without --cached, 'git-diff' will show you any changes that
 you've made but not yet added to the index.)  You can also get a brief
-summary of the situation with `git-status`:
+summary of the situation with 'git-status':
 
 ------------------------------------------------
 $ git status
@@ -117,7 +117,7 @@ $ git commit
 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
+Alternatively, instead of running 'git-add' beforehand, you can use
 
 ------------------------------------------------
 $ git commit -a
@@ -138,7 +138,7 @@ Git tracks content not files
 
 Many revision control systems provide an `add` command that tells the
 system to start tracking changes to a new file.  Git's `add` command
-does something simpler and more powerful: `git-add` is used both for new
+does something simpler and more powerful: 'git-add' is used both for new
 and newly modified files, and in both cases it takes a snapshot of the
 given files and stages that content in the index, ready for inclusion in
 the next commit.
@@ -316,7 +316,7 @@ $ git remote add bob /home/bob/myrepo
 ------------------------------------------------
 
 With this, Alice can perform the first operation alone using the
-`git-fetch` command without merging them with her own branch,
+'git-fetch' command without merging them with her own branch,
 using:
 
 -------------------------------------
@@ -324,7 +324,7 @@ $ git fetch bob
 -------------------------------------
 
 Unlike the longhand form, when Alice fetches from Bob using a
-remote repository shorthand set up with `git-remote`, what was
+remote repository shorthand set up with 'git-remote', what was
 fetched is stored in a remote tracking branch, in this case
 `bob/master`.  So after this:
 
@@ -368,7 +368,7 @@ $ git config --get remote.origin.url
 /home/alice/project
 -------------------------------------
 
-(The complete configuration created by `git-clone` is visible using
+(The complete configuration created by 'git-clone' is visible using
 `git config -l`, and the linkgit:git-config[1] man page
 explains the meaning of each option.)
 
@@ -398,7 +398,7 @@ Exploring history
 -----------------
 
 Git history is represented as a series of interrelated commits.  We
-have already seen that the `git-log` command can list those commits.
+have already seen that the 'git-log' command can list those commits.
 Note that first line of each git log entry also gives a name for the
 commit:
 
@@ -411,7 +411,7 @@ Date:   Tue May 16 17:18:22 2006 -0700
     merge-base: Clarify the comments on post processing.
 -------------------------------------
 
-We can give this name to `git-show` to see the details about this
+We can give this name to 'git-show' to see the details about this
 commit.
 
 -------------------------------------
@@ -469,13 +469,13 @@ $ git reset --hard HEAD^ # reset your current branch and working
 Be careful with that last command: in addition to losing any changes
 in the working directory, it will also remove all later commits from
 this branch.  If this branch is the only branch containing those
-commits, they will be lost.  Also, don't use `git-reset` on a
+commits, they will be lost.  Also, don't use 'git-reset' on a
 publicly-visible branch that other developers pull from, as it will
 force needless merges on other developers to clean up the history.
-If you need to undo changes that you have pushed, use `git-revert`
+If you need to undo changes that you have pushed, use 'git-revert'
 instead.
 
-The `git-grep` command can search for strings in any version of your
+The 'git-grep' command can search for strings in any version of your
 project, so
 
 -------------------------------------
@@ -484,7 +484,7 @@ $ git grep "hello" v2.5
 
 searches for all occurrences of "hello" in v2.5.
 
-If you leave out the commit name, `git-grep` will search any of the
+If you leave out the commit name, 'git-grep' will search any of the
 files it manages in your current directory.  So
 
 -------------------------------------
@@ -494,7 +494,7 @@ $ git grep "hello"
 is a quick way to search just the files that are tracked by git.
 
 Many git commands also take sets of commits, which can be specified
-in a number of ways.  Here are some examples with `git-log`:
+in a number of ways.  Here are some examples with 'git-log':
 
 -------------------------------------
 $ git log v2.5..v2.6            # commits between v2.5 and v2.6
@@ -504,7 +504,7 @@ $ git log v2.5.. Makefile       # commits since v2.5 which modify
                                # Makefile
 -------------------------------------
 
-You can also give `git-log` a "range" of commits where the first is not
+You can also give 'git-log' a "range" of commits where the first is not
 necessarily an ancestor of the second; for example, if the tips of
 the branches "stable-release" and "master" diverged from a common
 commit some time ago, then
@@ -523,13 +523,13 @@ $ git log experimental..stable
 will show the list of commits made on the stable branch but not
 the experimental branch.
 
-The `git-log` command has a weakness: it must present commits in a
+The 'git-log' command has a weakness: it must present commits in a
 list.  When the history has lines of development that diverged and
-then merged back together, the order in which `git-log` presents
+then merged back together, the order in which 'git-log' presents
 those commits is meaningless.
 
 Most projects with multiple contributors (such as the linux kernel,
-or git itself) have frequent merges, and `gitk` does a better job of
+or git itself) have frequent merges, and 'gitk' does a better job of
 visualizing their history.  For example,
 
 -------------------------------------
@@ -549,7 +549,7 @@ of the file:
 $ git diff v2.5:Makefile HEAD:Makefile.in
 -------------------------------------
 
-You can also use `git-show` to see any such file:
+You can also use 'git-show' to see any such file:
 
 -------------------------------------
 $ git show v2.5:Makefile
index 1e188e6e742d06056fcd8eafd89c13ef36685d4e..fb0d7da56b902217f8f1f4d4bc85186d6bf0dc4c 100644 (file)
@@ -21,7 +21,7 @@ project find it more convenient to use legacy encodings, git
 does not forbid it.  However, there are a few things to keep in
 mind.
 
-. `git-commit-tree` (hence, `git-commit` which uses it) issues
+. 'git-commit-tree' (hence, 'git-commit' which uses it) issues
   a warning if the commit log message given to it does not look
   like a valid UTF-8 string, unless you explicitly say your
   project uses a legacy encoding.  The way to say this is to
@@ -37,7 +37,7 @@ of `i18n.commitencoding` in its `encoding` header.  This is to
 help other people who look at them later.  Lack of this header
 implies that the commit log message is encoded in UTF-8.
 
-. `git-log`, `git-show` and friends looks at the `encoding`
+. 'git-log', 'git-show' and friends looks at the `encoding`
   header of a commit object, and tries to re-code the log
   message into UTF-8 unless otherwise specified.  You can
   specify the desired output encoding with
index 5433cf8cedc466d2da56386ec4b5f4f9f462ef5b..35f440876ed182de319b6d3f0b8296b1a1ede29d 100755 (executable)
@@ -6,7 +6,7 @@ head="$1"
 mandir="$2"
 SUBDIRECTORY_OK=t
 USAGE='<refname> <target directory>'
-. git-sh-setup
+. "$(git --exec-path)"/git-sh-setup
 cd_to_toplevel
 
 test -z "$mandir" && usage
index ffbc6e9861094f48fd3f24af3a0b343c9c0ea7f4..007909a82fe77325e46c54799d00dc78493a47f9 100644 (file)
@@ -56,5 +56,5 @@
        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).
+       is used instead ('git-merge-recursive' when merging a single
+       head, 'git-merge-octopus' otherwise).
index ec3755579408ebae58c7de644609590f5636b9c6..69e6d2fa4459313e4a6bdda77847d74d9219e2e1 100644 (file)
@@ -30,7 +30,7 @@ This is designed to be as compact as possible.
 
          commit <sha1>
          Author: <author>
-         Date: <date>
+         Date: <author date>
 
              <title line>
 
@@ -50,9 +50,9 @@ This is designed to be as compact as possible.
 
          commit <sha1>
          Author: <author>
-         AuthorDate: <date & time>
+         AuthorDate: <author date>
          Commit: <committer>
-         CommitDate: <date & time>
+         CommitDate: <committer date>
 
               <title line>
 
@@ -62,7 +62,7 @@ This is designed to be as compact as possible.
 
          From <sha1> <date>
          From: <author>
-         Date: <date & time>
+         Date: <author date>
          Subject: [PATCH] <title line>
 
          <full commit message>
index cbee369947bf43c245994607ba5d3f77246cce6d..00a8d210476089257be3d09ac8a16d1f8e1dd8dc 100644 (file)
@@ -32,7 +32,7 @@ must know this is the expected usage pattern for a branch.
 [NOTE]
 You never do your own development on branches that appear
 on the right hand side of a <refspec> colon on `Pull:` lines;
-they are to be updated by `git-fetch`.  If you intend to do
+they are to be updated by 'git-fetch'.  If you intend to do
 development derived from a remote branch `B`, have a `Pull:`
 line to track it (i.e. `Pull: B:remote-B`), and have a separate
 branch `my-B` to do your development on top of it.  The latter
@@ -44,13 +44,13 @@ on the remote branch, merge it into your development branch with
 +
 [NOTE]
 There is a difference between listing multiple <refspec>
-directly on `git-pull` command line and having multiple
+directly on 'git-pull' command line and having multiple
 `Pull:` <refspec> lines for a <repository> and running
-`git-pull` command without any explicit <refspec> parameters.
+'git-pull' command without any explicit <refspec> parameters.
 <refspec> listed explicitly on the command line are always
 merged into the current branch after fetching.  In other words,
 if you list more than one remote refs, you would be making
-an Octopus.  While `git-pull` run without any explicit <refspec>
+an Octopus.  While 'git-pull' run without any explicit <refspec>
 parameter takes default <refspec>s from `Pull:` lines, it
 merges only the first <refspec> found into the current branch,
 after fetching all the remote refs.  This is because making an
index 99753006e290040be941194b23c7ab26d9e9354e..504ae8a53bca42d7c9ec560b65ddfe14699387a4 100644 (file)
@@ -49,8 +49,8 @@ following format:
 
 ------------
 
-`Push:` lines are used by `git-push` and
-`Pull:` lines are used by `git-pull` and `git-fetch`.
+`Push:` lines are used by 'git-push' and
+`Pull:` lines are used by 'git-pull' and 'git-fetch'.
 Multiple `Push:` and `Pull:` lines may
 be specified for additional branch mappings.
 
index ca13266b113c058af9eee3052a404521defee094..92d400753d192b4b6df256fc3b872d775ecaacd4 100644 (file)
@@ -518,7 +518,7 @@ $ git bisect visualize
 -------------------------------------------------
 
 which will run gitk and label the commit it chose with a marker that
-says "bisect".  Chose a safe-looking commit nearby, note its commit
+says "bisect".  Choose a safe-looking commit nearby, note its commit
 id, and check it out with:
 
 -------------------------------------------------
@@ -1303,7 +1303,7 @@ $ git diff -3 file.txt            # diff against stage 3
 $ git diff --theirs file.txt   # same as the above.
 -------------------------------------------------
 
-The linkgit:git-log[1] and gitk[1] commands also provide special help
+The linkgit:git-log[1] and linkgit:gitk[1] commands also provide special help
 for merges:
 
 -------------------------------------------------
@@ -1963,10 +1963,10 @@ error: failed to push to 'ssh://yourserver.com/~you/proj.git'
 
 This can happen, for example, if you:
 
-       - use `git reset --hard` to remove already-published commits, or
-       - use `git commit --amend` to replace already-published commits
+       - use `git-reset --hard` to remove already-published commits, or
+       - use `git-commit --amend` to replace already-published commits
          (as in <<fixing-a-mistake-by-rewriting-history>>), or
-       - use `git rebase` to rebase any already-published commits (as
+       - use `git-rebase` to rebase any already-published commits (as
          in <<using-git-rebase>>).
 
 You may force git-push to perform the update anyway by preceding the
@@ -1988,8 +1988,8 @@ intend to manage the branch.
 
 It's also possible for a push to fail in this way when other people have
 the right to push to the same repository.  In that case, the correct
-solution is to retry the push after first updating your work by either a
-pull or a fetch followed by a rebase; see the
+solution is to retry the push after first updating your work: either by a
+pull, or by a fetch followed by a rebase; see the
 <<setting-up-a-shared-repository,next section>> and
 linkgit:gitcvs-migration[7] for more.
 
@@ -2170,7 +2170,7 @@ they are for, or what status they are in.  To get a reminder of what
 changes are in a specific branch, use:
 
 -------------------------------------------------
-$ git log linux..branchname | git-shortlog
+$ git log linux..branchname | git shortlog
 -------------------------------------------------
 
 To see whether it has already been merged into the test or release branches,
@@ -2443,8 +2443,8 @@ patches to the new mywork.  The result will look like:
 ................................................
 
 In the process, it may discover conflicts.  In that case it will stop
-and allow you to fix the conflicts; after fixing conflicts, use "git
-add" to update the index with those contents, and then, instead of
+and allow you to fix the conflicts; after fixing conflicts, use "git-add"
+to update the index with those contents, and then, instead of
 running git-commit, just run
 
 -------------------------------------------------
@@ -2700,8 +2700,8 @@ master branch.  In more detail:
 git fetch and fast-forwards
 ---------------------------
 
-In the previous example, when updating an existing branch, "git
-fetch" checks to make sure that the most recent commit on the remote
+In the previous example, when updating an existing branch, "git-fetch"
+checks to make sure that the most recent commit on the remote
 branch is a descendant of the most recent commit on your copy of the
 branch before updating your copy of the branch to point at the new
 commit.  Git calls this process a <<fast-forwards,fast forward>>.
@@ -2726,7 +2726,7 @@ resulting in a situation like:
             o--o--o <-- new head of the branch
 ................................................
 
-In this case, "git fetch" will fail, and print out a warning.
+In this case, "git-fetch" will fail, and print out a warning.
 
 In that case, you can still force git to update to the new head, as
 described in the following section.  However, note that in the
@@ -2861,7 +2861,7 @@ There are four different types of objects: "blob", "tree", "commit", and
 "tag".
 
 - A <<def_blob_object,"blob" object>> is used to store file data.
-- A <<def_tree_object,"tree" object>> is an object that ties one or more
+- A <<def_tree_object,"tree" object>> ties one or more
   "blob" objects into a directory structure. In addition, a tree object
   can refer to other tree objects, thus creating a directory hierarchy.
 - A <<def_commit_object,"commit" object>> ties such directory hierarchies
@@ -3036,7 +3036,7 @@ Tag Object
 
 A tag object contains an object, object type, tag name, the name of the
 person ("tagger") who created the tag, and a message, which may contain
-a signature, as can be seen using the linkgit:git-cat-file[1]:
+a signature, as can be seen using linkgit:git-cat-file[1]:
 
 ------------------------------------------------
 $ git cat-file tag v1.5.0
@@ -3106,7 +3106,7 @@ $ git prune
 
 to remove any of the "loose" objects that are now contained in the
 pack.  This will also remove any unreferenced objects (which may be
-created when, for example, you use "git reset" to remove a commit).
+created when, for example, you use "git-reset" to remove a commit).
 You can verify that the loose objects are gone by looking at the
 .git/objects directory or by running
 
@@ -3135,7 +3135,7 @@ branch still exists, as does everything it pointed to. The branch
 pointer itself just doesn't, since you replaced it with another one.
 
 There are also other situations that cause dangling objects. For
-example, a "dangling blob" may arise because you did a "git add" of a
+example, a "dangling blob" may arise because you did a "git-add" of a
 file, but then, before you actually committed it and made it part of the
 bigger picture, you changed something else in that file and committed
 that *updated* thing--the old state that you added originally ends up
@@ -3185,7 +3185,7 @@ Usually, dangling blobs and trees aren't very interesting. They're
 almost always the result of either being a half-way mergebase (the blob
 will often even have the conflict markers from a merge in it, if you
 have had conflicting merges that you fixed up by hand), or simply
-because you interrupted a "git fetch" with ^C or something like that,
+because you interrupted a "git-fetch" with ^C or something like that,
 leaving _some_ of the new objects in the object database, but just
 dangling and useless.
 
@@ -3694,7 +3694,7 @@ removed. The only thing `--remove` means is that update-index will be
 considering a removed file to be a valid thing, and if the file really
 does not exist any more, it will update the index accordingly.
 
-As a special case, you can also do `git-update-index --refresh`, which
+As a special case, you can also do `git update-index --refresh`, which
 will refresh the "stat" information of each index to match the current
 stat information. It will 'not' update the object status itself, and
 it will only update the fields that are used to quickly test whether
@@ -3770,7 +3770,7 @@ from one representation to the other:
 Tying it all together
 ~~~~~~~~~~~~~~~~~~~~~
 
-To commit a tree you have instantiated with "git-write-tree", you'd
+To commit a tree you have instantiated with "git write-tree", you'd
 create a "commit" object that refers to that tree and the history
 behind it--most notably the "parent" commits that preceded it in
 history.
@@ -3927,7 +3927,7 @@ $ git read-tree -m -u <origtree> <yourtree> <targettree>
 
 which will do all trivial merge operations for you directly in the
 index file, and you can just write the result out with
-`git-write-tree`.
+`git write-tree`.
 
 
 [[merging-multiple-trees-2]]
@@ -3986,13 +3986,13 @@ $ mv -f hello.c~2 hello.c
 $ git update-index hello.c
 -------------------------------------------------
 
-When a path is in unmerged state, running `git-update-index` for
+When a path is in the "unmerged" state, running `git-update-index` for
 that path tells git to mark the path resolved.
 
 The above is the description of a git merge at the lowest level,
 to help you understand what conceptually happens under the hood.
-In practice, nobody, not even git itself, uses three `git-cat-file`
-for this.  There is `git-merge-index` program that extracts the
+In practice, nobody, not even git itself, runs `git-cat-file` three times
+for this.  There is `git-merge-index` program that extracts the
 stages to temporary files and calls a "merge" script on it:
 
 -------------------------------------------------
@@ -4061,7 +4061,7 @@ Note that terminology has changed since that revision.  For example, the
 README in that revision uses the word "changeset" to describe what we
 now call a <<def_commit_object,commit>>.
 
-Also, we do not call it "cache" any more, but "index", however, the
+Also, we do not call it "cache" any more, but rather "index"; however, the
 file is still called `cache.h`.  Remark: Not much reason to change it now,
 especially since there is no good single name for it anyway, because it is
 basically _the_ header file which is included by _all_ of Git's C sources.
@@ -4095,7 +4095,7 @@ functions like `get_sha1_basic()` or the likes.
 This is just to get you into the groove for the most libified part of Git:
 the revision walker.
 
-Basically, the initial version of `git log` was a shell script:
+Basically, the initial version of `git-log` was a shell script:
 
 ----------------------------------------------------------------
 $ git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | \
@@ -4130,7 +4130,7 @@ just have a look at the first implementation of `cmd_log()`; call
 `git show v1.3.0{tilde}155^2{tilde}4` and scroll down to that function (note that you
 no longer need to call `setup_pager()` directly).
 
-Nowadays, `git log` is a builtin, which means that it is _contained_ in the
+Nowadays, `git-log` is a builtin, which means that it is _contained_ in the
 command `git`.  The source side of a builtin is
 
 - a function called `cmd_<bla>`, typically defined in `builtin-<bla>.c`,
@@ -4146,7 +4146,7 @@ since they share quite a bit of code.  In that case, the commands which are
 _not_ named like the `.c` file in which they live have to be listed in
 `BUILT_INS` in the `Makefile`.
 
-`git log` looks more complicated in C than it does in the original script,
+`git-log` looks more complicated in C than it does in the original script,
 but that allows for a much greater flexibility and performance.
 
 Here again it is a good point to take a pause.
@@ -4157,9 +4157,9 @@ the organization of Git (after you know the basic concepts).
 So, think about something which you are interested in, say, "how can I
 access a blob just knowing the object name of it?".  The first step is to
 find a Git command with which you can do it.  In this example, it is either
-`git show` or `git cat-file`.
+`git-show` or `git-cat-file`.
 
-For the sake of clarity, let's stay with `git cat-file`, because it
+For the sake of clarity, let's stay with `git-cat-file`, because it
 
 - is plumbing, and
 
diff --git a/INSTALL b/INSTALL
index 4a4e13fe46567a567b1ceb09a792379674dc6f57..7d0c2c2f865d6ed969038e7543dbeb8933723ec3 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -24,23 +24,15 @@ set up install paths (via config.mak.autogen), so you can write instead
 
 Issues of note:
 
- - git normally installs a helper script wrapper called "git", which
-   conflicts with a similarly named "GNU interactive tools" program.
-
-   Tough.  Either don't use the wrapper script, or delete the old GNU
-   interactive tools.  None of the core git stuff needs the wrapper,
-   it's just a convenient shorthand and while it is documented in some
-   places, you can always replace "git commit" with "git-commit"
-   instead.
-
-   But let's face it, most of us don't have GNU interactive tools, and
-   even if we had it, we wouldn't know what it does.  I don't think it
-   has been actively developed since 1997, and people have moved over to
-   graphical file managers.
-
-   NOTE: As of gnuit-4.9.2, the GNU interactive tools package has been
-         renamed. You can compile gnuit with the --disable-transition
-         option and then it will not conflict with git.
+ - Ancient versions of GNU Interactive Tools (pre-4.9.2) installed a
+   program "git", whose name conflicts with this program.  But with
+   version 4.9.2, after long hiatus without active maintenance (since
+   around 1997), it changed its name to gnuit and the name conflict is no
+   longer a problem.
+
+   NOTE: When compiled with backward compatiblity option, the GNU
+   Interactive Tools package still can install "git", but you can build it
+   with --disable-transition option to avoid this.
 
  - You can use git after building but without installing if you
    wanted to.  Various git commands need to find other git
index 78e08d37459bd3804b9c05e8b3bcf621e0cd0c5f..4796565ab3a8e7c9bbe7f6fd092713064dce2c1a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -241,7 +241,6 @@ SCRIPT_SH += git-merge-octopus.sh
 SCRIPT_SH += git-merge-one-file.sh
 SCRIPT_SH += git-merge-resolve.sh
 SCRIPT_SH += git-merge.sh
-SCRIPT_SH += git-merge-stupid.sh
 SCRIPT_SH += git-mergetool.sh
 SCRIPT_SH += git-parse-remote.sh
 SCRIPT_SH += git-pull.sh
@@ -1266,7 +1265,7 @@ endif
 
 ### Testing rules
 
-TEST_PROGRAMS = test-chmtime$X test-genrandom$X test-date$X test-delta$X test-sha1$X test-match-trees$X test-absolute-path$X test-parse-options$X
+TEST_PROGRAMS = test-chmtime$X test-genrandom$X test-date$X test-delta$X test-sha1$X test-match-trees$X test-parse-options$X test-path-utils$X
 
 all:: $(TEST_PROGRAMS)
 
@@ -1429,7 +1428,7 @@ check-docs::
        do \
                case "$$v" in \
                git-merge-octopus | git-merge-ours | git-merge-recursive | \
-               git-merge-resolve | git-merge-stupid | git-merge-subtree | \
+               git-merge-resolve | git-merge-subtree | \
                git-fsck-objects | git-init-db | \
                git-?*--?* ) continue ;; \
                esac ; \
index 9fcfe3955dcd1aaca92a812b6253a331290922fa..d13313f1051eb3f7374cf4119923b230fd6f81d8 100644 (file)
@@ -58,6 +58,8 @@ static int whitespace_error;
 static int squelch_whitespace_errors = 5;
 static int applied_after_fixing_ws;
 static const char *patch_input_file;
+static const char *root;
+static int root_len;
 
 static void parse_whitespace_option(const char *option)
 {
@@ -340,6 +342,8 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
                                 */
                                strbuf_remove(&name, 0, cp - name.buf);
                                free(def);
+                               if (root)
+                                       strbuf_insert(&name, 0, root, root_len);
                                return strbuf_detach(&name, NULL);
                        }
                }
@@ -378,6 +382,14 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
                free(def);
        }
 
+       if (root) {
+               char *ret = xmalloc(root_len + len + 1);
+               strcpy(ret, root);
+               memcpy(ret + root_len, start, len);
+               ret[root_len + len] = '\0';
+               return ret;
+       }
+
        return xmemdupz(start, len);
 }
 
@@ -919,7 +931,7 @@ static void recount_diff(char *line, int size, struct fragment *fragment)
                        newlines++;
                        continue;
                case '\\':
-                       break;
+                       continue;
                case '@':
                        ret = size < 3 || prefixcmp(line, "@@ ");
                        break;
@@ -2284,7 +2296,8 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry *
 
        strbuf_init(&buf, 0);
 
-       if ((tpatch = in_fn_table(patch->old_name)) != NULL) {
+       if (!(patch->is_copy || patch->is_rename) &&
+           ((tpatch = in_fn_table(patch->old_name)) != NULL)) {
                if (tpatch == (struct patch *) -1) {
                        return error("patch %s has been renamed/deleted",
                                patch->old_name);
@@ -2363,7 +2376,7 @@ static int verify_index_match(struct cache_entry *ce, struct stat *st)
 static int check_preimage(struct patch *patch, struct cache_entry **ce, struct stat *st)
 {
        const char *old_name = patch->old_name;
-       struct patch *tpatch;
+       struct patch *tpatch = NULL;
        int stat_ret = 0;
        unsigned st_mode = 0;
 
@@ -2377,7 +2390,9 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
                return 0;
 
        assert(patch->is_new <= 0);
-       if ((tpatch = in_fn_table(old_name)) != NULL) {
+
+       if (!(patch->is_copy || patch->is_rename) &&
+           (tpatch = in_fn_table(old_name)) != NULL) {
                if (tpatch == (struct patch *) -1) {
                        return error("%s: has been deleted/renamed", old_name);
                }
@@ -2387,6 +2402,7 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
                if (stat_ret && errno != ENOENT)
                        return error("%s: %s", old_name, strerror(errno));
        }
+
        if (check_index && !tpatch) {
                int pos = cache_name_pos(old_name, strlen(old_name));
                if (pos < 0) {
@@ -3240,6 +3256,18 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
                        options |= RECOUNT;
                        continue;
                }
+               if (!prefixcmp(arg, "--directory=")) {
+                       arg += strlen("--directory=");
+                       root_len = strlen(arg);
+                       if (root_len && arg[root_len - 1] != '/') {
+                               char *new_root;
+                               root = new_root = xmalloc(root_len + 2);
+                               strcpy(new_root, arg);
+                               strcpy(new_root + root_len++, "/");
+                       } else
+                               root = arg;
+                       continue;
+               }
                if (0 < prefix_length)
                        arg = prefix_filename(prefix, prefix_length, arg);
 
index d279702ba9a90faa020fa2f102d595cec082be21..ff71f3d8a6dd784ae08f89b8a98136e4cd369295 100644 (file)
@@ -282,6 +282,21 @@ static int ref_cmp(const void *r1, const void *r2)
        return strcmp(c1->name, c2->name);
 }
 
+static void fill_tracking_info(char *stat, const char *branch_name)
+{
+       int ours, theirs;
+       struct branch *branch = branch_get(branch_name);
+
+       if (!stat_tracking_info(branch, &ours, &theirs) || (!ours && !theirs))
+               return;
+       if (!ours)
+               sprintf(stat, "[behind %d] ", theirs);
+       else if (!theirs)
+               sprintf(stat, "[ahead %d] ", ours);
+       else
+               sprintf(stat, "[ahead %d, behind %d] ", ours, theirs);
+}
+
 static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
                           int abbrev, int current)
 {
@@ -310,8 +325,10 @@ static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
        if (verbose) {
                struct strbuf subject;
                const char *sub = " **** invalid ref ****";
+               char stat[128];
 
                strbuf_init(&subject, 0);
+               stat[0] = '\0';
 
                commit = lookup_commit(item->sha1);
                if (commit && !parse_commit(commit)) {
@@ -319,10 +336,15 @@ static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
                                            &subject, 0, NULL, NULL, 0, 0);
                        sub = subject.buf;
                }
-               printf("%c %s%-*s%s %s %s\n", c, branch_get_color(color),
+
+               if (item->kind == REF_LOCAL_BRANCH)
+                       fill_tracking_info(stat, item->name);
+
+               printf("%c %s%-*s%s %s %s%s\n", c, branch_get_color(color),
                       maxwidth, item->name,
                       branch_get_color(COLOR_BRANCH_RESET),
-                      find_unique_abbrev(item->sha1, abbrev), sub);
+                      find_unique_abbrev(item->sha1, abbrev),
+                      stat, sub);
                strbuf_release(&subject);
        } else {
                printf("%c %s%s%s\n", c, branch_get_color(color), item->name,
index 93ea69bfaa083f49a6e808c7317ea1910b29c847..d6641c2c562c6b35bfed1cd3053945b460472581 100644 (file)
@@ -305,97 +305,15 @@ static int merge_working_tree(struct checkout_opts *opts,
        return 0;
 }
 
-static void report_tracking(struct branch_info *new, struct checkout_opts *opts)
+static void report_tracking(struct branch_info *new)
 {
-       /*
-        * We have switched to a new branch; is it building on
-        * top of another branch, and if so does that other branch
-        * have changes we do not have yet?
-        */
-       char *base;
-       unsigned char sha1[20];
-       struct commit *ours, *theirs;
-       char symmetric[84];
-       struct rev_info revs;
-       const char *rev_argv[10];
-       int rev_argc;
-       int num_ours, num_theirs;
-       const char *remote_msg;
+       struct strbuf sb = STRBUF_INIT;
        struct branch *branch = branch_get(new->name);
 
-       /*
-        * Nothing to report unless we are marked to build on top of
-        * somebody else.
-        */
-       if (!branch || !branch->merge || !branch->merge[0] || !branch->merge[0]->dst)
-               return;
-
-       /*
-        * If what we used to build on no longer exists, there is
-        * nothing to report.
-        */
-       base = branch->merge[0]->dst;
-       if (!resolve_ref(base, sha1, 1, NULL))
+       if (!format_tracking_info(branch, &sb))
                return;
-
-       theirs = lookup_commit(sha1);
-       ours = new->commit;
-       if (!hashcmp(sha1, ours->object.sha1))
-               return; /* we are the same */
-
-       /* Run "rev-list --left-right ours...theirs" internally... */
-       rev_argc = 0;
-       rev_argv[rev_argc++] = NULL;
-       rev_argv[rev_argc++] = "--left-right";
-       rev_argv[rev_argc++] = symmetric;
-       rev_argv[rev_argc++] = "--";
-       rev_argv[rev_argc] = NULL;
-
-       strcpy(symmetric, sha1_to_hex(ours->object.sha1));
-       strcpy(symmetric + 40, "...");
-       strcpy(symmetric + 43, sha1_to_hex(theirs->object.sha1));
-
-       init_revisions(&revs, NULL);
-       setup_revisions(rev_argc, rev_argv, &revs, NULL);
-       prepare_revision_walk(&revs);
-
-       /* ... and count the commits on each side. */
-       num_ours = 0;
-       num_theirs = 0;
-       while (1) {
-               struct commit *c = get_revision(&revs);
-               if (!c)
-                       break;
-               if (c->object.flags & SYMMETRIC_LEFT)
-                       num_ours++;
-               else
-                       num_theirs++;
-       }
-
-       if (!prefixcmp(base, "refs/remotes/")) {
-               remote_msg = " remote";
-               base += strlen("refs/remotes/");
-       } else {
-               remote_msg = "";
-       }
-
-       if (!num_theirs)
-               printf("Your branch is ahead of the tracked%s branch '%s' "
-                      "by %d commit%s.\n",
-                      remote_msg, base,
-                      num_ours, (num_ours == 1) ? "" : "s");
-       else if (!num_ours)
-               printf("Your branch is behind the tracked%s branch '%s' "
-                      "by %d commit%s,\n"
-                      "and can be fast-forwarded.\n",
-                      remote_msg, base,
-                      num_theirs, (num_theirs == 1) ? "" : "s");
-       else
-               printf("Your branch and the tracked%s branch '%s' "
-                      "have diverged,\nand respectively "
-                      "have %d and %d different commit(s) each.\n",
-                      remote_msg, base,
-                      num_ours, num_theirs);
+       fputs(sb.buf, stdout);
+       strbuf_release(&sb);
 }
 
 static void update_refs_for_switch(struct checkout_opts *opts,
@@ -441,7 +359,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
        remove_branch_state();
        strbuf_release(&msg);
        if (!opts->quiet && (new->path || !strcmp(new->name, "HEAD")))
-               report_tracking(new, opts);
+               report_tracking(new);
 }
 
 static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
index 643c7d41697868456c94f879bd3357b91744f4db..ec362096003be447f1d84f8203d37e577911f4f9 100644 (file)
@@ -341,6 +341,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        const struct ref *refs, *head_points_at, *remote_head, *mapped_refs;
        char branch_top[256], key[256], value[256];
        struct strbuf reflog_msg;
+       struct transport *transport = NULL;
 
        struct refspec refspec;
 
@@ -421,7 +422,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                die("could not create leading directories of '%s'", git_dir);
        set_git_dir(make_absolute_path(git_dir));
 
-       fprintf(stderr, "Initialize %s\n", git_dir);
        init_db(option_template, option_quiet ? INIT_DB_QUIET : 0);
 
        /*
@@ -463,8 +463,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                refs = clone_local(path, git_dir);
        else {
                struct remote *remote = remote_get(argv[0]);
-               struct transport *transport =
-                       transport_get(remote, remote->url[0]);
+               transport = transport_get(remote, remote->url[0]);
 
                if (!transport->get_refs_list || !transport->fetch)
                        die("Don't know how to clone %s", transport->url);
@@ -534,6 +533,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                option_no_checkout = 1;
        }
 
+       if (transport)
+               transport_unlock_pack(transport);
+
        if (!option_no_checkout) {
                struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));
                struct unpack_trees_options opts;
index e3ad38b3bd78bc2d19c5e5d1ebfbe0388b22582e..745c11e7735ffcb070683d1af607b4ad85f48e23 100644 (file)
@@ -45,7 +45,8 @@ static enum {
        COMMIT_PARTIAL,
 } commit_style;
 
-static char *logfile, *force_author, *template_file;
+static char *logfile, *force_author;
+static const char *template_file;
 static char *edit_message, *use_message;
 static char *author_name, *author_email, *author_date;
 static int all, edit_flag, also, interactive, only, amend, signoff;
@@ -877,12 +878,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 
 int git_commit_config(const char *k, const char *v, void *cb)
 {
-       if (!strcmp(k, "commit.template")) {
-               if (!v)
-                       return config_error_nonbool(v);
-               template_file = xstrdup(v);
-               return 0;
-       }
+       if (!strcmp(k, "commit.template"))
+               return git_config_string(&template_file, k, v);
 
        return git_status_config(k, v, cb);
 }
index 3a441ef64868b7c477ee9c49546ef1cb39e5acad..39f63d7b10f93a0a021d8b9af9fdec46ed0333f6 100644 (file)
@@ -81,12 +81,10 @@ static int get_value(const char* key_, const char* regex_)
        char *global = NULL, *repo_config = NULL;
        const char *system_wide = NULL, *local;
 
-       local = getenv(CONFIG_ENVIRONMENT);
+       local = config_exclusive_filename;
        if (!local) {
                const char *home = getenv("HOME");
-               local = getenv(CONFIG_LOCAL_ENVIRONMENT);
-               if (!local)
-                       local = repo_config = xstrdup(git_path("config"));
+               local = repo_config = xstrdup(git_path("config"));
                if (git_config_global() && home)
                        global = xstrdup(mkpath("%s/.gitconfig", home));
                if (git_config_system())
@@ -289,6 +287,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
        char* value;
        const char *file = setup_git_directory_gently(&nongit);
 
+       config_exclusive_filename = getenv(CONFIG_ENVIRONMENT);
+
        while (1 < argc) {
                if (!strcmp(argv[1], "--int"))
                        type = T_INT;
@@ -309,14 +309,13 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                        char *home = getenv("HOME");
                        if (home) {
                                char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
-                               setenv(CONFIG_ENVIRONMENT, user_config, 1);
-                               free(user_config);
+                               config_exclusive_filename = user_config;
                        } else {
                                die("$HOME not set");
                        }
                }
                else if (!strcmp(argv[1], "--system"))
-                       setenv(CONFIG_ENVIRONMENT, git_etc_gitconfig(), 1);
+                       config_exclusive_filename = git_etc_gitconfig();
                else if (!strcmp(argv[1], "--file") || !strcmp(argv[1], "-f")) {
                        if (argc < 3)
                                usage(git_config_set_usage);
@@ -325,7 +324,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                                                       argv[2]);
                        else
                                file = argv[2];
-                       setenv(CONFIG_ENVIRONMENT, file, 1);
+                       config_exclusive_filename = file;
                        argc--;
                        argv++;
                }
index 170b82e6ef18481430b5f83fd069b1726791e2de..75132bacfac08591ccb70eca0260be23d0e04a92 100644 (file)
@@ -116,7 +116,7 @@ static void handle_object(const unsigned char *sha1)
 
        mark_next_object(object);
 
-       printf("blob\nmark :%d\ndata %lu\n", last_idnum, size);
+       printf("blob\nmark :%"PRIu32"\ndata %lu\n", last_idnum, size);
        if (size && fwrite(buf, size, 1, stdout) != 1)
                die ("Could not write blob %s", sha1_to_hex(sha1));
        printf("\n");
@@ -204,7 +204,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
                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",
+       printf("commit %s\nmark :%"PRIu32"\n%.*s\n%.*s\ndata %u\n%s",
               (const char *)commit->util, last_idnum,
               (int)(author_end - author), author,
               (int)(committer_end - committer), committer,
index 2175c6d0d694d12838fc8a9ce7a3cca78a48ed59..1ea704063928d77fe1048b1abde35e42fcfb20e4 100644 (file)
@@ -520,7 +520,8 @@ static int get_pack(int xd[2], char **pack_lockfile)
 
                if (read_pack_header(demux.out, &header))
                        die("protocol error: bad pack header");
-               snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u",
+               snprintf(hdr_arg, sizeof(hdr_arg),
+                        "--pack_header=%"PRIu32",%"PRIu32,
                         ntohl(header.hdr_version), ntohl(header.hdr_entries));
                if (ntohl(header.hdr_entries) < unpack_limit)
                        do_keep = 0;
index 9979e37f3823734c66f0b98eebf485a078e576bb..430d87661e37a4b08963de1ee5c31b8143ebc373 100644 (file)
@@ -234,12 +234,8 @@ static int git_log_config(const char *var, const char *value, void *cb)
 {
        if (!strcmp(var, "format.pretty"))
                return git_config_string(&fmt_pretty, var, value);
-       if (!strcmp(var, "format.subjectprefix")) {
-               if (!value)
-                       config_error_nonbool(var);
-               fmt_patch_subject_prefix = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "format.subjectprefix"))
+               return git_config_string(&fmt_patch_subject_prefix, var, value);
        if (!strcmp(var, "log.date"))
                return git_config_string(&default_date_mode, var, value);
        if (!strcmp(var, "log.showroot")) {
@@ -489,12 +485,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
                add_header(value);
                return 0;
        }
-       if (!strcmp(var, "format.suffix")) {
-               if (!value)
-                       return config_error_nonbool(var);
-               fmt_patch_suffix = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "format.suffix"))
+               return git_config_string(&fmt_patch_suffix, var, value);
        if (!strcmp(var, "format.cc")) {
                if (!value)
                        return config_error_nonbool(var);
index 97c1ff97440ec107e336df774f86aadc28f26b89..fa6e8f90a4d54eb07f2af80620e35e617c94d605 100644 (file)
@@ -812,6 +812,7 @@ static void handle_body(void)
                                              np - newline);
                        if (!handle_boundary())
                                return;
+                       len = strlen(line);
                }
 
                /* Unwrap transfer encoding */
index 28207d9b3aee9f3e886384871a6632fbaf7eee4f..2dadec1630c266bbaf42e84810f7059ed5c43b1e 100644 (file)
@@ -568,7 +568,8 @@ static void write_pack_file(void)
        free(written_list);
        stop_progress(&progress_state);
        if (written != nr_result)
-               die("wrote %u objects while expecting %u", written, nr_result);
+               die("wrote %"PRIu32" objects while expecting %"PRIu32,
+                       written, nr_result);
        /*
         * We have scanned through [0 ... i).  Since we have written
         * the correct number of objects,  the remaining [i ... nr_objects)
@@ -580,7 +581,8 @@ static void write_pack_file(void)
                j += !e->idx.offset && !e->preferred_base;
        }
        if (j)
-               die("wrote %u objects as expected but %u unwritten", written, j);
+               die("wrote %"PRIu32" objects as expected but %"PRIu32
+                       " unwritten", written, j);
 }
 
 static int locate_object_entry_hash(const unsigned char *sha1)
@@ -1694,7 +1696,8 @@ static int add_ref_tag(const char *path, const unsigned char *sha1, int flag, vo
 static void prepare_pack(int window, int depth)
 {
        struct object_entry **delta_list;
-       uint32_t i, n, nr_deltas;
+       uint32_t i, nr_deltas;
+       unsigned n;
 
        get_object_details();
 
@@ -1785,7 +1788,8 @@ static int git_pack_config(const char *k, const char *v, void *cb)
        if (!strcmp(k, "pack.indexversion")) {
                pack_idx_default_version = git_config_int(k, v);
                if (pack_idx_default_version > 2)
-                       die("bad pack.indexversion=%d", pack_idx_default_version);
+                       die("bad pack.indexversion=%"PRIu32,
+                               pack_idx_default_version);
                return 0;
        }
        if (!strcmp(k, "pack.packsizelimit")) {
@@ -2219,7 +2223,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
                prepare_pack(window, depth);
        write_pack_file();
        if (progress)
-               fprintf(stderr, "Total %u (delta %u), reused %u (delta %u)\n",
+               fprintf(stderr, "Total %"PRIu32" (delta %"PRIu32"),"
+                       " reused %"PRIu32" (delta %"PRIu32")\n",
                        written, written_delta, reused, reused_delta);
        return 0;
 }
index b151e24ff94e06840db7e57014fe4a73ea811575..125d455b97ca499806ff417871ab6ce7aad922c5 100644 (file)
@@ -269,7 +269,9 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
        int status = 0;
 
        memset(&cb, 0, sizeof(cb));
-       /* we take the lock for the ref itself to prevent it from
+
+       /*
+        * we take the lock for the ref itself to prevent it from
         * getting updated.
         */
        lock = lock_any_ref_for_update(ref, sha1, 0);
@@ -331,21 +333,130 @@ static int collect_reflog(const char *ref, const unsigned char *sha1, int unused
        return 0;
 }
 
-static int reflog_expire_config(const char *var, const char *value, void *cb)
+static struct reflog_expire_cfg {
+       struct reflog_expire_cfg *next;
+       unsigned long expire_total;
+       unsigned long expire_unreachable;
+       size_t len;
+       char pattern[FLEX_ARRAY];
+} *reflog_expire_cfg, **reflog_expire_cfg_tail;
+
+static struct reflog_expire_cfg *find_cfg_ent(const char *pattern, size_t len)
 {
-       if (!strcmp(var, "gc.reflogexpire")) {
-               if (!value)
-                       config_error_nonbool(var);
-               default_reflog_expire = approxidate(value);
+       struct reflog_expire_cfg *ent;
+
+       if (!reflog_expire_cfg_tail)
+               reflog_expire_cfg_tail = &reflog_expire_cfg;
+
+       for (ent = reflog_expire_cfg; ent; ent = ent->next)
+               if (ent->len == len &&
+                   !memcmp(ent->pattern, pattern, len))
+                       return ent;
+
+       ent = xcalloc(1, (sizeof(*ent) + len));
+       memcpy(ent->pattern, pattern, len);
+       ent->len = len;
+       *reflog_expire_cfg_tail = ent;
+       reflog_expire_cfg_tail = &(ent->next);
+       return ent;
+}
+
+static int parse_expire_cfg_value(const char *var, const char *value, unsigned long *expire)
+{
+       if (!value)
+               return config_error_nonbool(var);
+       if (!strcmp(value, "never") || !strcmp(value, "false")) {
+               *expire = 0;
                return 0;
        }
-       if (!strcmp(var, "gc.reflogexpireunreachable")) {
-               if (!value)
-                       config_error_nonbool(var);
-               default_reflog_expire_unreachable = approxidate(value);
+       *expire = approxidate(value);
+       return 0;
+}
+
+/* expiry timer slot */
+#define EXPIRE_TOTAL   01
+#define EXPIRE_UNREACH 02
+
+static int reflog_expire_config(const char *var, const char *value, void *cb)
+{
+       const char *lastdot = strrchr(var, '.');
+       unsigned long expire;
+       int slot;
+       struct reflog_expire_cfg *ent;
+
+       if (!lastdot || prefixcmp(var, "gc."))
+               return git_default_config(var, value, cb);
+
+       if (!strcmp(lastdot, ".reflogexpire")) {
+               slot = EXPIRE_TOTAL;
+               if (parse_expire_cfg_value(var, value, &expire))
+                       return -1;
+       } else if (!strcmp(lastdot, ".reflogexpireunreachable")) {
+               slot = EXPIRE_UNREACH;
+               if (parse_expire_cfg_value(var, value, &expire))
+                       return -1;
+       } else
+               return git_default_config(var, value, cb);
+
+       if (lastdot == var + 2) {
+               switch (slot) {
+               case EXPIRE_TOTAL:
+                       default_reflog_expire = expire;
+                       break;
+               case EXPIRE_UNREACH:
+                       default_reflog_expire_unreachable = expire;
+                       break;
+               }
                return 0;
        }
-       return git_default_config(var, value, cb);
+
+       ent = find_cfg_ent(var + 3, lastdot - (var+3));
+       if (!ent)
+               return -1;
+       switch (slot) {
+       case EXPIRE_TOTAL:
+               ent->expire_total = expire;
+               break;
+       case EXPIRE_UNREACH:
+               ent->expire_unreachable = expire;
+               break;
+       }
+       return 0;
+}
+
+static void set_reflog_expiry_param(struct cmd_reflog_expire_cb *cb, int slot, const char *ref)
+{
+       struct reflog_expire_cfg *ent;
+
+       if (slot == (EXPIRE_TOTAL|EXPIRE_UNREACH))
+               return; /* both given explicitly -- nothing to tweak */
+
+       for (ent = reflog_expire_cfg; ent; ent = ent->next) {
+               if (!fnmatch(ent->pattern, ref, 0)) {
+                       if (!(slot & EXPIRE_TOTAL))
+                               cb->expire_total = ent->expire_total;
+                       if (!(slot & EXPIRE_UNREACH))
+                               cb->expire_unreachable = ent->expire_unreachable;
+                       return;
+               }
+       }
+
+       /*
+        * If unconfigured, make stash never expire
+        */
+       if (!strcmp(ref, "refs/stash")) {
+               if (!(slot & EXPIRE_TOTAL))
+                       cb->expire_total = 0;
+               if (!(slot & EXPIRE_UNREACH))
+                       cb->expire_unreachable = 0;
+               return;
+       }
+
+       /* Nothing matched -- use the default value */
+       if (!(slot & EXPIRE_TOTAL))
+               cb->expire_total = default_reflog_expire;
+       if (!(slot & EXPIRE_UNREACH))
+               cb->expire_unreachable = default_reflog_expire_unreachable;
 }
 
 static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
@@ -353,6 +464,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
        struct cmd_reflog_expire_cb cb;
        unsigned long now = time(NULL);
        int i, status, do_all;
+       int explicit_expiry = 0;
 
        git_config(reflog_expire_config, NULL);
 
@@ -367,20 +479,18 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
        cb.expire_total = default_reflog_expire;
        cb.expire_unreachable = default_reflog_expire_unreachable;
 
-       /*
-        * We can trust the commits and objects reachable from refs
-        * even in older repository.  We cannot trust what's reachable
-        * from reflog if the repository was pruned with older git.
-        */
-
        for (i = 1; i < argc; i++) {
                const char *arg = argv[i];
                if (!strcmp(arg, "--dry-run") || !strcmp(arg, "-n"))
                        cb.dry_run = 1;
-               else if (!prefixcmp(arg, "--expire="))
+               else if (!prefixcmp(arg, "--expire=")) {
                        cb.expire_total = approxidate(arg + 9);
-               else if (!prefixcmp(arg, "--expire-unreachable="))
+                       explicit_expiry |= EXPIRE_TOTAL;
+               }
+               else if (!prefixcmp(arg, "--expire-unreachable=")) {
                        cb.expire_unreachable = approxidate(arg + 21);
+                       explicit_expiry |= EXPIRE_UNREACH;
+               }
                else if (!strcmp(arg, "--stale-fix"))
                        cb.stalefix = 1;
                else if (!strcmp(arg, "--rewrite"))
@@ -400,6 +510,12 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
                else
                        break;
        }
+
+       /*
+        * We can trust the commits and objects reachable from refs
+        * even in older repository.  We cannot trust what's reachable
+        * from reflog if the repository was pruned with older git.
+        */
        if (cb.stalefix) {
                init_revisions(&cb.revs, prefix);
                if (cb.verbose)
@@ -417,6 +533,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
                for_each_reflog(collect_reflog, &collected);
                for (i = 0; i < collected.nr; i++) {
                        struct collected_reflog *e = collected.e[i];
+                       set_reflog_expiry_param(&cb, explicit_expiry, e->reflog);
                        status |= expire_reflog(e->reflog, e->sha1, 0, &cb);
                        free(e);
                }
@@ -430,6 +547,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
                        status |= error("%s points nowhere!", ref);
                        continue;
                }
+               set_reflog_expiry_param(&cb, explicit_expiry, ref);
                status |= expire_reflog(ref, sha1, 0, &cb);
        }
        return status;
index 85222d9bc591e0b603bf6f33c32d6bb1bad479ee..839b26e8e0a10a498a81bf27d907543e7c256cb8 100644 (file)
@@ -16,6 +16,9 @@ static int cutoff_resolve = 60;
 /* if rerere_enabled == -1, fall back to detection of .git/rr-cache */
 static int rerere_enabled = -1;
 
+/* automatically update cleanly resolved paths to the index */
+static int rerere_autoupdate;
+
 static char *merge_rr_path;
 
 static const char *rr_path(const char *name, const char *file)
@@ -23,6 +26,18 @@ static const char *rr_path(const char *name, const char *file)
        return git_path("rr-cache/%s/%s", name, file);
 }
 
+static time_t rerere_created_at(const char *name)
+{
+       struct stat st;
+       return stat(rr_path(name, "preimage"), &st) ? (time_t) 0 : st.st_mtime;
+}
+
+static int has_resolution(const char *name)
+{
+       struct stat st;
+       return !stat(rr_path(name, "postimage"), &st);
+}
+
 static void read_rr(struct path_list *rr)
 {
        unsigned char sha1[20];
@@ -54,8 +69,12 @@ static int write_rr(struct path_list *rr, int out_fd)
 {
        int i;
        for (i = 0; i < rr->nr; i++) {
-               const char *path = rr->items[i].path;
-               int length = strlen(path) + 1;
+               const char *path;
+               int length;
+               if (!rr->items[i].util)
+                       continue;
+               path = rr->items[i].path;
+               length = strlen(path) + 1;
                if (write_in_full(out_fd, rr->items[i].util, 40) != 40 ||
                    write_in_full(out_fd, "\t", 1) != 1 ||
                    write_in_full(out_fd, path, length) != length)
@@ -98,13 +117,10 @@ static int handle_file(const char *path,
                else if (!prefixcmp(buf, "======="))
                        hunk = 2;
                else if (!prefixcmp(buf, ">>>>>>> ")) {
-                       int cmp = strbuf_cmp(&one, &two);
-
+                       if (strbuf_cmp(&one, &two) > 0)
+                               strbuf_swap(&one, &two);
                        hunk_no++;
                        hunk = 0;
-                       if (cmp > 0) {
-                               strbuf_swap(&one, &two);
-                       }
                        if (out) {
                                fputs("<<<<<<<\n", out);
                                fwrite(one.buf, one.len, 1, out);
@@ -135,6 +151,11 @@ static int handle_file(const char *path,
                fclose(out);
        if (sha1)
                SHA1_Final(sha1, &ctx);
+       if (hunk) {
+               if (output)
+                       unlink(output);
+               return error("Could not parse conflict hunks in %s", path);
+       }
        return hunk_no;
 }
 
@@ -201,33 +222,24 @@ static void unlink_rr_item(const char *name)
 static void garbage_collect(struct path_list *rr)
 {
        struct path_list to_remove = { NULL, 0, 0, 1 };
-       char buf[1024];
        DIR *dir;
        struct dirent *e;
-       int len, i, cutoff;
+       int i, cutoff;
        time_t now = time(NULL), then;
 
-       strlcpy(buf, git_path("rr-cache"), sizeof(buf));
-       len = strlen(buf);
-       dir = opendir(buf);
-       strcpy(buf + len++, "/");
+       dir = opendir(git_path("rr-cache"));
        while ((e = readdir(dir))) {
                const char *name = e->d_name;
-               struct stat st;
-               if (name[0] == '.' && (name[1] == '\0' ||
-                                       (name[1] == '.' && name[2] == '\0')))
+               if (name[0] == '.' &&
+                   (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')))
                        continue;
-               i = snprintf(buf + len, sizeof(buf) - len, "%s", name);
-               strlcpy(buf + len + i, "/preimage", sizeof(buf) - len - i);
-               if (stat(buf, &st))
+               then = rerere_created_at(name);
+               if (!then)
                        continue;
-               then = st.st_mtime;
-               strlcpy(buf + len + i, "/postimage", sizeof(buf) - len - i);
-               cutoff = stat(buf, &st) ? cutoff_noresolve : cutoff_resolve;
-               if (then < now - cutoff * 86400) {
-                       buf[len + i] = '\0';
-                       path_list_insert(xstrdup(name), &to_remove);
-               }
+               cutoff = (has_resolution(name)
+                         ? cutoff_resolve : cutoff_noresolve);
+               if (then < now - cutoff * 86400)
+                       path_list_append(name, &to_remove);
        }
        for (i = 0; i < to_remove.nr; i++)
                unlink_rr_item(to_remove.items[i].path);
@@ -267,9 +279,36 @@ static int diff_two(const char *file1, const char *label1,
        return 0;
 }
 
+static struct lock_file index_lock;
+
+static int update_paths(struct path_list *update)
+{
+       int i;
+       int fd = hold_locked_index(&index_lock, 0);
+       int status = 0;
+
+       if (fd < 0)
+               return -1;
+
+       for (i = 0; i < update->nr; i++) {
+               struct path_list_item *item = &update->items[i];
+               if (add_file_to_cache(item->path, ADD_CACHE_IGNORE_ERRORS))
+                       status = -1;
+       }
+
+       if (!status && active_cache_changed) {
+               if (write_cache(fd, active_cache, active_nr) ||
+                   commit_locked_index(&index_lock))
+                       die("Unable to write new index file");
+       } else if (fd >= 0)
+               rollback_lock_file(&index_lock);
+       return status;
+}
+
 static int do_plain_rerere(struct path_list *rr, int fd)
 {
        struct path_list conflict = { NULL, 0, 0, 1 };
+       struct path_list update = { NULL, 0, 0, 1 };
        int i;
 
        find_conflict(&conflict);
@@ -306,17 +345,17 @@ static int do_plain_rerere(struct path_list *rr, int fd)
         */
 
        for (i = 0; i < rr->nr; i++) {
-               struct stat st;
                int ret;
                const char *path = rr->items[i].path;
                const char *name = (const char *)rr->items[i].util;
 
-               if (!stat(rr_path(name, "preimage"), &st) &&
-                               !stat(rr_path(name, "postimage"), &st)) {
+               if (has_resolution(name)) {
                        if (!merge(name, path)) {
                                fprintf(stderr, "Resolved '%s' using "
                                                "previous resolution.\n", path);
-                               goto tail_optimization;
+                               if (rerere_autoupdate)
+                                       path_list_insert(path, &update);
+                               goto mark_resolved;
                        }
                }
 
@@ -327,15 +366,13 @@ static int do_plain_rerere(struct path_list *rr, int fd)
 
                fprintf(stderr, "Recorded resolution for '%s'.\n", path);
                copy_file(rr_path(name, "postimage"), path, 0666);
-tail_optimization:
-               if (i < rr->nr - 1)
-                       memmove(rr->items + i,
-                               rr->items + i + 1,
-                               sizeof(rr->items[0]) * (rr->nr - i - 1));
-               rr->nr--;
-               i--;
+       mark_resolved:
+               rr->items[i].util = NULL;
        }
 
+       if (update.nr)
+               update_paths(&update);
+
        return write_rr(rr, fd);
 }
 
@@ -347,6 +384,8 @@ static int git_rerere_config(const char *var, const char *value, void *cb)
                cutoff_noresolve = git_config_int(var, value);
        else if (!strcmp(var, "rerere.enabled"))
                rerere_enabled = git_config_bool(var, value);
+       else if (!strcmp(var, "rerere.autoupdate"))
+               rerere_autoupdate = git_config_bool(var, value);
        else
                return git_default_config(var, value, cb);
        return 0;
@@ -410,11 +449,8 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
                return do_plain_rerere(&merge_rr, fd);
        else if (!strcmp(argv[1], "clear")) {
                for (i = 0; i < merge_rr.nr; i++) {
-                       struct stat st;
                        const char *name = (const char *)merge_rr.items[i].util;
-                       if (!stat(git_path("rr-cache/%s", name), &st) &&
-                                       S_ISDIR(st.st_mode) &&
-                                       stat(rr_path(name, "postimage"), &st))
+                       if (!has_resolution(name))
                                unlink_rr_item(name);
                }
                unlink(merge_rr_path);
index 83a7b1349e06dbf1a355888272d9b13a7d4c22c4..54b6672969bdcd6f5bf48922f180883b35a5041e 100644 (file)
@@ -565,23 +565,6 @@ static struct commit_list *find_bisection(struct commit_list *list,
        return best;
 }
 
-static void read_revisions_from_stdin(struct rev_info *revs)
-{
-       char line[1000];
-
-       while (fgets(line, sizeof(line), stdin) != NULL) {
-               int len = strlen(line);
-               if (len && line[len - 1] == '\n')
-                       line[--len] = 0;
-               if (!len)
-                       break;
-               if (line[0] == '-')
-                       die("options not supported in --stdin mode");
-               if (handle_revision_arg(line, revs, 0, 1))
-                       die("bad revision '%s'", line);
-       }
-}
-
 int cmd_rev_list(int argc, const char **argv, const char *prefix)
 {
        struct commit_list *list;
index 0270f9b85a8229d30ab3fab5ce73661f383b005e..f3d452418c25b0d95a911a050f75ba190d6513c1 100644 (file)
@@ -206,6 +206,7 @@ static int merge_recursive(const char *base_sha1,
 {
        char buffer[256];
        const char *argv[6];
+       int i = 0;
 
        sprintf(buffer, "GITHEAD_%s", head_sha1);
        setenv(buffer, head_name, 1);
@@ -218,12 +219,13 @@ static int merge_recursive(const char *base_sha1,
         * and $prev on top of us (when reverting), or the change between
         * $prev and $commit on top of us (when cherry-picking or replaying).
         */
-       argv[0] = "merge-recursive";
-       argv[1] = base_sha1;
-       argv[2] = "--";
-       argv[3] = head_sha1;
-       argv[4] = next_sha1;
-       argv[5] = NULL;
+       argv[i++] = "merge-recursive";
+       if (base_sha1)
+               argv[i++] = base_sha1;
+       argv[i++] = "--";
+       argv[i++] = head_sha1;
+       argv[i++] = next_sha1;
+       argv[i++] = NULL;
 
        return run_command_v_opt(argv, RUN_COMMAND_NO_STDIN | RUN_GIT_CMD);
 }
@@ -297,9 +299,12 @@ static int revert_or_cherry_pick(int argc, const char **argv)
                discard_cache();
        }
 
-       if (!commit->parents)
-               die ("Cannot %s a root commit", me);
-       if (commit->parents->next) {
+       if (!commit->parents) {
+               if (action == REVERT)
+                       die ("Cannot revert a root commit");
+               parent = NULL;
+       }
+       else if (commit->parents->next) {
                /* Reverting or cherry-picking a merge commit */
                int cnt;
                struct commit_list *p;
@@ -368,7 +373,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)
                }
        }
 
-       if (merge_recursive(sha1_to_hex(base->object.sha1),
+       if (merge_recursive(base == NULL ?
+                               NULL : sha1_to_hex(base->object.sha1),
                                sha1_to_hex(head), "HEAD",
                                sha1_to_hex(next->object.sha1), oneline) ||
                        write_cache_as_tree(head, 0, NULL)) {
index d76260c09eef064d8a2862b5d6f0e826d968d643..a708d0af48e210fd4439c336c2faa3e7400b5fa4 100644 (file)
@@ -226,8 +226,7 @@ static void update_tracking_ref(struct remote *remote, struct ref *ref)
                if (args.verbose)
                        fprintf(stderr, "updating local tracking ref '%s'\n", rs.dst);
                if (ref->deletion) {
-                       if (delete_ref(rs.dst, NULL))
-                               error("Failed to delete");
+                       delete_ref(rs.dst, NULL);
                } else
                        update_ref("update by push", rs.dst,
                                        ref->new_sha1, NULL, 0, 0);
index e675206de38f0709b4c07e1667d791bf9b6704cb..3c97c696a50cb55e78774c743436cf50cad35f96 100644 (file)
@@ -260,7 +260,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
 {
        if (!strcmp(var, "user.signingkey")) {
                if (!value)
-                       return config_error_nonbool(value);
+                       return config_error_nonbool(var);
                set_signingkey(value);
                return 0;
        }
index 85043d1fde917e67746fb1ee106ce2cf78f3d161..a8918666655bb91f952ccdac18715bd9ba4a09f2 100644 (file)
@@ -471,7 +471,8 @@ static void unpack_all(void)
        if (ntohl(hdr->hdr_signature) != PACK_SIGNATURE)
                die("bad pack file");
        if (!pack_version_ok(hdr->hdr_version))
-               die("unknown pack file version %d", ntohl(hdr->hdr_version));
+               die("unknown pack file version %"PRIu32,
+                       ntohl(hdr->hdr_version));
        use(sizeof(struct pack_header));
 
        if (!quiet)
index 222c39e7edc85c8356db7821416574f60316422d..f4ac595695b1fff1317ff7d14ea9427780327aea 100644 (file)
@@ -46,11 +46,11 @@ static void show_pack_info(struct packed_git *p)
        for (i = 0; i <= MAX_CHAIN; i++) {
                if (!chain_histogram[i])
                        continue;
-               printf("chain length = %d: %d object%s\n", i,
+               printf("chain length = %"PRIu32": %"PRIu32" object%s\n", i,
                       chain_histogram[i], chain_histogram[i] > 1 ? "s" : "");
        }
        if (chain_histogram[0])
-               printf("chain length > %d: %d object%s\n", MAX_CHAIN,
+               printf("chain length > %d: %"PRIu32" object%s\n", MAX_CHAIN,
                       chain_histogram[0], chain_histogram[0] > 1 ? "s" : "");
 }
 
index 0ba5df17e15d679b03fe38af40260c118c9588fa..00b2aabefca49b634f49143523ee31556baa7777 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -178,6 +178,7 @@ int create_bundle(struct bundle_header *header, const char *path,
        int i, ref_count = 0;
        char buffer[1024];
        struct rev_info revs;
+       int read_from_stdin = 0;
        struct child_process rls;
        FILE *rls_fout;
 
@@ -227,8 +228,16 @@ int create_bundle(struct bundle_header *header, const char *path,
 
        /* write references */
        argc = setup_revisions(argc, argv, &revs, NULL);
-       if (argc > 1)
-               return error("unrecognized argument: %s'", argv[1]);
+
+       for (i = 1; i < argc; i++) {
+               if (!strcmp(argv[i], "--stdin")) {
+                       if (read_from_stdin++)
+                               die("--stdin given twice?");
+                       read_revisions_from_stdin(&revs);
+                       continue;
+               }
+               return error("unrecognized argument: %s'", argv[i]);
+       }
 
        for (i = 0; i < revs.pending.nr; i++) {
                struct object_array_entry *e = revs.pending.objects + i;
diff --git a/cache.h b/cache.h
index 35a91320a50d3f0f720e4fc3672f7667934e04f9..0d8eddac778ace8e4b5f58459f508ac1192dbcff 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -298,8 +298,8 @@ static inline enum object_type object_type(unsigned int mode)
 #define GRAFT_ENVIRONMENT "GIT_GRAFT_FILE"
 #define TEMPLATE_DIR_ENVIRONMENT "GIT_TEMPLATE_DIR"
 #define CONFIG_ENVIRONMENT "GIT_CONFIG"
-#define CONFIG_LOCAL_ENVIRONMENT "GIT_CONFIG_LOCAL"
 #define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH"
+#define CEILING_DIRECTORIES_ENVIRONMENT "GIT_CEILING_DIRECTORIES"
 #define GITATTRIBUTES_FILE ".gitattributes"
 #define INFOATTRIBUTES_FILE "info/attributes"
 #define ATTRIBUTE_MACRO_PREFIX "[attr]"
@@ -527,6 +527,8 @@ static inline int is_absolute_path(const char *path)
 const char *make_absolute_path(const char *path);
 const char *make_nonrelative_path(const char *path);
 const char *make_relative_path(const char *abs, const char *base);
+int normalize_absolute_path(char *buf, const char *path);
+int longest_ancestor_length(const char *path, const char *prefix_list);
 
 /* Read and unpack a sha1 file into memory, write memory to a sha1 file */
 extern int sha1_object_info(const unsigned char *, unsigned long *);
@@ -743,6 +745,7 @@ extern int check_repository_format_version(const char *var, const char *value, v
 extern int git_config_system(void);
 extern int git_config_global(void);
 extern int config_error_nonbool(const char *);
+extern const char *config_exclusive_filename;
 
 #define MAX_GITNAME (1000)
 extern char git_default_email[MAX_GITNAME];
index 58749bf41627e3a18b4808f92f5317528e85599f..2862cc45cbb1752153bb6050b4e6bd53f6660724 100644 (file)
--- a/config.c
+++ b/config.c
@@ -16,6 +16,8 @@ static int config_linenr;
 static int config_file_eof;
 static int zlib_compression_seen;
 
+const char *config_exclusive_filename = NULL;
+
 static int get_next_char(void)
 {
        int c;
@@ -611,31 +613,28 @@ int git_config(config_fn_t fn, void *data)
 {
        int ret = 0;
        char *repo_config = NULL;
-       const char *home = NULL, *filename;
+       const char *home = NULL;
 
        /* $GIT_CONFIG makes git read _only_ the given config file,
         * $GIT_CONFIG_LOCAL will make it process it in addition to the
         * global config file, the same way it would the per-repository
         * config file otherwise. */
-       filename = getenv(CONFIG_ENVIRONMENT);
-       if (!filename) {
-               if (git_config_system() && !access(git_etc_gitconfig(), R_OK))
-                       ret += git_config_from_file(fn, git_etc_gitconfig(),
-                               data);
-               home = getenv("HOME");
-               filename = getenv(CONFIG_LOCAL_ENVIRONMENT);
-               if (!filename)
-                       filename = repo_config = xstrdup(git_path("config"));
-       }
+       if (config_exclusive_filename)
+               return git_config_from_file(fn, config_exclusive_filename, data);
+       if (git_config_system() && !access(git_etc_gitconfig(), R_OK))
+               ret += git_config_from_file(fn, git_etc_gitconfig(),
+                                           data);
 
+       home = getenv("HOME");
        if (git_config_global() && home) {
                char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
                if (!access(user_config, R_OK))
-                       ret = git_config_from_file(fn, user_config, data);
+                       ret += git_config_from_file(fn, user_config, data);
                free(user_config);
        }
 
-       ret += git_config_from_file(fn, filename, data);
+       repo_config = xstrdup(git_path("config"));
+       ret += git_config_from_file(fn, repo_config, data);
        free(repo_config);
        return ret;
 }
@@ -873,13 +872,10 @@ int git_config_set_multivar(const char* key, const char* value,
        struct lock_file *lock = NULL;
        const char* last_dot = strrchr(key, '.');
 
-       config_filename = getenv(CONFIG_ENVIRONMENT);
-       if (!config_filename) {
-               config_filename = getenv(CONFIG_LOCAL_ENVIRONMENT);
-               if (!config_filename)
-                       config_filename  = git_path("config");
-       }
-       config_filename = xstrdup(config_filename);
+       if (config_exclusive_filename)
+               config_filename = xstrdup(config_exclusive_filename);
+       else
+               config_filename = xstrdup(git_path("config"));
 
        /*
         * Since "key" actually contains the section name and the real
@@ -1136,13 +1132,10 @@ int git_config_rename_section(const char *old_name, const char *new_name)
        int out_fd;
        char buf[1024];
 
-       config_filename = getenv(CONFIG_ENVIRONMENT);
-       if (!config_filename) {
-               config_filename = getenv(CONFIG_LOCAL_ENVIRONMENT);
-               if (!config_filename)
-                       config_filename  = git_path("config");
-       }
-       config_filename = xstrdup(config_filename);
+       if (config_exclusive_filename)
+               config_filename = xstrdup(config_exclusive_filename);
+       else
+               config_filename = xstrdup(git_path("config"));
        out_fd = hold_lock_file_for_update(lock, config_filename, 0);
        if (out_fd < 0) {
                ret = error("could not lock config file %s", config_filename);
index 3f46149853237fcded15d498f94b4ae3b174b79c..84a256ec54875288ff0c92e4ce1cc45551667aeb 100755 (executable)
@@ -451,6 +451,18 @@ __git_find_subcommand ()
        done
 }
 
+__git_has_doubledash ()
+{
+       local c=1
+       while [ $c -lt $COMP_CWORD ]; do
+               if [ "--" = "${COMP_WORDS[c]}" ]; then
+                       return 0
+               fi
+               c=$((++c))
+       done
+       return 1
+}
+
 __git_whitespacelist="nowarn warn error error-all strip"
 
 _git_am ()
@@ -497,6 +509,8 @@ _git_apply ()
 
 _git_add ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
@@ -511,7 +525,9 @@ _git_add ()
 
 _git_bisect ()
 {
-       local subcommands="start bad good reset visualize replay log"
+       __git_has_doubledash && return
+
+       local subcommands="start bad good skip reset visualize replay log run"
        local subcommand="$(__git_find_subcommand "$subcommands")"
        if [ -z "$subcommand" ]; then
                __gitcomp "$subcommands"
@@ -519,7 +535,7 @@ _git_bisect ()
        fi
 
        case "$subcommand" in
-       bad|good|reset)
+       bad|good|reset|skip)
                __gitcomp "$(__git_refs)"
                ;;
        *)
@@ -546,7 +562,7 @@ _git_branch ()
        --*)
                __gitcomp "
                        --color --no-color --verbose --abbrev= --no-abbrev
-                       --track --no-track
+                       --track --no-track --contains --merged --no-merged
                        "
                ;;
        *)
@@ -613,6 +629,8 @@ _git_cherry_pick ()
 
 _git_commit ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
@@ -632,6 +650,8 @@ _git_describe ()
 
 _git_diff ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
@@ -734,6 +754,8 @@ _git_ls_tree ()
 
 _git_log ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --pretty=*)
@@ -1086,6 +1108,8 @@ _git_remote ()
 
 _git_reset ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
@@ -1098,6 +1122,8 @@ _git_reset ()
 
 _git_shortlog ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
        --*)
@@ -1137,13 +1163,26 @@ _git_show ()
 _git_stash ()
 {
        local subcommands='save list show apply clear drop pop create'
-       if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
+       local subcommand="$(__git_find_subcommand "$subcommands")"
+       if [ -z "$subcommand" ]; then
                __gitcomp "$subcommands"
+       else
+               local cur="${COMP_WORDS[COMP_CWORD]}"
+               case "$subcommand,$cur" in
+               save,--*)
+                       __gitcomp "--keep-index"
+                       ;;
+               *)
+                       COMPREPLY=()
+                       ;;
+               esac
        fi
 }
 
 _git_submodule ()
 {
+       __git_has_doubledash && return
+
        local subcommands="add status init update"
        if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
                local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -1350,6 +1389,8 @@ _git ()
 
 _gitk ()
 {
+       __git_has_doubledash && return
+
        local cur="${COMP_WORDS[COMP_CWORD]}"
        local g="$(git rev-parse --git-dir 2>/dev/null)"
        local merge=""
index b30ed734e7102b6a5d88c01364fa7d18db8f8bfe..36bd54c985080f8dd5558a3e7a4e19ede9fbab93 100755 (executable)
@@ -129,10 +129,7 @@ sub update_ls_remote {
        return if (($harder == 0) ||
                   (($harder == 1) && exists $info->{'LS_REMOTE'}));
 
-       my @ref = map {
-               s|^[0-9a-f]{40}\s+refs/heads/||;
-               $_;
-       } $git->command(qw(ls-remote --heads), $info->{'URL'});
+       my @ref = map { s|refs/heads/||; $_; } keys %{$git->remote_refs($info->{'URL'}, [ 'heads' ])};
        $info->{'LS_REMOTE'} = \@ref;
 }
 
diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
new file mode 100755 (executable)
index 0000000..c674fa2
--- /dev/null
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+
+## zip archive frontend for git-fast-import
+##
+## For example:
+##
+##  mkdir project; cd project; git init
+##  python import-zips.py *.zip
+##  git log --stat import-zips
+
+from os import popen, path
+from sys import argv, exit
+from time import mktime
+from zipfile import ZipFile
+
+if len(argv) < 2:
+       print 'Usage:', argv[0], '<zipfile>...'
+       exit(1)
+
+branch_ref = 'refs/heads/import-zips'
+committer_name = 'Z Ip Creator'
+committer_email = 'zip@example.com'
+
+fast_import = popen('git fast-import --quiet', 'w')
+def printlines(list):
+       for str in list:
+               fast_import.write(str + "\n")
+
+for zipfile in argv[1:]:
+       commit_time = 0
+       next_mark = 1
+       common_prefix = None
+       mark = dict()
+
+       zip = ZipFile(zipfile, 'r')
+       for name in zip.namelist():
+               if name.endswith('/'):
+                       continue
+               info = zip.getinfo(name)
+
+               if commit_time < info.date_time:
+                       commit_time = info.date_time
+               if common_prefix == None:
+                       common_prefix = name[:name.rfind('/') + 1]
+               else:
+                       while not name.startswith(common_prefix):
+                               common_prefix = name[:name.rfind('/') + 1]
+
+               mark[name] = ':' + str(next_mark)
+               next_mark += 1
+
+               printlines(('blob', 'mark ' + mark[name], \
+                                       'data ' + str(info.file_size)))
+               fast_import.write(zip.read(name) + "\n")
+
+       committer = committer_name + ' <' + committer_email + '> %d +0000' % \
+               mktime(commit_time + (0, 0, 0))
+
+       printlines(('commit ' + branch_ref, 'committer ' + committer, \
+               'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \
+               '', 'deleteall'))
+
+       for name in mark.keys():
+               fast_import.write('M 100644 ' + mark[name] + ' ' +
+                       name[len(common_prefix):] + "\n")
+
+       printlines(('',  'tag ' + path.basename(zipfile), \
+               'from ' + branch_ref, 'tagger ' + committer, \
+               'data <<EOM', 'Package ' + zipfile, 'EOM', ''))
+
+if fast_import.close():
+       exit(1)
index f68ef725d42cdb1a6082574f9ef3a45d2346c296..7b03204ed18500756ba55818f0808b52db68d048 100755 (executable)
@@ -89,7 +89,7 @@ try:
         if o in ('-v', '--verbose'):
             verbose = True
     if len(args) != 1:
-        raise('params')
+        raise Exception('params')
 except:
     usage()
     sys.exit(1)
@@ -106,7 +106,10 @@ if state:
     else:
         print 'State does not exist, first run'
 
-tip = os.popen('hg tip --template "{rev}"').read()
+sock = os.popen('hg tip --template "{rev}"')
+tip = sock.read()
+if sock.close():
+    sys.exit(1)
 if verbose:
     print 'tip is', tip
 
@@ -149,7 +152,7 @@ for cset in range(1, int(tip) + 1):
 
 if not hgvers.has_key("0"):
     print 'creating repository'
-    os.system('git-init-db')
+    os.system('git init')
 
 # loop through every hg changeset
 for cset in range(int(tip) + 1):
@@ -191,10 +194,10 @@ for cset in range(int(tip) + 1):
     if cset != 0:
         if hgbranch[str(cset)] == "branch-" + str(cset):
             print 'creating new branch', hgbranch[str(cset)]
-            os.system('git-checkout -b %s %s' % (hgbranch[str(cset)], hgvers[parent]))
+            os.system('git checkout -b %s %s' % (hgbranch[str(cset)], hgvers[parent]))
         else:
             print 'checking out branch', hgbranch[str(cset)]
-            os.system('git-checkout %s' % hgbranch[str(cset)])
+            os.system('git checkout %s' % hgbranch[str(cset)])
 
     # merge
     if mparent:
@@ -203,7 +206,7 @@ for cset in range(int(tip) + 1):
         else:
             otherbranch = hgbranch[parent]
         print 'merging', otherbranch, 'into', hgbranch[str(cset)]
-        os.system(getgitenv(user, date) + 'git-merge --no-commit -s ours "" %s %s' % (hgbranch[str(cset)], otherbranch))
+        os.system(getgitenv(user, date) + 'git merge --no-commit -s ours "" %s %s' % (hgbranch[str(cset)], otherbranch))
 
     # remove everything except .git and .hg directories
     os.system('find . \( -path "./.hg" -o -path "./.git" \) -prune -o ! -name "." -print | xargs rm -rf')
@@ -212,9 +215,9 @@ for cset in range(int(tip) + 1):
     os.system('hg update -C %d' % cset)
 
     # add new files
-    os.system('git-ls-files -x .hg --others | git-update-index --add --stdin')
+    os.system('git ls-files -x .hg --others | git update-index --add --stdin')
     # delete removed files
-    os.system('git-ls-files -x .hg --deleted | git-update-index --remove --stdin')
+    os.system('git ls-files -x .hg --deleted | git update-index --remove --stdin')
 
     # commit
     os.system(getgitenv(user, date) + 'git commit --allow-empty -a -F %s' % filecomment)
@@ -222,20 +225,20 @@ for cset in range(int(tip) + 1):
 
     # tag
     if tag and tag != 'tip':
-        os.system(getgitenv(user, date) + 'git-tag %s' % tag)
+        os.system(getgitenv(user, date) + 'git tag %s' % tag)
 
     # delete branch if not used anymore...
     if mparent and len(hgchildren[str(cset)]):
         print "Deleting unused branch:", otherbranch
-        os.system('git-branch -d %s' % otherbranch)
+        os.system('git branch -d %s' % otherbranch)
 
     # retrieve and record the version
-    vvv = os.popen('git-show --quiet --pretty=format:%H').read()
+    vvv = os.popen('git show --quiet --pretty=format:%H').read()
     print 'record', cset, '->', vvv
     hgvers[str(cset)] = vvv
 
 if hgnewcsets >= opt_nrepack and opt_nrepack != -1:
-    os.system('git-repack -a -d')
+    os.system('git repack -a -d')
 
 # write the state for incrementals
 if state:
index 1c66844783ec3baa1373b3f0c41ea080bc7354fe..352b69d4ceeec411a81469a6146e023aa1d6b338 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -319,8 +319,8 @@ static int apply_filter(const char *path, const char *src, size_t len,
 static struct convert_driver {
        const char *name;
        struct convert_driver *next;
-       char *smudge;
-       char *clean;
+       const char *smudge;
+       const char *clean;
 } *user_convert, **user_convert_tail;
 
 static int read_convert_config(const char *var, const char *value, void *cb)
@@ -358,19 +358,12 @@ static int read_convert_config(const char *var, const char *value, void *cb)
         * The command-line will not be interpolated in any way.
         */
 
-       if (!strcmp("smudge", ep)) {
-               if (!value)
-                       return config_error_nonbool(var);
-               drv->smudge = strdup(value);
-               return 0;
-       }
+       if (!strcmp("smudge", ep))
+               return git_config_string(&drv->smudge, var, value);
+
+       if (!strcmp("clean", ep))
+               return git_config_string(&drv->clean, var, value);
 
-       if (!strcmp("clean", ep)) {
-               if (!value)
-                       return config_error_nonbool(var);
-               drv->clean = strdup(value);
-               return 0;
-       }
        return 0;
 }
 
@@ -576,7 +569,7 @@ int convert_to_git(const char *path, const char *src, size_t len,
        struct git_attr_check check[3];
        int crlf = CRLF_GUESS;
        int ident = 0, ret = 0;
-       char *filter = NULL;
+       const char *filter = NULL;
 
        setup_convert_check(check);
        if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
@@ -606,7 +599,7 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc
        struct git_attr_check check[3];
        int crlf = CRLF_GUESS;
        int ident = 0, ret = 0;
-       char *filter = NULL;
+       const char *filter = NULL;
 
        setup_convert_check(check);
        if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
index 63cd12cd9c1909edbaab49aea066ff6fe03c3542..ce3a6f58f3c5c6bb88617510422c4053e0d545a2 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -694,23 +694,47 @@ static void kill_some_children(int signo, unsigned start, unsigned stop)
        }
 }
 
+static void check_dead_children(void)
+{
+       unsigned spawned, reaped, deleted;
+
+       spawned = children_spawned;
+       reaped = children_reaped;
+       deleted = children_deleted;
+
+       while (deleted < reaped) {
+               pid_t pid = dead_child[deleted % MAX_CHILDREN];
+               const char *dead = pid < 0 ? " (with error)" : "";
+
+               if (pid < 0)
+                       pid = -pid;
+
+               /* XXX: Custom logging, since we don't wanna getpid() */
+               if (verbose) {
+                       if (log_syslog)
+                               syslog(LOG_INFO, "[%d] Disconnected%s",
+                                               pid, dead);
+                       else
+                               fprintf(stderr, "[%d] Disconnected%s\n",
+                                               pid, dead);
+               }
+               remove_child(pid, deleted, spawned);
+               deleted++;
+       }
+       children_deleted = deleted;
+}
+
 static void check_max_connections(void)
 {
        for (;;) {
                int active;
-               unsigned spawned, reaped, deleted;
+               unsigned spawned, deleted;
+
+               check_dead_children();
 
                spawned = children_spawned;
-               reaped = children_reaped;
                deleted = children_deleted;
 
-               while (deleted < reaped) {
-                       pid_t pid = dead_child[deleted % MAX_CHILDREN];
-                       remove_child(pid, deleted, spawned);
-                       deleted++;
-               }
-               children_deleted = deleted;
-
                active = spawned - deleted;
                if (active <= max_connections)
                        break;
@@ -760,18 +784,10 @@ static void child_handler(int signo)
 
                if (pid > 0) {
                        unsigned reaped = children_reaped;
+                       if (!WIFEXITED(status) || WEXITSTATUS(status) > 0)
+                               pid = -pid;
                        dead_child[reaped % MAX_CHILDREN] = pid;
                        children_reaped = reaped + 1;
-                       /* XXX: Custom logging, since we don't wanna getpid() */
-                       if (verbose) {
-                               const char *dead = "";
-                               if (!WIFEXITED(status) || WEXITSTATUS(status) > 0)
-                                       dead = " (with error)";
-                               if (log_syslog)
-                                       syslog(LOG_INFO, "[%d] Disconnected%s", pid, dead);
-                               else
-                                       fprintf(stderr, "[%d] Disconnected%s\n", pid, dead);
-                       }
                        continue;
                }
                break;
@@ -928,8 +944,18 @@ static int service_loop(int socknum, int *socklist)
 
        for (;;) {
                int i;
+               int timeout;
 
-               if (poll(pfd, socknum, -1) < 0) {
+               /*
+                * This 1-sec timeout could lead to idly looping but it is
+                * here so that children culled in child_handler() are reported
+                * without too much delay.  We could probably set up a pipe
+                * to ourselves that we poll, and write to the fd from child_handler()
+                * to wake us up (and consume it when the poll() returns...
+                */
+               timeout = (children_spawned != children_deleted) ? 1000 : -1;
+               i = poll(pfd, socknum, timeout);
+               if (i < 0) {
                        if (errno != EINTR) {
                                error("poll failed, resuming: %s",
                                      strerror(errno));
@@ -937,6 +963,10 @@ static int service_loop(int socknum, int *socklist)
                        }
                        continue;
                }
+               if (i == 0) {
+                       check_dead_children();
+                       continue;
+               }
 
                for (i = 0; i < socknum; i++) {
                        if (pfd[i].revents & POLLIN) {
diff --git a/diff.c b/diff.c
index 803fbba451dfe8226097dcb791c339ee2ccd6735..6a39b393f3e276dd0e0352b5c05eec6989940854 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -153,12 +153,8 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
                diff_auto_refresh_index = git_config_bool(var, value);
                return 0;
        }
-       if (!strcmp(var, "diff.external")) {
-               if (!value)
-                       return config_error_nonbool(var);
-               external_diff_cmd_cfg = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "diff.external"))
+               return git_config_string(&external_diff_cmd_cfg, var, value);
        if (!prefixcmp(var, "diff.")) {
                const char *ep = strrchr(var, '.');
 
index 903953e68e98535e754b5a5dd6ba22eb6074ef20..801d7c02513be636ac682b503de7b9b4121acee9 100755 (executable)
@@ -18,6 +18,18 @@ my ($fraginfo_color) =
        $diff_use_color ? (
                $repo->get_color('color.diff.frag', 'cyan'),
        ) : ();
+my ($diff_plain_color) =
+       $diff_use_color ? (
+               $repo->get_color('color.diff.plain', ''),
+       ) : ();
+my ($diff_old_color) =
+       $diff_use_color ? (
+               $repo->get_color('color.diff.old', 'red'),
+       ) : ();
+my ($diff_new_color) =
+       $diff_use_color ? (
+               $repo->get_color('color.diff.new', 'green'),
+       ) : ();
 
 my $normal_color = $repo->get_color("", "reset");
 
@@ -682,92 +694,104 @@ sub split_hunk {
        return @split;
 }
 
-sub find_last_o_ctx {
-       my ($it) = @_;
-       my $text = $it->{TEXT};
-       my ($o_ofs, $o_cnt) = parse_hunk_header($text->[0]);
-       my $i = @{$text};
-       my $last_o_ctx = $o_ofs + $o_cnt;
-       while (0 < --$i) {
-               my $line = $text->[$i];
-               if ($line =~ /^ /) {
-                       $last_o_ctx--;
-                       next;
-               }
-               last;
-       }
-       return $last_o_ctx;
+
+sub color_diff {
+       return map {
+               colored((/^@/  ? $fraginfo_color :
+                        /^\+/ ? $diff_new_color :
+                        /^-/  ? $diff_old_color :
+                        $diff_plain_color),
+                       $_);
+       } @_;
 }
 
-sub merge_hunk {
-       my ($prev, $this) = @_;
-       my ($o0_ofs, $o0_cnt, $n0_ofs, $n0_cnt) =
-           parse_hunk_header($prev->{TEXT}[0]);
-       my ($o1_ofs, $o1_cnt, $n1_ofs, $n1_cnt) =
-           parse_hunk_header($this->{TEXT}[0]);
-
-       my (@line, $i, $ofs, $o_cnt, $n_cnt);
-       $ofs = $o0_ofs;
-       $o_cnt = $n_cnt = 0;
-       for ($i = 1; $i < @{$prev->{TEXT}}; $i++) {
-               my $line = $prev->{TEXT}[$i];
-               if ($line =~ /^\+/) {
-                       $n_cnt++;
-                       push @line, $line;
-                       next;
-               }
+sub edit_hunk_manually {
+       my ($oldtext) = @_;
 
-               last if ($o1_ofs <= $ofs);
+       my $hunkfile = $repo->repo_path . "/addp-hunk-edit.diff";
+       my $fh;
+       open $fh, '>', $hunkfile
+               or die "failed to open hunk edit file for writing: " . $!;
+       print $fh "# Manual hunk edit mode -- see bottom for a quick guide\n";
+       print $fh @$oldtext;
+       print $fh <<EOF;
+# ---
+# To remove '-' lines, make them ' ' lines (context).
+# To remove '+' lines, delete them.
+# Lines starting with # will be removed.
+#
+# If the patch applies cleanly, the edited hunk will immediately be
+# marked for staging. If it does not apply cleanly, you will be given
+# an opportunity to edit again. If all lines of the hunk are removed,
+# then the edit is aborted and the hunk is left unchanged.
+EOF
+       close $fh;
 
-               $o_cnt++;
-               $ofs++;
-               if ($line =~ /^ /) {
-                       $n_cnt++;
-               }
-               push @line, $line;
+       my $editor = $ENV{GIT_EDITOR} || $repo->config("core.editor")
+               || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
+       system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);
+
+       open $fh, '<', $hunkfile
+               or die "failed to open hunk edit file for reading: " . $!;
+       my @newtext = grep { !/^#/ } <$fh>;
+       close $fh;
+       unlink $hunkfile;
+
+       # Abort if nothing remains
+       if (!grep { /\S/ } @newtext) {
+               return undef;
        }
 
-       for ($i = 1; $i < @{$this->{TEXT}}; $i++) {
-               my $line = $this->{TEXT}[$i];
-               if ($line =~ /^\+/) {
-                       $n_cnt++;
-                       push @line, $line;
-                       next;
-               }
-               $ofs++;
-               $o_cnt++;
-               if ($line =~ /^ /) {
-                       $n_cnt++;
-               }
-               push @line, $line;
+       # Reinsert the first hunk header if the user accidentally deleted it
+       if ($newtext[0] !~ /^@/) {
+               unshift @newtext, $oldtext->[0];
+       }
+       return \@newtext;
+}
+
+sub diff_applies {
+       my $fh;
+       open $fh, '| git apply --recount --cached --check';
+       for my $h (@_) {
+               print $fh @{$h->{TEXT}};
        }
-       my $head = ("@@ -$o0_ofs" .
-                   (($o_cnt != 1) ? ",$o_cnt" : '') .
-                   " +$n0_ofs" .
-                   (($n_cnt != 1) ? ",$n_cnt" : '') .
-                   " @@\n");
-       @{$prev->{TEXT}} = ($head, @line);
+       return close $fh;
 }
 
-sub coalesce_overlapping_hunks {
-       my (@in) = @_;
-       my @out = ();
+sub prompt_yesno {
+       my ($prompt) = @_;
+       while (1) {
+               print colored $prompt_color, $prompt;
+               my $line = <STDIN>;
+               return 0 if $line =~ /^n/i;
+               return 1 if $line =~ /^y/i;
+       }
+}
 
-       my ($last_o_ctx);
+sub edit_hunk_loop {
+       my ($head, $hunk, $ix) = @_;
+       my $text = $hunk->[$ix]->{TEXT};
 
-       for (grep { $_->{USE} } @in) {
-               my $text = $_->{TEXT};
-               my ($o_ofs) = parse_hunk_header($text->[0]);
-               if (defined $last_o_ctx &&
-                   $o_ofs <= $last_o_ctx) {
-                       merge_hunk($out[-1], $_);
+       while (1) {
+               $text = edit_hunk_manually($text);
+               if (!defined $text) {
+                       return undef;
+               }
+               my $newhunk = { TEXT => $text, USE => 1 };
+               if (diff_applies($head,
+                                @{$hunk}[0..$ix-1],
+                                $newhunk,
+                                @{$hunk}[$ix+1..$#{$hunk}])) {
+                       $newhunk->{DISPLAY} = [color_diff(@{$text})];
+                       return $newhunk;
                }
                else {
-                       push @out, $_;
+                       prompt_yesno(
+                               'Your edited hunk does not apply. Edit again '
+                               . '(saying "no" discards!) [y/n]? '
+                               ) or return undef;
                }
-               $last_o_ctx = find_last_o_ctx($out[-1]);
        }
-       return @out;
 }
 
 sub help_patch_cmd {
@@ -781,6 +805,7 @@ J - leave this hunk undecided, see next hunk
 k - leave this hunk undecided, see previous undecided hunk
 K - leave this hunk undecided, see previous hunk
 s - split the current hunk into smaller hunks
+e - manually edit the current hunk
 ? - print help
 EOF
 }
@@ -885,6 +910,7 @@ sub patch_update_file {
                if (hunk_splittable($hunk[$ix]{TEXT})) {
                        $other .= '/s';
                }
+               $other .= '/e';
                for (@{$hunk[$ix]{DISPLAY}}) {
                        print;
                }
@@ -949,6 +975,12 @@ sub patch_update_file {
                                $num = scalar @hunk;
                                next;
                        }
+                       elsif ($line =~ /^e/) {
+                               my $newhunk = edit_hunk_loop($head, \@hunk, $ix);
+                               if (defined $newhunk) {
+                                       splice @hunk, $ix, 1, $newhunk;
+                               }
+                       }
                        else {
                                help_patch_cmd($other);
                                next;
@@ -962,47 +994,21 @@ sub patch_update_file {
                }
        }
 
-       @hunk = coalesce_overlapping_hunks(@hunk);
-
        my $n_lofs = 0;
        my @result = ();
        if ($mode->{USE}) {
                push @result, @{$mode->{TEXT}};
        }
        for (@hunk) {
-               my $text = $_->{TEXT};
-               my ($o_ofs, $o_cnt, $n_ofs, $n_cnt) =
-                   parse_hunk_header($text->[0]);
-
-               if (!$_->{USE}) {
-                       # We would have added ($n_cnt - $o_cnt) lines
-                       # to the postimage if we were to use this hunk,
-                       # but we didn't.  So the line number that the next
-                       # hunk starts at would be shifted by that much.
-                       $n_lofs -= ($n_cnt - $o_cnt);
-                       next;
-               }
-               else {
-                       if ($n_lofs) {
-                               $n_ofs += $n_lofs;
-                               $text->[0] = ("@@ -$o_ofs" .
-                                             (($o_cnt != 1)
-                                              ? ",$o_cnt" : '') .
-                                             " +$n_ofs" .
-                                             (($n_cnt != 1)
-                                              ? ",$n_cnt" : '') .
-                                             " @@\n");
-                       }
-                       for (@$text) {
-                               push @result, $_;
-                       }
+               if ($_->{USE}) {
+                       push @result, @{$_->{TEXT}};
                }
        }
 
        if (@result) {
                my $fh;
 
-               open $fh, '| git apply --cached';
+               open $fh, '| git apply --cached --recount';
                for (@{$head->{TEXT}}, @result) {
                        print $fh $_;
                }
index 545df5924247c9d4ffe700db6c158715561f6a62..8c7e11473390c14956e43843c17a2d85a336a087 100644 (file)
 #define PRIuMAX "llu"
 #endif
 
+#ifndef PRIu32
+#define PRIu32 "u"
+#endif
+
+#ifndef PRIx32
+#define PRIx32 "x"
+#endif
+
 #ifndef PATH_SEP
 #define PATH_SEP ':'
 #endif
index e6e88902f1dd1f678eaa5d1dc2d62f8dcacef484..d89f156fd54fe5e51e00793b908ce220e6aa91c8 100755 (executable)
@@ -1774,6 +1774,11 @@ proc do_commit {} {
        commit_tree
 }
 
+proc next_diff {} {
+       global next_diff_p next_diff_w next_diff_i
+       show_diff $next_diff_p $next_diff_w $next_diff_i
+}
+
 proc toggle_or_diff {w x y} {
        global file_states file_lists current_diff_path ui_index ui_workdir
        global last_clicked selected_paths
@@ -1792,12 +1797,34 @@ proc toggle_or_diff {w x y} {
        $ui_index tag remove in_sel 0.0 end
        $ui_workdir tag remove in_sel 0.0 end
 
-       if {$col == 0} {
-               if {$current_diff_path eq $path} {
+       if {$col == 0 && $y > 1} {
+               set i [expr {$lno-1}]
+               set ll [expr {[llength $file_lists($w)]-1}]
+
+               if {$i == $ll && $i == 0} {
                        set after {reshow_diff;}
                } else {
-                       set after {}
+                       global next_diff_p next_diff_w next_diff_i
+
+                       set next_diff_w $w
+
+                       if {$i < $ll} {
+                               set i [expr {$i + 1}]
+                               set next_diff_i $i
+                       } else {
+                               set next_diff_i $i
+                               set i [expr {$i - 1}]
+                       }
+
+                       set next_diff_p [lindex $file_lists($w) $i]
+
+                       if {$next_diff_p ne {} && $current_diff_path ne {}} {
+                               set after {next_diff;}
+                       } else {
+                               set after {}
+                       }
                }
+
                if {$w eq $ui_index} {
                        update_indexinfo \
                                "Unstaging [short_path $path] from commit" \
@@ -2639,6 +2666,11 @@ $ctxm add command \
        -command {apply_hunk $cursorX $cursorY}
 set ui_diff_applyhunk [$ctxm index last]
 lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
+$ctxm add command \
+       -label [mc "Apply/Reverse Line"] \
+       -command {apply_line $cursorX $cursorY; do_rescan}
+set ui_diff_applyline [$ctxm index last]
+lappend diff_actions [list $ctxm entryconf $ui_diff_applyline -state]
 $ctxm add separator
 $ctxm add command \
        -label [mc "Show Less Context"] \
@@ -2687,8 +2719,10 @@ proc popup_diff_menu {ctxm x y X Y} {
        set ::cursorY $y
        if {$::ui_index eq $::current_diff_side} {
                set l [mc "Unstage Hunk From Commit"]
+               set t [mc "Unstage Line From Commit"]
        } else {
                set l [mc "Stage Hunk For Commit"]
+               set t [mc "Stage Line For Commit"]
        }
        if {$::is_3way_diff
                || $current_diff_path eq {}
@@ -2699,6 +2733,7 @@ proc popup_diff_menu {ctxm x y X Y} {
                set s normal
        }
        $ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
+       $ctxm entryconf $::ui_diff_applyline -state $s -label $t
        tk_popup $ctxm $X $Y
 }
 bind_button3 $ui_diff [list popup_diff_menu $ctxm %x %y %X %Y]
index d04f6dbde2c468274770aa5543758186803e9ac5..96ba94906cf8037b58c2ba135654da840f9fff9a 100644 (file)
@@ -362,3 +362,90 @@ proc apply_hunk {x y} {
                set current_diff_path $current_diff_path
        }
 }
+
+proc apply_line {x y} {
+       global current_diff_path current_diff_header current_diff_side
+       global ui_diff ui_index file_states
+
+       if {$current_diff_path eq {} || $current_diff_header eq {}} return
+       if {![lock_index apply_hunk]} return
+
+       set apply_cmd {apply --cached --whitespace=nowarn}
+       set mi [lindex $file_states($current_diff_path) 0]
+       if {$current_diff_side eq $ui_index} {
+               set failed_msg [mc "Failed to unstage selected line."]
+               set to_context {+}
+               lappend apply_cmd --reverse
+               if {[string index $mi 0] ne {M}} {
+                       unlock_index
+                       return
+               }
+       } else {
+               set failed_msg [mc "Failed to stage selected line."]
+               set to_context {-}
+               if {[string index $mi 1] ne {M}} {
+                       unlock_index
+                       return
+               }
+       }
+
+       set the_l [$ui_diff index @$x,$y]
+
+       # operate only on change lines
+       set c1 [$ui_diff get "$the_l linestart"]
+       if {$c1 ne {+} && $c1 ne {-}} {
+               unlock_index
+               return
+       }
+       set sign $c1
+
+       set i_l [$ui_diff search -backwards -regexp ^@@ $the_l 0.0]
+       if {$i_l eq {}} {
+               unlock_index
+               return
+       }
+       # $i_l is now at the beginning of a line
+
+       # pick start line number from hunk header
+       set hh [$ui_diff get $i_l "$i_l + 1 lines"]
+       set hh [lindex [split $hh ,] 0]
+       set hln [lindex [split $hh -] 1]
+
+       set n 0
+       set i_l [$ui_diff index "$i_l + 1 lines"]
+       set patch {}
+       while {[$ui_diff compare $i_l < "end - 1 chars"] &&
+              [$ui_diff get $i_l "$i_l + 2 chars"] ne {@@}} {
+               set next_l [$ui_diff index "$i_l + 1 lines"]
+               set c1 [$ui_diff get $i_l]
+               if {[$ui_diff compare $i_l <= $the_l] &&
+                   [$ui_diff compare $the_l < $next_l]} {
+                       # the line to stage/unstage
+                       set ln [$ui_diff get $i_l $next_l]
+                       set patch "$patch$ln"
+               } elseif {$c1 ne {-} && $c1 ne {+}} {
+                       # context line
+                       set ln [$ui_diff get $i_l $next_l]
+                       set patch "$patch$ln"
+                       set n [expr $n+1]
+               } elseif {$c1 eq $to_context} {
+                       # turn change line into context line
+                       set ln [$ui_diff get "$i_l + 1 chars" $next_l]
+                       set patch "$patch $ln"
+                       set n [expr $n+1]
+               }
+               set i_l $next_l
+       }
+       set patch "@@ -$hln,$n +$hln,[eval expr $n $sign 1] @@\n$patch"
+
+       if {[catch {
+               set p [eval git_write $apply_cmd]
+               fconfigure $p -translation binary -encoding binary
+               puts -nonewline $p $current_diff_header
+               puts -nonewline $p $patch
+               close $p} err]} {
+               error_popup [append $failed_msg "\n\n$err"]
+       }
+
+       unlock_index
+}
diff --git a/git-merge-stupid.sh b/git-merge-stupid.sh
deleted file mode 100755 (executable)
index f612d47..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2005 Linus Torvalds
-#
-# Resolve two trees, 'stupid merge'.
-
-# The first parameters up to -- are merge bases; the rest are heads.
-bases= head= remotes= sep_seen=
-for arg
-do
-       case ",$sep_seen,$head,$arg," in
-       *,--,)
-               sep_seen=yes
-               ;;
-       ,yes,,*)
-               head=$arg
-               ;;
-       ,yes,*)
-               remotes="$remotes$arg "
-               ;;
-       *)
-               bases="$bases$arg "
-               ;;
-       esac
-done
-
-# Give up if we are given two or more remotes -- not handling octopus.
-case "$remotes" in
-?*' '?*)
-       exit 2 ;;
-esac
-
-# Find an optimum merge base if there are more than one candidates.
-case "$bases" in
-?*' '?*)
-       echo "Trying to find the optimum merge base."
-       G=.tmp-index$$
-       best=
-       best_cnt=-1
-       for c in $bases
-       do
-               rm -f $G
-               GIT_INDEX_FILE=$G git read-tree -m $c $head $remotes \
-                        2>/dev/null || continue
-               # Count the paths that are unmerged.
-               cnt=`GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l`
-               if test $best_cnt -le 0 -o $cnt -le $best_cnt
-               then
-                       best=$c
-                       best_cnt=$cnt
-                       if test "$best_cnt" -eq 0
-                       then
-                               # Cannot do any better than all trivial merge.
-                               break
-                       fi
-               fi
-       done
-       rm -f $G
-       common="$best"
-       ;;
-*)
-       common="$bases"
-       ;;
-esac
-
-git update-index --refresh 2>/dev/null
-git read-tree -u -m $common $head $remotes || exit 2
-echo "Trying simple merge."
-if result_tree=$(git write-tree  2>/dev/null)
-then
-       exit 0
-else
-       echo "Simple merge failed, trying Automatic merge."
-       if git-merge-index -o git-merge-one-file -a
-       then
-               exit 0
-       else
-               exit 1
-       fi
-fi
index 3564419e81694d84f4ebf036fe0df70277a81a98..6adb66947279e290d90be7da154f49e696894528 100755 (executable)
@@ -773,6 +773,9 @@ X-Mailer: git-send-email $gitversion
                                        $smtp = Net::SMTP::SSL->start_SSL($smtp)
                                                or die "STARTTLS failed! ".$smtp->message;
                                        $smtp_encryption = '';
+                                       # Send EHLO again to receive fresh
+                                       # supported commands
+                                       $smtp->hello();
                                } else {
                                        die "Server does not support STARTTLS! ".$smtp->message;
                                }
index 889445c4fc8ce523558644484de559d40229fc01..e4cb6c3e4bef5a714ff245624503a004d3c293e3 100755 (executable)
@@ -86,6 +86,13 @@ create_stash () {
 }
 
 save_stash () {
+       keep_index=
+       case "$1" in
+       --keep-index)
+               keep_index=t
+               shift
+       esac
+
        stash_msg="$1"
 
        if no_changes
@@ -104,6 +111,13 @@ save_stash () {
        git update-ref -m "$stash_msg" $ref_stash $w_commit ||
                die "Cannot save the current status"
        printf 'Saved working directory and index state "%s"\n' "$stash_msg"
+
+       git reset --hard
+
+       if test -n "$keep_index" && test -n $i_tree
+       then
+               git read-tree --reset -u $i_tree
+       fi
 }
 
 have_stash () {
@@ -153,7 +167,8 @@ apply_stash () {
                die "$*: no valid stashed state found"
 
        unstashed_index_tree=
-       if test -n "$unstash_index" && test "$b_tree" != "$i_tree"
+       if test -n "$unstash_index" && test "$b_tree" != "$i_tree" &&
+                       test "$c_tree" != "$i_tree"
        then
                git diff-tree --binary $s^2^..$s^2 | git apply --cached
                test $? -ne 0 &&
@@ -252,7 +267,7 @@ show)
        ;;
 save)
        shift
-       save_stash "$*" && git-reset --hard
+       save_stash "$*"
        ;;
 apply)
        shift
@@ -289,8 +304,7 @@ branch)
        if test $# -eq 0
        then
                save_stash &&
-               echo '(To restore them type "git stash apply")' &&
-               git-reset --hard
+               echo '(To restore them type "git stash apply")'
        else
                usage
        fi
index 3eb78cc724187998aa9ecf71509325631b8668c9..099a7d7560879c284c9fb2fff68f4588baaaf49b 100755 (executable)
@@ -167,8 +167,7 @@ cmd_add()
        # perhaps the path exists and is already a git repo, else clone it
        if test -e "$path"
        then
-               if test -d "$path/.git" &&
-               test "$(unset GIT_DIR; cd $path; git rev-parse --git-dir)" = ".git"
+               if test -d "$path"/.git -o -f "$path"/.git
                then
                        echo "Adding existing repo at '$path' to the index"
                else
index f789a6eeca12ed34e6ef3746c3062e56f791d7e9..a366c891dc9892550093f0bb760d5d2580eb11cd 100755 (executable)
@@ -643,6 +643,8 @@ sub canonicalize_path {
        $path =~ s#/[^/]+/\.\.##g;
        $path =~ s#/$##g;
        $path =~ s#^\./## if $dot_slash_added;
+       $path =~ s#^/##;
+       $path =~ s#^\.$##;
        return $path;
 }
 
diff --git a/git.c b/git.c
index 3307c078e539e150556f8b27264bbf29b05d9bb6..7075533aa7243abacf100cb8a8987284d5d144de 100644 (file)
--- a/git.c
+++ b/git.c
@@ -9,6 +9,43 @@ const char git_usage_string[] =
 const char git_more_info_string[] =
        "See 'git help COMMAND' for more information on a specific command.";
 
+static int use_pager = -1;
+struct pager_config {
+       const char *cmd;
+       int val;
+};
+
+static int pager_command_config(const char *var, const char *value, void *data)
+{
+       struct pager_config *c = data;
+       if (!prefixcmp(var, "pager.") && !strcmp(var + 6, c->cmd))
+               c->val = git_config_bool(var, value);
+       return 0;
+}
+
+/* returns 0 for "no pager", 1 for "use pager", and -1 for "not specified" */
+int check_pager_config(const char *cmd)
+{
+       struct pager_config c;
+       c.cmd = cmd;
+       c.val = -1;
+       git_config(pager_command_config, &c);
+       return c.val;
+}
+
+static void commit_pager_choice(void) {
+       switch (use_pager) {
+       case 0:
+               setenv("GIT_PAGER", "cat", 1);
+               break;
+       case 1:
+               setup_pager();
+               break;
+       default:
+               break;
+       }
+}
+
 static int handle_options(const char*** argv, int* argc, int* envchanged)
 {
        int handled = 0;
@@ -38,9 +75,9 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
                                exit(0);
                        }
                } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
-                       setup_pager();
+                       use_pager = 1;
                } else if (!strcmp(cmd, "--no-pager")) {
-                       setenv("GIT_PAGER", "cat", 1);
+                       use_pager = 0;
                        if (envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "--git-dir")) {
@@ -242,8 +279,13 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv)
        prefix = NULL;
        if (p->option & RUN_SETUP)
                prefix = setup_git_directory();
-       if (p->option & USE_PAGER)
-               setup_pager();
+
+       if (use_pager == -1 && p->option & RUN_SETUP)
+               use_pager = check_pager_config(p->cmd);
+       if (use_pager == -1 && p->option & USE_PAGER)
+               use_pager = 1;
+       commit_pager_choice();
+
        if (p->option & NEED_WORK_TREE)
                setup_work_tree();
 
@@ -466,6 +508,7 @@ int main(int argc, const char **argv)
        argv++;
        argc--;
        handle_options(&argv, &argc, NULL);
+       commit_pager_choice();
        if (argc > 0) {
                if (!prefixcmp(argv[0], "--"))
                        argv[0] += 2;
index f7194dbef79f3b03cc3524469c4b504a195807b6..26967e201aca8ea1c799e6b21cad468484753779 100644 (file)
@@ -144,6 +144,12 @@ Gitweb repositories
   Spaces in both project path and project owner have to be encoded as either
   '%20' or '+'.
 
+  Other characters that have to be url-encoded, i.e. replaced by '%'
+  followed by two-digit character number in octal, are: other whitespace
+  characters (because they are field separator in a record), plus sign '+'
+  (because it can be used as replacement for spaces), and percent sign '%'
+  (which is used for encoding / escaping).
+
   You can generate the projects list index file using the project_index
   action (the 'TXT' link on projects list page) directly from gitweb.
 
index 356ab7b327eb0df99c0773d68375e155dbcea0be..6908036402ffe56c8b0cdcebdfb3dfacf84fb6f1 100644 (file)
@@ -156,10 +156,11 @@ not include variables usually directly set during build):
    set correctly for gitweb to find repositories.
  * $projects_list
    Source of projects list, either directory to scan, or text file
-   with list of repositories (in the "<URI-encoded repository path> SPC
-   <URI-encoded repository owner>" format).  Set to $GITWEB_LIST
-   during installation.  If empty, $projectroot is used to scan for
-   repositories.
+   with list of repositories (in the "<URI-encoded repository path> SP
+   <URI-encoded repository owner>" line format; actually there can be
+   any sequence of whitespace in place of space (SP)).  Set to
+   $GITWEB_LIST during installation.  If empty, $projectroot is used
+   to scan for repositories.
  * $my_url, $my_uri
    URL and absolute URL of gitweb script; you might need to set those
    variables if you are using 'pathinfo' feature: see also below.
@@ -214,6 +215,39 @@ not include variables usually directly set during build):
    ('-M'); set it to ('-C') or ('-C', '-C') to also detect copies, or
    set it to () if you don't want to have renames detection.
 
+
+Projects list file format
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Instead of having gitweb find repositories by scanning filesystem starting
+from $projectroot (or $projects_list, if it points to directory), you can
+provide list of projects by setting $projects_list to a text file with list
+of projects (and some additional info).  This file uses the following
+format:
+
+One record (for project / repository) per line, whitespace separated fields;
+does not support (at least for now) lines continuation (newline escaping).
+Leading and trailing whitespace are ignored, any run of whitespace can be
+used as field separator (rules for Perl's "split(' ', $line)").  Keyed by
+the first field, which is project name, i.e. path to repository GIT_DIR
+relative to $projectroot.  Fields use modified URI encoding, defined in
+RFC 3986, section 2.1 (Percent-Encoding), or rather "Query string encoding"
+(see http://en.wikipedia.org/wiki/Query_string#URL_encoding), the difference
+being that SP (' ') can be encoded as '+' (and therefore '+' has to be also
+percent-encoded).  Reserved characters are: '%' (used for encoding), '+'
+(can be used to encode SPACE), all whitespace characters as defined in Perl,
+including SP, TAB and LF, (used to separate fields in a record).
+
+Currently list of fields is
+ * <repository path>  - path to repository GIT_DIR, relative to $projectroot
+ * <repository owner> - displayed as repository owner, preferably full name,
+                        or email, or both
+
+You can additionally use $projects_list file to limit which repositories
+are visible, and together with $strict_export to limit access to
+repositories (see "Gitweb repositories" section in gitweb/INSTALL).
+
+
 Per-repository gitweb configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -225,8 +259,8 @@ You can use the following files in repository:
  * README.html
    A .html file (HTML fragment) which is included on the gitweb project
    summary page inside <div> block element. You can use it for longer
-   description of a project, to provide links for example to projects
-   homepage, etc.
+   description of a project, to provide links (for example to project's
+   homepage), etc.
  * description (or gitweb.description)
    Short (shortened by default to 25 characters in the projects list page)
    single line description of a project (of a repository). Plain text file;
diff --git a/http.c b/http.c
index 105dc93843ba1f01ea0d40c63dd174e879f1a25a..1108ab4a3101fb4768cad420ccfdb52d87890a18 100644 (file)
--- a/http.c
+++ b/http.c
@@ -13,14 +13,14 @@ static CURL *curl_default;
 char curl_errorstr[CURL_ERROR_SIZE];
 
 static int curl_ssl_verify = -1;
-static char *ssl_cert = NULL;
+static const char *ssl_cert = NULL;
 #if LIBCURL_VERSION_NUM >= 0x070902
-static char *ssl_key = NULL;
+static const char *ssl_key = NULL;
 #endif
 #if LIBCURL_VERSION_NUM >= 0x070908
-static char *ssl_capath = NULL;
+static const char *ssl_capath = NULL;
 #endif
-static char *ssl_cainfo = NULL;
+static const char *ssl_cainfo = NULL;
 static long curl_low_speed_limit = -1;
 static long curl_low_speed_time = -1;
 static int curl_ftp_no_epsv = 0;
@@ -30,10 +30,11 @@ static struct curl_slist *pragma_header;
 
 static struct active_request_slot *active_queue_head = NULL;
 
-size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
-                          struct buffer *buffer)
+size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, void *buffer_)
 {
        size_t size = eltsize * nmemb;
+       struct buffer *buffer = buffer_;
+
        if (size > buffer->buf.len - buffer->posn)
                size = buffer->buf.len - buffer->posn;
        memcpy(ptr, buffer->buf.buf + buffer->posn, size);
@@ -42,17 +43,17 @@ size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
        return size;
 }
 
-size_t fwrite_buffer(const void *ptr, size_t eltsize,
-                           size_t nmemb, struct strbuf *buffer)
+size_t fwrite_buffer(const void *ptr, size_t eltsize, size_t nmemb, void *buffer_)
 {
        size_t size = eltsize * nmemb;
+       struct strbuf *buffer = buffer_;
+
        strbuf_add(buffer, ptr, size);
        data_received++;
        return size;
 }
 
-size_t fwrite_null(const void *ptr, size_t eltsize,
-                         size_t nmemb, struct strbuf *buffer)
+size_t fwrite_null(const void *ptr, size_t eltsize, size_t nmemb, void *strbuf)
 {
        data_received++;
        return eltsize * nmemb;
@@ -100,39 +101,27 @@ static int http_options(const char *var, const char *value, void *cb)
        }
 
        if (!strcmp("http.sslcert", var)) {
-               if (ssl_cert == NULL) {
-                       if (!value)
-                               return config_error_nonbool(var);
-                       ssl_cert = xstrdup(value);
-               }
+               if (ssl_cert == NULL)
+                       return git_config_string(&ssl_cert, var, value);
                return 0;
        }
 #if LIBCURL_VERSION_NUM >= 0x070902
        if (!strcmp("http.sslkey", var)) {
-               if (ssl_key == NULL) {
-                       if (!value)
-                               return config_error_nonbool(var);
-                       ssl_key = xstrdup(value);
-               }
+               if (ssl_key == NULL)
+                       return git_config_string(&ssl_key, var, value);
                return 0;
        }
 #endif
 #if LIBCURL_VERSION_NUM >= 0x070908
        if (!strcmp("http.sslcapath", var)) {
-               if (ssl_capath == NULL) {
-                       if (!value)
-                               return config_error_nonbool(var);
-                       ssl_capath = xstrdup(value);
-               }
+               if (ssl_capath == NULL)
+                       return git_config_string(&ssl_capath, var, value);
                return 0;
        }
 #endif
        if (!strcmp("http.sslcainfo", var)) {
-               if (ssl_cainfo == NULL) {
-                       if (!value)
-                               return config_error_nonbool(var);
-                       ssl_cainfo = xstrdup(value);
-               }
+               if (ssl_cainfo == NULL)
+                       return git_config_string(&ssl_cainfo, var, value);
                return 0;
        }
 
diff --git a/http.h b/http.h
index a04fc6a9277945a7084e718753c133ed47d13691..905b4629a47789705c13745fd56ce0c91adea41b 100644 (file)
--- a/http.h
+++ b/http.h
@@ -64,12 +64,9 @@ struct buffer
 };
 
 /* Curl request read/write callbacks */
-extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
-                          struct buffer *buffer);
-extern size_t fwrite_buffer(const void *ptr, size_t eltsize,
-                           size_t nmemb, struct strbuf *buffer);
-extern size_t fwrite_null(const void *ptr, size_t eltsize,
-                         size_t nmemb, struct strbuf *buffer);
+extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, void *strbuf);
+extern size_t fwrite_buffer(const void *ptr, size_t eltsize, size_t nmemb, void *strbuf);
+extern size_t fwrite_null(const void *ptr, size_t eltsize, size_t nmemb, void *strbuf);
 
 /* Slot lifecycle functions */
 extern struct active_request_slot *get_active_slot(void);
index 5ac91baf98615d7e494550155c1c4d7665ed2dcd..25db5db24b239409657510e8c2eeb3845b374bbf 100644 (file)
@@ -190,7 +190,8 @@ static void parse_pack_header(void)
        if (hdr->hdr_signature != htonl(PACK_SIGNATURE))
                die("pack signature mismatch");
        if (!pack_version_ok(hdr->hdr_version))
-               die("pack version %d unsupported", ntohl(hdr->hdr_version));
+               die("pack version %"PRIu32" unsupported",
+                       ntohl(hdr->hdr_version));
 
        nr_objects = ntohl(hdr->hdr_entries);
        use(sizeof(struct pack_header));
@@ -771,7 +772,8 @@ static int git_index_pack_config(const char *k, const char *v, void *cb)
        if (!strcmp(k, "pack.indexversion")) {
                pack_idx_default_version = git_config_int(k, v);
                if (pack_idx_default_version > 2)
-                       die("bad pack.indexversion=%d", pack_idx_default_version);
+                       die("bad pack.indexversion=%"PRIu32,
+                               pack_idx_default_version);
                return 0;
        }
        return git_default_config(k, v, cb);
diff --git a/path.c b/path.c
index 496123ca552a3aad32b009c668962045ec78d218..598325598bba8685d18d24c6331562cdf63fc05f 100644 (file)
--- a/path.c
+++ b/path.c
@@ -343,3 +343,99 @@ const char *make_relative_path(const char *abs, const char *base)
        strcpy(buf, abs + baselen);
        return buf;
 }
+
+/*
+ * path = absolute path
+ * buf = buffer of at least max(2, strlen(path)+1) bytes
+ * It is okay if buf == path, but they should not overlap otherwise.
+ *
+ * Performs the following normalizations on path, storing the result in buf:
+ * - Removes trailing slashes.
+ * - Removes empty components.
+ * - Removes "." components.
+ * - Removes ".." components, and the components the precede them.
+ * "" and paths that contain only slashes are normalized to "/".
+ * Returns the length of the output.
+ *
+ * Note that this function is purely textual.  It does not follow symlinks,
+ * verify the existence of the path, or make any system calls.
+ */
+int normalize_absolute_path(char *buf, const char *path)
+{
+       const char *comp_start = path, *comp_end = path;
+       char *dst = buf;
+       int comp_len;
+       assert(buf);
+       assert(path);
+
+       while (*comp_start) {
+               assert(*comp_start == '/');
+               while (*++comp_end && *comp_end != '/')
+                       ; /* nothing */
+               comp_len = comp_end - comp_start;
+
+               if (!strncmp("/",  comp_start, comp_len) ||
+                   !strncmp("/.", comp_start, comp_len))
+                       goto next;
+
+               if (!strncmp("/..", comp_start, comp_len)) {
+                       while (dst > buf && *--dst != '/')
+                               ; /* nothing */
+                       goto next;
+               }
+
+               memcpy(dst, comp_start, comp_len);
+               dst += comp_len;
+       next:
+               comp_start = comp_end;
+       }
+
+       if (dst == buf)
+               *dst++ = '/';
+
+       *dst = '\0';
+       return dst - buf;
+}
+
+/*
+ * path = Canonical absolute path
+ * prefix_list = Colon-separated list of absolute paths
+ *
+ * Determines, for each path in parent_list, whether the "prefix" really
+ * is an ancestor directory of path.  Returns the length of the longest
+ * ancestor directory, excluding any trailing slashes, or -1 if no prefix
+ * is an ancestor.  (Note that this means 0 is returned if prefix_list is
+ * "/".) "/foo" is not considered an ancestor of "/foobar".  Directories
+ * are not considered to be their own ancestors.  path must be in a
+ * canonical form: empty components, or "." or ".." components are not
+ * allowed.  prefix_list may be null, which is like "".
+ */
+int longest_ancestor_length(const char *path, const char *prefix_list)
+{
+       char buf[PATH_MAX+1];
+       const char *ceil, *colon;
+       int len, max_len = -1;
+
+       if (prefix_list == NULL || !strcmp(path, "/"))
+               return -1;
+
+       for (colon = ceil = prefix_list; *colon; ceil = colon+1) {
+               for (colon = ceil; *colon && *colon != ':'; colon++);
+               len = colon - ceil;
+               if (len == 0 || len > PATH_MAX || !is_absolute_path(ceil))
+                       continue;
+               strlcpy(buf, ceil, len+1);
+               len = normalize_absolute_path(buf, buf);
+               /* Strip "trailing slashes" from "/". */
+               if (len == 1)
+                       len = 0;
+
+               if (!strncmp(path, buf, len) &&
+                   path[len] == '/' &&
+                   len > max_len) {
+                       max_len = len;
+               }
+       }
+
+       return max_len;
+}
index 97e61efaff240a60ecd25ba68d391e75ed7ce958..d99e7782002e01079b3866003cc8555b7e130e3f 100644 (file)
@@ -56,7 +56,8 @@ require Exporter;
 @EXPORT_OK = qw(command command_oneline command_noisy
                 command_output_pipe command_input_pipe command_close_pipe
                 command_bidi_pipe command_close_bidi_pipe
-                version exec_path hash_object git_cmd_try);
+                version exec_path hash_object git_cmd_try
+                remote_refs);
 
 
 =head1 DESCRIPTION
@@ -668,6 +669,59 @@ sub get_color {
        return $color;
 }
 
+=item remote_refs ( REPOSITORY [, GROUPS [, REFGLOBS ] ] )
+
+This function returns a hashref of refs stored in a given remote repository.
+The hash is in the format C<refname =\> hash>. For tags, the C<refname> entry
+contains the tag object while a C<refname^{}> entry gives the tagged objects.
+
+C<REPOSITORY> has the same meaning as the appropriate C<git-ls-remote>
+argument; either an URL or a remote name (if called on a repository instance).
+C<GROUPS> is an optional arrayref that can contain 'tags' to return all the
+tags and/or 'heads' to return all the heads. C<REFGLOB> is an optional array
+of strings containing a shell-like glob to further limit the refs returned in
+the hash; the meaning is again the same as the appropriate C<git-ls-remote>
+argument.
+
+This function may or may not be called on a repository instance. In the former
+case, remote names as defined in the repository are recognized as repository
+specifiers.
+
+=cut
+
+sub remote_refs {
+       my ($self, $repo, $groups, $refglobs) = _maybe_self(@_);
+       my @args;
+       if (ref $groups eq 'ARRAY') {
+               foreach (@$groups) {
+                       if ($_ eq 'heads') {
+                               push (@args, '--heads');
+                       } elsif ($_ eq 'tags') {
+                               push (@args, '--tags');
+                       } else {
+                               # Ignore unknown groups for future
+                               # compatibility
+                       }
+               }
+       }
+       push (@args, $repo);
+       if (ref $refglobs eq 'ARRAY') {
+               push (@args, @$refglobs);
+       }
+
+       my @self = $self ? ($self) : (); # Ultra trickery
+       my ($fh, $ctx) = Git::command_output_pipe(@self, 'ls-remote', @args);
+       my %refs;
+       while (<$fh>) {
+               chomp;
+               my ($hash, $ref) = split(/\t/, $_, 2);
+               $refs{$ref} = $hash;
+       }
+       Git::command_close_pipe(@self, $fh, $ctx);
+       return \%refs;
+}
+
+
 =item ident ( TYPE | IDENTSTR )
 
 =item ident_person ( TYPE | IDENTSTR | IDENTARRAY )
index b26f2e3a41c870d1b73690e389dbd74a8b8a40a0..fa653b49fe3c865b7e9c3723136b5b2344f8f4ca 100644 (file)
@@ -370,7 +370,8 @@ static const char *unpack(void)
        hdr_err = parse_pack_header(&hdr);
        if (hdr_err)
                return hdr_err;
-       snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u",
+       snprintf(hdr_arg, sizeof(hdr_arg),
+                       "--pack_header=%"PRIu32",%"PRIu32,
                        ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries));
 
        if (ntohl(hdr.hdr_entries) < unpack_limit) {
diff --git a/refs.c b/refs.c
index 9e8e8581ba981ca88366b614f1e8749cfe8a6ae5..39a3b23804d2da715c564459bf320be23d41c1bf 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -925,7 +925,7 @@ int delete_ref(const char *refname, const unsigned char *sha1)
                i = strlen(lock->lk->filename) - 5; /* .lock */
                lock->lk->filename[i] = 0;
                err = unlink(lock->lk->filename);
-               if (err) {
+               if (err && errno != ENOENT) {
                        ret = 1;
                        error("unlink(%s) failed: %s",
                              lock->lk->filename, strerror(errno));
@@ -1412,6 +1412,10 @@ int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *
        tz = strtoul(tz_c, NULL, 10);
        if (get_sha1_hex(logdata, sha1))
                die("Log %s is corrupt.", logfile);
+       if (is_null_sha1(sha1)) {
+               if (get_sha1_hex(logdata + 41, sha1))
+                       die("Log %s is corrupt.", logfile);
+       }
        if (msg)
                *msg = ref_msg(logdata, logend);
        munmap(log_mapped, mapsz);
index ff2c8021678fee5ef12060d35c6eb1960e8792c7..df8bd72ba9b9728aeff0c34208a6492b7d0b692c 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1,6 +1,9 @@
 #include "cache.h"
 #include "remote.h"
 #include "refs.h"
+#include "commit.h"
+#include "diff.h"
+#include "revision.h"
 
 static struct refspec s_tag_refspec = {
        0,
@@ -1222,3 +1225,117 @@ int resolve_remote_symref(struct ref *ref, struct ref *list)
                }
        return 1;
 }
+
+/*
+ * Return true if there is anything to report, otherwise false.
+ */
+int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs)
+{
+       unsigned char sha1[20];
+       struct commit *ours, *theirs;
+       char symmetric[84];
+       struct rev_info revs;
+       const char *rev_argv[10], *base;
+       int rev_argc;
+
+       /*
+        * Nothing to report unless we are marked to build on top of
+        * somebody else.
+        */
+       if (!branch ||
+           !branch->merge || !branch->merge[0] || !branch->merge[0]->dst)
+               return 0;
+
+       /*
+        * If what we used to build on no longer exists, there is
+        * nothing to report.
+        */
+       base = branch->merge[0]->dst;
+       if (!resolve_ref(base, sha1, 1, NULL))
+               return 0;
+       theirs = lookup_commit(sha1);
+       if (!theirs)
+               return 0;
+
+       if (!resolve_ref(branch->refname, sha1, 1, NULL))
+               return 0;
+       ours = lookup_commit(sha1);
+       if (!ours)
+               return 0;
+
+       /* are we the same? */
+       if (theirs == ours)
+               return 0;
+
+       /* Run "rev-list --left-right ours...theirs" internally... */
+       rev_argc = 0;
+       rev_argv[rev_argc++] = NULL;
+       rev_argv[rev_argc++] = "--left-right";
+       rev_argv[rev_argc++] = symmetric;
+       rev_argv[rev_argc++] = "--";
+       rev_argv[rev_argc] = NULL;
+
+       strcpy(symmetric, sha1_to_hex(ours->object.sha1));
+       strcpy(symmetric + 40, "...");
+       strcpy(symmetric + 43, sha1_to_hex(theirs->object.sha1));
+
+       init_revisions(&revs, NULL);
+       setup_revisions(rev_argc, rev_argv, &revs, NULL);
+       prepare_revision_walk(&revs);
+
+       /* ... and count the commits on each side. */
+       *num_ours = 0;
+       *num_theirs = 0;
+       while (1) {
+               struct commit *c = get_revision(&revs);
+               if (!c)
+                       break;
+               if (c->object.flags & SYMMETRIC_LEFT)
+                       (*num_ours)++;
+               else
+                       (*num_theirs)++;
+       }
+
+       /* clear object flags smudged by the above traversal */
+       clear_commit_marks(ours, ALL_REV_FLAGS);
+       clear_commit_marks(theirs, ALL_REV_FLAGS);
+       return 1;
+}
+
+/*
+ * Return true when there is anything to report, otherwise false.
+ */
+int format_tracking_info(struct branch *branch, struct strbuf *sb)
+{
+       int num_ours, num_theirs;
+       const char *base, *remote_msg;
+
+       if (!stat_tracking_info(branch, &num_ours, &num_theirs))
+               return 0;
+
+       base = branch->merge[0]->dst;
+       if (!prefixcmp(base, "refs/remotes/")) {
+               remote_msg = " remote";
+               base += strlen("refs/remotes/");
+       } else {
+               remote_msg = "";
+       }
+       if (!num_theirs)
+               strbuf_addf(sb, "Your branch is ahead of the tracked%s branch '%s' "
+                           "by %d commit%s.\n",
+                           remote_msg, base,
+                           num_ours, (num_ours == 1) ? "" : "s");
+       else if (!num_ours)
+               strbuf_addf(sb, "Your branch is behind the tracked%s branch '%s' "
+                           "by %d commit%s,\n"
+                           "and can be fast-forwarded.\n",
+                           remote_msg, base,
+                           num_theirs, (num_theirs == 1) ? "" : "s");
+       else
+               strbuf_addf(sb, "Your branch and the tracked%s branch '%s' "
+                           "have diverged,\nand respectively "
+                           "have %d and %d different commit(s) each.\n",
+                           remote_msg, base,
+                           num_ours, num_theirs);
+       return 1;
+}
index 8eed87ba5ab78eb4635632c21843590467d0d864..091b1d041f8a4d255f59bfc001e098e692dbc15c 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -129,4 +129,8 @@ enum match_refs_flags {
        MATCH_REFS_MIRROR       = (1 << 1),
 };
 
+/* Reporting of tracking info */
+int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs);
+int format_tracking_info(struct branch *branch, struct strbuf *sb);
+
 #endif
index fc667552592daa3c894d0df4e97469d1809dbf27..6ce6042a63f2495da4dff03b08cc8bcd4aee5bdf 100644 (file)
@@ -910,6 +910,23 @@ int handle_revision_arg(const char *arg, struct rev_info *revs,
        return 0;
 }
 
+void read_revisions_from_stdin(struct rev_info *revs)
+{
+       char line[1000];
+
+       while (fgets(line, sizeof(line), stdin) != NULL) {
+               int len = strlen(line);
+               if (len && line[len - 1] == '\n')
+                       line[--len] = '\0';
+               if (!len)
+                       break;
+               if (line[0] == '-')
+                       die("options not supported in --stdin mode");
+               if (handle_revision_arg(line, revs, 0, 1))
+                       die("bad revision '%s'", line);
+       }
+}
+
 static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what)
 {
        if (!revs->grep_filter) {
index abce5001f19a60bb15b519b26773b57c83563021..f57b6c5d9a832311711e989a63911c886dd1a418 100644 (file)
@@ -11,6 +11,7 @@
 #define ADDED          (1u<<7) /* Parents already parsed and added? */
 #define SYMMETRIC_LEFT (1u<<8)
 #define TOPOSORT       (1u<<9) /* In the active toposort list.. */
+#define ALL_REV_FLAGS  ((1u<<10)-1)
 
 struct rev_info;
 struct log_info;
@@ -111,6 +112,8 @@ struct rev_info {
 #define REV_TREE_DIFFERENT     2
 
 /* revision.c */
+void read_revisions_from_stdin(struct rev_info *revs);
+
 typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
 volatile show_early_output_fn_t show_early_output;
 
index 2ce8c2b2f057b712eb8c1223e3150af17d553afe..6e29fdf9e2968900d21ea48b992f292204621f19 100644 (file)
@@ -65,6 +65,8 @@ int start_command(struct child_process *cmd)
                cmd->err = fderr[0];
        }
 
+       trace_argv_printf(cmd->argv, "trace: run_command:");
+
 #ifndef __MINGW32__
        cmd->pid = fork();
        if (!cmd->pid) {
diff --git a/setup.c b/setup.c
index cc3fb380c1f3471f0371ba54ca2f338f90a8d4fc..6cf909463d4ad3681a2f35269db9dc944f4389c2 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -376,11 +376,11 @@ const char *read_gitfile_gently(const char *path)
 const char *setup_git_directory_gently(int *nongit_ok)
 {
        const char *work_tree_env = getenv(GIT_WORK_TREE_ENVIRONMENT);
+       const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
        static char cwd[PATH_MAX+1];
        const char *gitdirenv;
        const char *gitfile_dir;
-       int len, offset;
-       int minoffset = 0;
+       int len, offset, ceil_offset;
 
        /*
         * Let's assume that we are in a git repository.
@@ -431,8 +431,10 @@ const char *setup_git_directory_gently(int *nongit_ok)
 
        if (!getcwd(cwd, sizeof(cwd)-1))
                die("Unable to read current working directory");
-       if (has_dos_drive_prefix(cwd))
-               minoffset = 2;
+
+       ceil_offset = longest_ancestor_length(cwd, env_ceiling_dirs);
+       if (ceil_offset < 0 && has_dos_drive_prefix(cwd))
+               ceil_offset = 1;
 
        /*
         * Test in the following order (relative to the cwd):
@@ -463,18 +465,17 @@ const char *setup_git_directory_gently(int *nongit_ok)
                        check_repository_format_gently(nongit_ok);
                        return NULL;
                }
-               chdir("..");
-               do {
-                       if (offset <= minoffset) {
-                               if (nongit_ok) {
-                                       if (chdir(cwd))
-                                               die("Cannot come back to cwd");
-                                       *nongit_ok = 1;
-                                       return NULL;
-                               }
-                               die("Not a git repository");
+               while (--offset > ceil_offset && cwd[offset] != '/');
+               if (offset <= ceil_offset) {
+                       if (nongit_ok) {
+                               if (chdir(cwd))
+                                       die("Cannot come back to cwd");
+                               *nongit_ok = 1;
+                               return NULL;
                        }
-               } while (offset > minoffset && cwd[--offset] != '/');
+                       die("Not a git repository");
+               }
+               chdir("..");
        }
 
        inside_git_dir = 0;
index 2187e6caedc7b1824291c3330ed92851fed69704..2df78b5afd57cf8e86f01134bf6c49d74defc52a 100644 (file)
@@ -484,7 +484,7 @@ static int check_packed_git_idx(const char *path,  struct packed_git *p)
                version = ntohl(hdr->idx_version);
                if (version < 2 || version > 2) {
                        munmap(idx_map, idx_size);
-                       return error("index file %s is version %d"
+                       return error("index file %s is version %"PRIu32
                                     " and is not supported by this binary"
                                     " (try upgrading GIT to a newer version)",
                                     path, version);
@@ -695,14 +695,14 @@ static int open_packed_git_1(struct packed_git *p)
        if (hdr.hdr_signature != htonl(PACK_SIGNATURE))
                return error("file %s is not a GIT packfile", p->pack_name);
        if (!pack_version_ok(hdr.hdr_version))
-               return error("packfile %s is version %u and not supported"
-                       " (try upgrading GIT to a newer version)",
+               return error("packfile %s is version %"PRIu32" and not"
+                       " supported (try upgrading GIT to a newer version)",
                        p->pack_name, ntohl(hdr.hdr_version));
 
        /* Verify the pack matches its index. */
        if (p->num_objects != ntohl(hdr.hdr_entries))
-               return error("packfile %s claims to have %u objects"
-                            " while index indicates %u objects",
+               return error("packfile %s claims to have %"PRIu32" objects"
+                            " while index indicates %"PRIu32" objects",
                             p->pack_name, ntohl(hdr.hdr_entries),
                             p->num_objects);
        if (lseek(p->pack_fd, p->pack_size - sizeof(sha1), SEEK_SET) == -1)
@@ -1630,6 +1630,7 @@ static void *unpack_delta_entry(struct packed_git *p,
                      (uintmax_t)curpos, p->pack_name);
                return NULL;
        }
+       unuse_pack(w_curs);
        base = cache_or_unpack_entry(p, base_offset, &base_size, type, 0);
        if (!base) {
                /*
@@ -1769,7 +1770,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,
        }
 
        if (debug_lookup)
-               printf("%02x%02x%02x... lo %u hi %u nr %u\n",
+               printf("%02x%02x%02x... lo %u hi %u nr %"PRIu32"\n",
                       sha1[0], sha1[1], sha1[2], lo, hi, p->num_objects);
 
        if (use_lookup < 0)
index 7253991fff9f6240ee6413986dfc66cfa3ff184e..45bb535773fd9c36f73502df9462f7de800009c8 100644 (file)
@@ -68,7 +68,8 @@ int main(int argc, char **argv)
                                                     ntohl(off64[1]);
                                off64_nr++;
                        }
-                       printf("%" PRIuMAX " %s (%08x)\n", (uintmax_t) offset,
+                       printf("%" PRIuMAX " %s (%08"PRIx32")\n",
+                              (uintmax_t) offset,
                               sha1_to_hex(entries[i].sha1),
                               ntohl(entries[i].crc));
                }
index a5c4436fd104e93ca74b11e11bc98238aaf83b29..dc473dfb53d5ffafee72738a55caf21732fa4fb1 100644 (file)
@@ -45,22 +45,22 @@ else
        error "Could not identify web server at '$LIB_HTTPD_PATH'"
 fi
 
-HTTPD_PARA="-d $HTTPD_ROOT_PATH -f $TEST_PATH/apache.conf"
+HTTPD_PARA=""
 
 prepare_httpd() {
-       mkdir -p $HTTPD_DOCUMENT_ROOT_PATH
+       mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH"
 
-       ln -s $LIB_HTTPD_MODULE_PATH $HTTPD_ROOT_PATH/modules
+       ln -s "$LIB_HTTPD_MODULE_PATH" "$HTTPD_ROOT_PATH/modules"
 
        if test -n "$LIB_HTTPD_SSL"
        then
                HTTPD_URL=https://127.0.0.1:$LIB_HTTPD_PORT
 
                RANDFILE_PATH="$HTTPD_ROOT_PATH"/.rnd openssl req \
-                       -config $TEST_PATH/ssl.cnf \
+                       -config "$TEST_PATH/ssl.cnf" \
                        -new -x509 -nodes \
-                       -out $HTTPD_ROOT_PATH/httpd.pem \
-                       -keyout $HTTPD_ROOT_PATH/httpd.pem
+                       -out "$HTTPD_ROOT_PATH/httpd.pem" \
+                       -keyout "$HTTPD_ROOT_PATH/httpd.pem"
                GIT_SSL_NO_VERIFY=t
                export GIT_SSL_NO_VERIFY
                HTTPD_PARA="$HTTPD_PARA -DSSL"
@@ -86,12 +86,14 @@ start_httpd() {
 
        trap 'stop_httpd; die' exit
 
-       "$LIB_HTTPD_PATH" $HTTPD_PARA \
+       "$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
+               -f "$TEST_PATH/apache.conf" $HTTPD_PARA \
                -c "Listen 127.0.0.1:$LIB_HTTPD_PORT" -k start
 }
 
 stop_httpd() {
        trap 'die' exit
 
-       "$LIB_HTTPD_PATH" $HTTPD_PARA -k stop
+       "$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
+               -f "$TEST_PATH/apache.conf" -k stop
 }
index a4473462d10602a7cc57ee792d8e130a8207c38c..4717c2d33b70af6527f8951ec8a414e8caf87095 100644 (file)
@@ -1,3 +1,4 @@
+ServerName dummy
 PidFile httpd.pid
 DocumentRoot www
 ErrorLog error.log
index 690f80ab27fd9ff6d7e145a86eb22c6f87e3cd76..d7cbc5c6dae538fe8c053a2f3760502422615e2c 100755 (executable)
@@ -301,14 +301,14 @@ test_expect_success 'absolute path works as expected' '
        mkdir third &&
        dir="$(cd .git; pwd -P)" &&
        dir2=third/../second/other/.git &&
-       test "$dir" = "$(test-absolute-path $dir2)" &&
+       test "$dir" = "$(test-path-utils make_absolute_path $dir2)" &&
        file="$dir"/index &&
-       test "$file" = "$(test-absolute-path $dir2/index)" &&
+       test "$file" = "$(test-path-utils make_absolute_path $dir2/index)" &&
        basename=blub &&
-       test "$dir/$basename" = "$(cd .git && test-absolute-path "$basename")" &&
+       test "$dir/$basename" = "$(cd .git && test-path-utils make_absolute_path "$basename")" &&
        ln -s ../first/file .git/syml &&
        sym="$(cd first; pwd -P)"/file &&
-       test "$sym" = "$(test-absolute-path "$dir2/syml")"
+       test "$sym" = "$(test-path-utils make_absolute_path "$dir2/syml")"
 '
 
 test_expect_success 'very long name in the index handled sanely' '
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
new file mode 100755 (executable)
index 0000000..6e7501f
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 David Reiss
+#
+
+test_description='Test various path utilities'
+
+. ./test-lib.sh
+
+norm_abs() {
+       test_expect_success "normalize absolute" \
+       "test \$(test-path-utils normalize_absolute_path '$1') = '$2'"
+}
+
+ancestor() {
+       test_expect_success "longest ancestor" \
+       "test \$(test-path-utils longest_ancestor_length '$1' '$2') = '$3'"
+}
+
+norm_abs "" /
+norm_abs / /
+norm_abs // /
+norm_abs /// /
+norm_abs /. /
+norm_abs /./ /
+norm_abs /./.. /
+norm_abs /../. /
+norm_abs /./../.// /
+norm_abs /dir/.. /
+norm_abs /dir/sub/../.. /
+norm_abs /dir /dir
+norm_abs /dir// /dir
+norm_abs /./dir /dir
+norm_abs /dir/. /dir
+norm_abs /dir///./ /dir
+norm_abs /dir//sub/.. /dir
+norm_abs /dir/sub/../ /dir
+norm_abs //dir/sub/../. /dir
+norm_abs /dir/s1/../s2/ /dir/s2
+norm_abs /d1/s1///s2/..//../s3/ /d1/s3
+norm_abs /d1/s1//../s2/../../d2 /d2
+norm_abs /d1/.../d2 /d1/.../d2
+norm_abs /d1/..././../d2 /d1/d2
+
+ancestor / "" -1
+ancestor / / -1
+ancestor /foo "" -1
+ancestor /foo : -1
+ancestor /foo ::. -1
+ancestor /foo ::..:: -1
+ancestor /foo / 0
+ancestor /foo /fo -1
+ancestor /foo /foo -1
+ancestor /foo /foo/ -1
+ancestor /foo /bar -1
+ancestor /foo /bar/ -1
+ancestor /foo /foo/bar -1
+ancestor /foo /foo:/bar/ -1
+ancestor /foo /foo/:/bar/ -1
+ancestor /foo /foo::/bar/ -1
+ancestor /foo /:/foo:/bar/ 0
+ancestor /foo /foo:/:/bar/ 0
+ancestor /foo /:/bar/:/foo 0
+ancestor /foo/bar "" -1
+ancestor /foo/bar / 0
+ancestor /foo/bar /fo -1
+ancestor /foo/bar foo -1
+ancestor /foo/bar /foo 4
+ancestor /foo/bar /foo/ 4
+ancestor /foo/bar /foo/ba -1
+ancestor /foo/bar /:/fo 0
+ancestor /foo/bar /foo:/foo/ba 4
+ancestor /foo/bar /bar -1
+ancestor /foo/bar /bar/ -1
+ancestor /foo/bar /fo: -1
+ancestor /foo/bar :/fo -1
+ancestor /foo/bar /foo:/bar/ 4
+ancestor /foo/bar /:/foo:/bar/ 4
+ancestor /foo/bar /foo:/:/bar/ 4
+ancestor /foo/bar /:/bar/:/fo 0
+ancestor /foo/bar /:/bar/ 0
+ancestor /foo/bar :://foo/. 4
+ancestor /foo/bar :://foo/.:: 4
+ancestor /foo/bar //foo/./::/bar 4
+ancestor /foo/bar ::/bar -1
+
+test_done
index f387d46f1a17ac9f9d3319c4da7e30a6c6326c67..ca99d37616aaaae9584ecfd1c5d74378c727d077 100755 (executable)
@@ -155,7 +155,8 @@ rm -f .git/$m .git/logs/$m expect
 
 git update-ref $m $D
 cat >.git/logs/$m <<EOF
-$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
+0000000000000000000000000000000000000000 $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
+$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500
 $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
 $F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
 $Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500
@@ -186,6 +187,12 @@ test_expect_success \
        'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \
        'rm -f o e
         git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
+        test '"$C"' = $(cat o) &&
+        test "" = "$(cat e)"'
+test_expect_success \
+       'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' \
+       'rm -f o e
+        git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
         test '"$A"' = $(cat o) &&
         test "" = "$(cat e)"'
 test_expect_success \
diff --git a/t/t1504-ceiling-dirs.sh b/t/t1504-ceiling-dirs.sh
new file mode 100755 (executable)
index 0000000..91b704a
--- /dev/null
@@ -0,0 +1,163 @@
+#!/bin/sh
+
+test_description='test GIT_CEILING_DIRECTORIES'
+. ./test-lib.sh
+
+test_prefix() {
+       test_expect_success "$1" \
+       "test '$2' = \"\$(git rev-parse --show-prefix)\""
+}
+
+test_fail() {
+       test_expect_code 128 "$1: prefix" \
+       "git rev-parse --show-prefix"
+}
+
+TRASH_ROOT="$(pwd)"
+ROOT_PARENT=$(dirname "$TRASH_ROOT")
+
+
+unset GIT_CEILING_DIRECTORIES
+test_prefix no_ceil ""
+
+export GIT_CEILING_DIRECTORIES
+
+GIT_CEILING_DIRECTORIES=""
+test_prefix ceil_empty ""
+
+GIT_CEILING_DIRECTORIES="$ROOT_PARENT"
+test_prefix ceil_at_parent ""
+
+GIT_CEILING_DIRECTORIES="$ROOT_PARENT/"
+test_prefix ceil_at_parent_slash ""
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT"
+test_prefix ceil_at_trash ""
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/"
+test_prefix ceil_at_trash_slash ""
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub"
+test_prefix ceil_at_sub ""
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
+test_prefix ceil_at_sub_slash ""
+
+
+mkdir -p sub/dir || exit 1
+cd sub/dir || exit 1
+
+unset GIT_CEILING_DIRECTORIES
+test_prefix subdir_no_ceil "sub/dir/"
+
+export GIT_CEILING_DIRECTORIES
+
+GIT_CEILING_DIRECTORIES=""
+test_prefix subdir_ceil_empty "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT"
+test_fail subdir_ceil_at_trash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/"
+test_fail subdir_ceil_at_trash_slash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub"
+test_fail subdir_ceil_at_sub
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
+test_fail subdir_ceil_at_sub_slash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/dir"
+test_prefix subdir_ceil_at_subdir "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/dir/"
+test_prefix subdir_ceil_at_subdir_slash "sub/dir/"
+
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/su"
+test_prefix subdir_ceil_at_su "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/su/"
+test_prefix subdir_ceil_at_su_slash "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/di"
+test_prefix subdir_ceil_at_sub_di "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/di"
+test_prefix subdir_ceil_at_sub_di_slash "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/subdi"
+test_prefix subdir_ceil_at_subdi "sub/dir/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/subdi"
+test_prefix subdir_ceil_at_subdi_slash "sub/dir/"
+
+
+GIT_CEILING_DIRECTORIES="foo:$TRASH_ROOT/sub"
+test_fail second_of_two
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub:bar"
+test_fail first_of_two
+
+GIT_CEILING_DIRECTORIES="foo:$TRASH_ROOT/sub:bar"
+test_fail second_of_three
+
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub"
+GIT_DIR=../../.git
+export GIT_DIR
+test_prefix git_dir_specified ""
+unset GIT_DIR
+
+
+cd ../.. || exit 1
+mkdir -p s/d || exit 1
+cd s/d || exit 1
+
+unset GIT_CEILING_DIRECTORIES
+test_prefix sd_no_ceil "s/d/"
+
+export GIT_CEILING_DIRECTORIES
+
+GIT_CEILING_DIRECTORIES=""
+test_prefix sd_ceil_empty "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT"
+test_fail sd_ceil_at_trash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/"
+test_fail sd_ceil_at_trash_slash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s"
+test_fail sd_ceil_at_s
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s/"
+test_fail sd_ceil_at_s_slash
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s/d"
+test_prefix sd_ceil_at_sd "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s/d/"
+test_prefix sd_ceil_at_sd_slash "s/d/"
+
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/su"
+test_prefix sd_ceil_at_su "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/su/"
+test_prefix sd_ceil_at_su_slash "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s/di"
+test_prefix sd_ceil_at_s_di "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/s/di"
+test_prefix sd_ceil_at_s_di_slash "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sdi"
+test_prefix sd_ceil_at_sdi "s/d/"
+
+GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sdi"
+test_prefix sd_ceil_at_sdi_slash "s/d/"
+
+
+test_done
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
new file mode 100755 (executable)
index 0000000..b0faa29
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+test_description='test cherry-picking a root commit'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+       echo first > file1 &&
+       git add file1 &&
+       test_tick &&
+       git commit -m "first" &&
+
+       git symbolic-ref HEAD refs/heads/second &&
+       rm .git/index file1 &&
+       echo second > file2 &&
+       git add file2 &&
+       test_tick &&
+       git commit -m "second"
+
+'
+
+test_expect_success 'cherry-pick a root commit' '
+
+       git cherry-pick master &&
+       test first = $(cat file1)
+
+'
+
+test_done
index fae64eae9f9ff9b34b935e8556df61d2093425cf..e95663d8e66d5b94e574a6b956625fccfd341a05 100755 (executable)
@@ -66,6 +66,73 @@ test_expect_success 'revert works (commit)' '
        grep "unchanged *+3/-0 file" output
 '
 
+cat >expected <<EOF
+EOF
+cat >fake_editor.sh <<EOF
+EOF
+chmod a+x fake_editor.sh
+test_set_editor "$(pwd)/fake_editor.sh"
+test_expect_success 'dummy edit works' '
+       (echo e; echo a) | git add -p &&
+       git diff > diff &&
+       test_cmp expected diff
+'
+
+cat >patch <<EOF
+@@ -1,1 +1,4 @@
+ this
++patch
+-doesn't
+ apply
+EOF
+echo "#!$SHELL_PATH" >fake_editor.sh
+cat >>fake_editor.sh <<\EOF
+mv -f "$1" oldpatch &&
+mv -f patch "$1"
+EOF
+chmod a+x fake_editor.sh
+test_set_editor "$(pwd)/fake_editor.sh"
+test_expect_success 'bad edit rejected' '
+       git reset &&
+       (echo e; echo n; echo d) | git add -p >output &&
+       grep "hunk does not apply" output
+'
+
+cat >patch <<EOF
+this patch
+is garbage
+EOF
+test_expect_success 'garbage edit rejected' '
+       git reset &&
+       (echo e; echo n; echo d) | git add -p >output &&
+       grep "hunk does not apply" output
+'
+
+cat >patch <<EOF
+@@ -1,0 +1,0 @@
+ baseline
++content
++newcontent
++lines
+EOF
+cat >expected <<EOF
+diff --git a/file b/file
+index b5dd6c9..f910ae9 100644
+--- a/file
++++ b/file
+@@ -1,4 +1,4 @@
+ baseline
+ content
+-newcontent
++more
+ lines
+EOF
+test_expect_success 'real edit works' '
+       (echo e; echo n; echo d) | git add -p &&
+       git diff >output &&
+       test_cmp expected output
+'
+
 if test "$(git config --bool core.filemode)" = false
 then
     say 'skipping filemode tests (filesystem does not properly support modes)'
index be837bb98ded356bfc10b3c371921b1b7bbb56bf..e0c67740a5ef85aaa3edc9a4514da72c92ce30ec 100755 (executable)
@@ -33,6 +33,8 @@ mode
 non git (1)
 non git (2)
 non git (3)
+incomplete (1)
+incomplete (2)
 EOF
 
 test_done
diff --git a/t/t4100/t-apply-8.expect b/t/t4100/t-apply-8.expect
new file mode 100644 (file)
index 0000000..eef7f2e
--- /dev/null
@@ -0,0 +1,2 @@
+ t/t4100-apply-stat.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t4100/t-apply-8.patch b/t/t4100/t-apply-8.patch
new file mode 100644 (file)
index 0000000..5ca13e6
--- /dev/null
@@ -0,0 +1,11 @@
+diff --git a/t/t4100-apply-stat.sh b/t/t4100-apply-stat.sh
+index be837bb..0798c64 100755
+--- a/t/t4100-apply-stat.sh
++++ b/t/t4100-apply-stat.sh
+@@ -35,4 +35,4 @@ non git (2)
+ non git (3)
+ EOF
+-test_done
++test_done
+\ No newline at end of file
diff --git a/t/t4100/t-apply-9.expect b/t/t4100/t-apply-9.expect
new file mode 100644 (file)
index 0000000..eef7f2e
--- /dev/null
@@ -0,0 +1,2 @@
+ t/t4100-apply-stat.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t4100/t-apply-9.patch b/t/t4100/t-apply-9.patch
new file mode 100644 (file)
index 0000000..875d57d
--- /dev/null
@@ -0,0 +1,11 @@
+diff --git a/t/t4100-apply-stat.sh b/t/t4100-apply-stat.sh
+index 0798c64..be837bb 100755
+--- a/t/t4100-apply-stat.sh
++++ b/t/t4100-apply-stat.sh
+@@ -35,4 +35,4 @@ non git (2)
+ non git (3)
+ EOF
+-test_done
+\ No newline at end of file
++test_done
index 70a1859503c7ee6a5b1a6db19174c1c359eec13f..f9ad183758c28ff648890d1bd4bbd599562cd795 100755 (executable)
@@ -36,6 +36,9 @@ typedef struct __jmp_buf jmp_buf[1];
 
 #endif /* _SETJMP_H */
 EOF
+cat >klibc/README <<\EOF
+This is a simple readme file.
+EOF
 
 cat >patch <<\EOF
 diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/cris/klibc/archsetjmp.h
@@ -113,6 +116,23 @@ rename to include/arch/m32r/klibc/archsetjmp.h
 
 -#endif /* _SETJMP_H */
 +#endif /* _KLIBC_ARCHSETJMP_H */
+diff --git a/klibc/README b/klibc/README
+--- a/klibc/README
++++ b/klibc/README
+@@ -1,1 +1,4 @@
+ This is a simple readme file.
++And we add a few
++lines at the
++end of it.
+diff --git a/klibc/README b/klibc/arch/README
+copy from klibc/README
+copy to klibc/arch/README
+--- a/klibc/README
++++ b/klibc/arch/README
+@@ -1,1 +1,3 @@
+ This is a simple readme file.
++And we copy it to one level down, and
++add a few lines at the end of it.
 EOF
 
 find klibc -type f -print | xargs git update-index --add --
index 2a6ed77c658423c01c1713eab194ccb86b25c476..1f859dd908cb298bf89a13822e8fc19882060689 100755 (executable)
@@ -4,6 +4,11 @@ test_description='apply same filename'
 
 . ./test-lib.sh
 
+modify () {
+       sed -e "$1" < "$2" > "$2".x &&
+       mv "$2".x "$2"
+}
+
 test_expect_success setup '
        for i in a b c d e f g h i j k l m
        do
@@ -14,10 +19,10 @@ test_expect_success setup '
        git commit -m initial
 '
 test_expect_success 'apply same filename with independent changes' '
-       sed -i -e "s/^d/z/" same_fn &&
+       modify "s/^d/z/" same_fn &&
        git diff > patch0 &&
        git add same_fn &&
-       sed -i -e "s/^i/y/" same_fn &&
+       modify "s/^i/y/" same_fn &&
        git diff >> patch0 &&
        cp same_fn same_fn2 &&
        git reset --hard &&
@@ -27,10 +32,10 @@ test_expect_success 'apply same filename with independent changes' '
 
 test_expect_success 'apply same filename with overlapping changes' '
        git reset --hard
-       sed -i -e "s/^d/z/" same_fn &&
+       modify "s/^d/z/" same_fn &&
        git diff > patch0 &&
        git add same_fn &&
-       sed -i -e "s/^e/y/" same_fn &&
+       modify "s/^e/y/" same_fn &&
        git diff >> patch0 &&
        cp same_fn same_fn2 &&
        git reset --hard &&
@@ -41,10 +46,10 @@ test_expect_success 'apply same filename with overlapping changes' '
 test_expect_success 'apply same new filename after rename' '
        git reset --hard
        git mv same_fn new_fn
-       sed -i -e "s/^d/z/" new_fn &&
+       modify "s/^d/z/" new_fn &&
        git add new_fn &&
        git diff -M --cached > patch1 &&
-       sed -i -e "s/^e/y/" new_fn &&
+       modify "s/^e/y/" new_fn &&
        git diff >> patch1 &&
        cp new_fn new_fn2 &&
        git reset --hard &&
@@ -55,11 +60,11 @@ test_expect_success 'apply same new filename after rename' '
 test_expect_success 'apply same old filename after rename -- should fail.' '
        git reset --hard
        git mv same_fn new_fn
-       sed -i -e "s/^d/z/" new_fn &&
+       modify "s/^d/z/" new_fn &&
        git add new_fn &&
        git diff -M --cached > patch1 &&
        git mv new_fn same_fn
-       sed -i -e "s/^e/y/" same_fn &&
+       modify "s/^e/y/" same_fn &&
        git diff >> patch1 &&
        git reset --hard &&
        test_must_fail git apply patch1
@@ -68,15 +73,15 @@ test_expect_success 'apply same old filename after rename -- should fail.' '
 test_expect_success 'apply A->B (rename), C->A (rename), A->A -- should pass.' '
        git reset --hard
        git mv same_fn new_fn
-       sed -i -e "s/^d/z/" new_fn &&
+       modify "s/^d/z/" new_fn &&
        git add new_fn &&
        git diff -M --cached > patch1 &&
        git commit -m "a rename" &&
        git mv other_fn same_fn
-       sed -i -e "s/^e/y/" same_fn &&
+       modify "s/^e/y/" same_fn &&
        git add same_fn &&
        git diff -M --cached >> patch1 &&
-       sed -i -e "s/^g/x/" same_fn &&
+       modify "s/^g/x/" same_fn &&
        git diff >> patch1 &&
        git reset --hard HEAD^ &&
        git apply patch1
diff --git a/t/t4128-apply-root.sh b/t/t4128-apply-root.sh
new file mode 100755 (executable)
index 0000000..2dd0c75
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+test_description='apply same filename'
+
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+
+       mkdir -p some/sub/dir &&
+       echo Hello > some/sub/dir/file &&
+       git add some/sub/dir/file &&
+       git commit -m initial &&
+       git tag initial
+
+'
+
+cat > patch << EOF
+diff a/bla/blub/dir/file b/bla/blub/dir/file
+--- a/bla/blub/dir/file
++++ b/bla/blub/dir/file
+@@ -1,1 +1,1 @@
+-Hello
++Bello
+EOF
+
+test_expect_success 'apply --directory -p (1)' '
+
+       git apply --directory=some/sub -p3 --index patch &&
+       test Bello = $(git show :some/sub/dir/file) &&
+       test Bello = $(cat some/sub/dir/file)
+
+'
+
+test_expect_success 'apply --directory -p (2) ' '
+
+       git reset --hard initial &&
+       git apply --directory=some/sub/ -p3 --index patch &&
+       test Bello = $(git show :some/sub/dir/file) &&
+       test Bello = $(cat some/sub/dir/file)
+
+'
+
+test_done
index 85d7e3edcd04be761167ca87cb39a1597908201e..a64727d5ad00cb222e3020b6702e4f89e212039c 100755 (executable)
@@ -193,9 +193,19 @@ test_expect_success 'resolution was recorded properly' '
        echo Bello > file3 &&
        git add file3 &&
        git commit -m version2 &&
-       ! git merge fifth &&
-       git diff-files -q &&
-       test Cello = "$(cat file3)"
+       git tag version2 &&
+       test_must_fail git merge fifth &&
+       test Cello = "$(cat file3)" &&
+       test 0 != $(git ls-files -u | wc -l)
+'
+
+test_expect_success 'rerere.autoupdate' '
+       git config rerere.autoupdate true
+       git reset --hard &&
+       git checkout version2 &&
+       test_must_fail git merge fifth &&
+       test 0 = $(git ls-files -u | wc -l)
+
 '
 
 test_done
old mode 100644 (file)
new mode 100755 (executable)
index 1493a92c06d041e502bcc08a1cee95e6758f1775..64fe2615acbd3368536b8a79c0b707561b3e16bd 100755 (executable)
@@ -10,6 +10,7 @@ test_expect_success 'setup' '
        git commit -m 1 &&
        git branch b1 &&
        git branch b2 &&
+       git branch b3 &&
        git clone . aa &&
        git checkout b1 &&
        echo b1 >>file &&
@@ -50,4 +51,10 @@ test_expect_success 'deleted branches have their tracking branches removed' '
        test "$(git rev-parse origin/b1)" = "origin/b1"
 '
 
+test_expect_success 'already deleted tracking branches ignored' '
+       git branch -d -r origin/b3 &&
+       git push origin :b3 >output 2>&1 &&
+       ! grep error output
+'
+
 test_done
index f15dd03e4dbf9febed662f3a285ea1bb35ce396c..21dbb557b7cfad412ba1796519a7a63a403c35bb 100755 (executable)
@@ -12,6 +12,13 @@ This test runs various sanity checks on http-push.'
 ROOT_PATH="$PWD"
 LIB_HTTPD_DAV=t
 
+if git http-push > /dev/null 2>&1 || [ $? -eq 128 ]
+then
+       say "skipping test, USE_CURL_MULTI is not defined"
+       test_done
+       exit
+fi
+
 . ../lib-httpd.sh
 
 if ! start_httpd >&3 2>&4
@@ -36,7 +43,7 @@ test_expect_success 'setup remote repository' '
        git --bare update-server-info &&
        chmod +x hooks/post-update &&
        cd - &&
-       mv test_repo.git $HTTPD_DOCUMENT_ROOT_PATH
+       mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"
 '
 
 test_expect_success 'clone remote repository' '
@@ -44,16 +51,17 @@ test_expect_success 'clone remote repository' '
        git clone $HTTPD_URL/test_repo.git test_repo_clone
 '
 
-test_expect_success 'push to remote repository' '
+test_expect_failure 'push to remote repository' '
        cd "$ROOT_PATH"/test_repo_clone &&
        : >path2 &&
        git add path2 &&
        test_tick &&
        git commit -m path2 &&
-       git push
+       git push &&
+       [ -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/refs/heads/master" ]
 '
 
-test_expect_success 'create and delete remote branch' '
+test_expect_failure 'create and delete remote branch' '
        cd "$ROOT_PATH"/test_repo_clone &&
        git checkout -b dev &&
        : >path3 &&
index b642fb260b37a7be2bcd37ea22ba2097e26f07a2..d785b3df78e8507d81ffa03ff694846791edfc87 100755 (executable)
@@ -17,14 +17,32 @@ test_expect_success setup '
 
 '
 
-test_expect_success 'clone with excess parameters' '
+test_expect_success 'clone with excess parameters (1)' '
 
+       rm -fr dst &&
+       test_must_fail git clone -n src dst junk
+
+'
+
+test_expect_success 'clone with excess parameters (2)' '
+
+       rm -fr dst &&
        test_must_fail git clone -n "file://$(pwd)/src" dst junk
 
 '
 
+test_expect_success 'clone does not keep pack' '
+
+       rm -fr dst &&
+       git clone -n "file://$(pwd)/src" dst &&
+       ! test -f dst/file &&
+       ! (echo dst/.git/objects/pack/pack-* | grep "\.keep")
+
+'
+
 test_expect_success 'clone checks out files' '
 
+       rm -fr dst &&
        git clone src dst &&
        test -f dst/file
 
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
new file mode 100755 (executable)
index 0000000..aac212e
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+test_description='remote tracking stats'
+
+. ./test-lib.sh
+
+advance () {
+       echo "$1" >"$1" &&
+       git add "$1" &&
+       test_tick &&
+       git commit -m "$1"
+}
+
+test_expect_success setup '
+       for i in a b c;
+       do
+               advance $i || break
+       done &&
+       git clone . test &&
+       (
+               cd test &&
+               git checkout -b b1 origin &&
+               git reset --hard HEAD^ &&
+               advance d &&
+               git checkout -b b2 origin &&
+               git reset --hard b1 &&
+               git checkout -b b3 origin &&
+               git reset --hard HEAD^ &&
+               git checkout -b b4 origin &&
+               advance e &&
+               advance f
+       )
+'
+
+script='s/^..\(b.\)[    0-9a-f]*\[\([^]]*\)\].*/\1 \2/p'
+cat >expect <<\EOF
+b1 ahead 1, behind 1
+b2 ahead 1, behind 1
+b3 behind 1
+b4 ahead 2
+EOF
+
+test_expect_success 'branch -v' '
+       (
+               cd test &&
+               git branch -v
+       ) |
+       sed -n -e "$script" >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'checkout' '
+       (
+               cd test && git checkout b1
+       ) >actual &&
+       grep -e "have 1 and 1 different" actual
+'
+
+test_expect_success 'status' '
+       (
+               cd test &&
+               git checkout b1 >/dev/null &&
+               # reports nothing to commit
+               test_must_fail git status
+       ) >actual &&
+       grep -e "have 1 and 1 different" actual
+'
+
+
+test_done
old mode 100644 (file)
new mode 100755 (executable)
index 6a5211f1873be6a8bb80404cda34751c46f26e86..31c340fd389ed2688bb94a29acbf892be6f0c564 100755 (executable)
@@ -4,6 +4,10 @@ test_description='git-repack works correctly'
 
 . ./test-lib.sh
 
+fsha1=
+csha1=
+tsha1=
+
 test_expect_success '-A option leaves unreachable objects unpacked' '
        echo content > file1 &&
        git add . &&
@@ -44,4 +48,34 @@ test_expect_success '-A option leaves unreachable objects unpacked' '
        git show $tsha1
 '
 
+compare_mtimes ()
+{
+       perl -e 'my $reference = shift;
+                foreach my $file (@ARGV) {
+                       exit(1) unless(-f $file && -M $file == -M $reference);
+                }
+                exit(0);
+               ' -- "$@"
+}
+
+test_expect_success 'unpacked objects receive timestamp of pack file' '
+       fsha1path=$(echo "$fsha1" | sed -e "s|\(..\)|\1/|") &&
+       fsha1path=".git/objects/$fsha1path" &&
+       csha1path=$(echo "$csha1" | sed -e "s|\(..\)|\1/|") &&
+       csha1path=".git/objects/$csha1path" &&
+       tsha1path=$(echo "$tsha1" | sed -e "s|\(..\)|\1/|") &&
+       tsha1path=".git/objects/$tsha1path" &&
+       git branch transient_branch $csha1 &&
+       git repack -a -d -l &&
+       test ! -f "$fsha1path" &&
+       test ! -f "$csha1path" &&
+       test ! -f "$tsha1path" &&
+       test 1 = $(ls -1 .git/objects/pack/pack-*.pack | wc -l) &&
+       packfile=$(ls .git/objects/pack/pack-*.pack) &&
+       git branch -D transient_branch &&
+       sleep 1 &&
+       git repack -A -l &&
+       compare_mtimes "$packfile" "$fsha1path" "$csha1path" "$tsha1path"
+'
+
 test_done
index 242cdf092acdbfc88858de1dbcfe3c817a67a4c2..3bc6164125f683d26213035ee9b1ea9199be5792 100755 (executable)
@@ -4,9 +4,9 @@
 #
 
 test_description='git-svn basic tests'
-GIT_SVN_LC_ALL=$LC_ALL
+GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
 
-case "$LC_ALL" in
+case "$GIT_SVN_LC_ALL" in
 *.UTF-8)
        have_utf8=t
        ;;
@@ -17,7 +17,7 @@ esac
 
 . ./lib-git-svn.sh
 
-echo 'define NO_SVN_TESTS to skip git-svn tests'
+say 'define NO_SVN_TESTS to skip git-svn tests'
 
 test_expect_success \
     'initialize git-svn' '
@@ -183,7 +183,7 @@ then
                git-svn set-tree HEAD"
        unset LC_ALL
 else
-       echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
+       say "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
 fi
 
 name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
index 31c929b57368fe08f35301a75bff48e19b86a06d..8da8ce58eb1b29210a6ac95fdd3a3fcb547ca36f 100755 (executable)
@@ -7,12 +7,18 @@
 # I don't like the idea of taking a port and possibly leaving a
 # daemon running on a users system if the test fails.
 # Not all git users will need to interact with SVN.
-test -z "$SVNSERVE_PORT" && exit 0
 
 test_description='git-svn dcommit new files over svn:// test'
 
 . ./lib-git-svn.sh
 
+if test -z "$SVNSERVE_PORT"
+then
+       say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
+       test_done
+       exit
+fi
+
 start_svnserve () {
        svnserve --listen-port $SVNSERVE_PORT \
                 --root "$rawsvnrepo" \
index c0c5e0e83b01c1ede231a59a2a628e374de246da..8e2849b5ce915c3984894628e8e3ce990812ddfd 100644 (file)
@@ -35,6 +35,7 @@ unset GIT_WORK_TREE
 unset GIT_EXTERNAL_DIFF
 unset GIT_INDEX_FILE
 unset GIT_OBJECT_DIRECTORY
+unset GIT_CEILING_DIRECTORIES
 unset SHA1_FILE_DIRECTORIES
 unset SHA1_FILE_DIRECTORY
 GIT_MERGE_VERBOSITY=5
diff --git a/test-absolute-path.c b/test-absolute-path.c
deleted file mode 100644 (file)
index c959ea2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "cache.h"
-
-int main(int argc, char **argv)
-{
-       while (argc > 1) {
-               puts(make_absolute_path(argv[1]));
-               argc--;
-               argv++;
-       }
-       return 0;
-}
diff --git a/test-path-utils.c b/test-path-utils.c
new file mode 100644 (file)
index 0000000..a0bcb0e
--- /dev/null
@@ -0,0 +1,26 @@
+#include "cache.h"
+
+int main(int argc, char **argv)
+{
+       if (argc == 3 && !strcmp(argv[1], "normalize_absolute_path")) {
+               char *buf = xmalloc(strlen(argv[2])+1);
+               int rv = normalize_absolute_path(buf, argv[2]);
+               assert(strlen(buf) == rv);
+               puts(buf);
+       }
+
+       if (argc >= 2 && !strcmp(argv[1], "make_absolute_path")) {
+               while (argc > 2) {
+                       puts(make_absolute_path(argv[2]));
+                       argc--;
+                       argv++;
+               }
+       }
+
+       if (argc == 4 && !strcmp(argv[1], "longest_ancestor_length")) {
+               int len = longest_ancestor_length(argv[2], argv[3]);
+               printf("%d\n", len);
+       }
+
+       return 0;
+}
index 4145eed9794a956b05967f049fe2caedcaa67feb..6eb65b873afc9dfd457e974b63d88350bb8dc913 100644 (file)
@@ -645,7 +645,9 @@ static int fetch_refs_via_pack(struct transport *transport,
        args.lock_pack = 1;
        args.use_thin_pack = data->thin;
        args.include_tag = data->followtags;
-       args.verbose = transport->verbose > 0;
+       args.verbose = (transport->verbose > 0);
+       args.quiet = args.no_progress = (transport->verbose < 0);
+       args.no_progress = !isatty(1);
        args.depth = data->depth;
 
        for (i = 0; i < nr_heads; i++)
index 28c9e637e3dd42a2c2364dd7b9f099f4671861cb..889e50f89fc24984f700d14f7033600fa9fdf642 100644 (file)
@@ -9,6 +9,7 @@
 #include "diffcore.h"
 #include "quote.h"
 #include "run-command.h"
+#include "remote.h"
 
 int wt_status_relative_paths = 1;
 int wt_status_use_color = -1;
@@ -315,6 +316,25 @@ static void wt_status_print_verbose(struct wt_status *s)
        run_diff_index(&rev, 1);
 }
 
+static void wt_status_print_tracking(struct wt_status *s)
+{
+       struct strbuf sb = STRBUF_INIT;
+       const char *cp, *ep;
+       struct branch *branch;
+
+       assert(s->branch && !s->is_initial);
+       if (prefixcmp(s->branch, "refs/heads/"))
+               return;
+       branch = branch_get(s->branch + 11);
+       if (!format_tracking_info(branch, &sb))
+               return;
+
+       for (cp = sb.buf; (ep = strchr(cp, '\n')) != NULL; cp = ep + 1)
+               color_fprintf_ln(s->fp, color(WT_STATUS_HEADER),
+                                "# %.*s", (int)(ep - cp), cp);
+       color_fprintf_ln(s->fp, color(WT_STATUS_HEADER), "#");
+}
+
 void wt_status_print(struct wt_status *s)
 {
        unsigned char sha1[20];
@@ -333,6 +353,8 @@ void wt_status_print(struct wt_status *s)
                }
                color_fprintf(s->fp, color(WT_STATUS_HEADER), "# ");
                color_fprintf_ln(s->fp, branch_color, "%s%s", on_what, branch_name);
+               if (!s->is_initial)
+                       wt_status_print_tracking(s);
        }
 
        if (s->is_initial) {
@@ -399,7 +421,7 @@ int git_status_config(const char *k, const char *v, void *cb)
        }
        if (!strcmp(k, "status.showuntrackedfiles")) {
                if (!v)
-                       return config_error_nonbool(v);
+                       return config_error_nonbool(k);
                else if (!strcmp(v, "no"))
                        show_untracked_files = SHOW_NO_UNTRACKED_FILES;
                else if (!strcmp(v, "normal"))