From fd0368f985c2d6179d76cdf3569b0798d42f9196 Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Fri, 13 Jul 2007 01:54:07 +0200 Subject: Document long options '--message=' and '--no-commit' Document that '--message=' is long version of '-m ' in git-commit, and that '--no-checkout' is long version of '-n' in git-clone. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 53a7bb0895..352a494cb4 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -71,7 +71,7 @@ OPTIONS Override the author name used in the commit. Use `A U Thor ` format. --m :: +-m |--message=:: Use the given as the commit message. -s|--signoff:: -- cgit v1.3 From af83bed6903256c581f081ba7bba372f19804b30 Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Fri, 13 Jul 2007 01:54:08 +0200 Subject: Document git commit --untracked-files and --verbose Documentation based on description of commit 443f8338 which added '-u'|'--untracked-files' option to git-status, and on git-runstatus(1) man page. Note that those options apply also to git-status. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 352a494cb4..f96142f96a 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -8,7 +8,7 @@ git-commit - Record changes to the repository SYNOPSIS -------- [verse] -'git-commit' [-a | --interactive] [-s] [-v] +'git-commit' [-a | --interactive] [-s] [-v] [-u] [(-c | -C) | -F | -m | --amend] [--no-verify] [-e] [--author ] [--] [[-i | -o ]...] @@ -115,6 +115,19 @@ but can be used to amend a merge commit. as well. This is usually not what you want unless you are concluding a conflicted merge. +-u|--untracked-files:: + Show all untracked files, also those in uninteresting + directories, in the "Untracked files:" section of commit + message template. Without this option only its name and + a trailing slash are displayed for each untracked + directory. + +-v|--verbose:: + Show unified diff between the HEAD commit and what + would be committed at the bottom of the commit message + template. Note that this diff output doesn't have its + lines prefixed with '#'. + -q|--quiet:: Suppress commit summary message. -- cgit v1.3 From ef0c2abf3e5061f891b7f07953ef3b0695f52c89 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Thu, 19 Jul 2007 22:09:35 -0700 Subject: Add GIT_EDITOR environment and core.editor configuration variables These variables let you specify an editor that will be launched in preference to the EDITOR and VISUAL environment variables. The order of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL. [jc: added a test and config variable documentation] Signed-off-by: Adam Roben Signed-off-by: Junio C Hamano --- Documentation/config.txt | 8 ++++ Documentation/git-commit.txt | 10 +++-- Documentation/git-send-email.txt | 4 +- git-am.sh | 2 +- git-commit.sh | 11 +---- git-rebase--interactive.sh | 2 +- git-send-email.perl | 7 ++-- git-sh-setup.sh | 15 +++++++ git-tag.sh | 2 +- t/t7005-editor.sh | 91 ++++++++++++++++++++++++++++++++++++++++ 10 files changed, 129 insertions(+), 23 deletions(-) create mode 100755 t/t7005-editor.sh (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/config.txt b/Documentation/config.txt index d0e9a175f4..a850d55bf6 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -281,6 +281,14 @@ core.excludesfile:: of files which are not meant to be tracked. See gitlink:gitignore[5]. +core.editor:: + Commands such as `commit` and `tag` that lets you edit + messages by lauching an editor uses the value of this + variable when it is set, and the environment variable + `GIT_EDITOR` is not set. The order of preference is + `GIT_EDITOR` environment, `core.editor`, `EDITOR` and + `VISUAL` environment variables and then finally `vi`. + core.pager:: The command that git will use to paginate output. Can be overridden with the `GIT_PAGER` environment variable. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index f96142f96a..8e0e7e2d04 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -244,10 +244,12 @@ on the Subject: line and the rest of the commit in the body. include::i18n.txt[] -ENVIRONMENT VARIABLES ---------------------- -The command specified by either the VISUAL or EDITOR environment -variables is used to edit the commit log message. +ENVIRONMENT AND CONFIGURATION VARIABLES +--------------------------------------- +The editor used to edit the commit log message will be chosen from the +GIT_EDITOR environment variable, the core.editor configuration variable, the +VISUAL environment variable, or the EDITOR environment variable (in that +order). HOOKS ----- diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 293686c31f..d243ed1e3a 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -44,8 +44,8 @@ The --cc option must be repeated for each user you want on the cc list. value; if that is unspecified, default to --chain-reply-to. --compose:: - Use $EDITOR to edit an introductory message for the - patch series. + Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an + introductory message for the patch series. --from:: Specify the sender of the emails. This will default to diff --git a/git-am.sh b/git-am.sh index e5e6f2c91c..bfd65dcf95 100755 --- a/git-am.sh +++ b/git-am.sh @@ -364,7 +364,7 @@ do [yY]*) action=yes ;; [aA]*) action=yes interactive= ;; [nN]*) action=skip ;; - [eE]*) "${VISUAL:-${EDITOR:-vi}}" "$dotest/final-commit" + [eE]*) git_editor "$dotest/final-commit" action=again ;; [vV]*) action=again LESS=-S ${PAGER:-less} "$dotest/patch" ;; diff --git a/git-commit.sh b/git-commit.sh index 3f3de1729e..92749df1e7 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -544,18 +544,9 @@ fi case "$no_edit" in '') - case "${VISUAL:-$EDITOR},$TERM" in - ,dumb) - echo >&2 "Terminal is dumb but no VISUAL nor EDITOR defined." - echo >&2 "Please supply the commit log message using either" - echo >&2 "-m or -F option. A boilerplate log message has" - echo >&2 "been prepared in $GIT_DIR/COMMIT_EDITMSG" - exit 1 - ;; - esac git-var GIT_AUTHOR_IDENT > /dev/null || die git-var GIT_COMMITTER_IDENT > /dev/null || die - ${VISUAL:-${EDITOR:-vi}} "$GIT_DIR/COMMIT_EDITMSG" + git_editor "$GIT_DIR/COMMIT_EDITMSG" ;; esac diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index f3950767ea..a2d4d09f5d 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -414,7 +414,7 @@ EOF die_abort "Nothing to do" cp "$TODO" "$TODO".backup - ${VISUAL:-${EDITOR:-vi}} "$TODO" || + git_editor "$TODO" || die "Could not execute editor" test -z "$(grep -ve '^$' -e '^#' < $TODO)" && diff --git a/git-send-email.perl b/git-send-email.perl index 7552caca4b..a09b1c9650 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -49,8 +49,8 @@ Options: --bcc Specify a list of email addresses that should be Bcc: on all the emails. - --compose Use \$EDITOR to edit an introductory message for the - patch series. + --compose Use \$GIT_EDITOR, core.editor, \$EDITOR, or \$VISUAL to edit + an introductory message for the patch series. --subject Specify the initial "Subject:" line. Only necessary if --compose is also set. If --compose @@ -341,8 +341,7 @@ GIT: for the patch you are writing. EOT close(C); - my $editor = $ENV{EDITOR}; - $editor = 'vi' unless defined $editor; + my $editor = $ENV{GIT_EDITOR} || $repo->config("core.editor") || $ENV{VISUAL} || $ENV{EDITOR} || "vi"; system($editor, $compose_filename); open(C2,">",$compose_filename . ".final") diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 4ed07e9ddc..c51985e4c3 100755 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -28,6 +28,21 @@ set_reflog_action() { fi } +git_editor() { + GIT_EDITOR=${GIT_EDITOR:-$(git config core.editor || echo ${VISUAL:-${EDITOR}})} + case "$GIT_EDITOR,$TERM" in + ,dumb) + echo >&2 "No editor specified in GIT_EDITOR, core.editor, VISUAL," + echo >&2 "or EDITOR. Tried to fall back to vi but terminal is dumb." + echo >&2 "Please set one of these variables to an appropriate" + echo >&2 "editor or run $0 with options that will not cause an" + echo >&2 "editor to be invoked (e.g., -m or -F for git-commit)." + exit 1 + ;; + esac + "${GIT_EDITOR:-vi}" "$1" +} + is_bare_repository () { git rev-parse --is-bare-repository } diff --git a/git-tag.sh b/git-tag.sh index 1c25d88c72..5ee3f50a3c 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -177,7 +177,7 @@ if [ "$annotate" ]; then ( echo "#" echo "# Write a tag message" echo "#" ) > "$GIT_DIR"/TAG_EDITMSG - ${VISUAL:-${EDITOR:-vi}} "$GIT_DIR"/TAG_EDITMSG || exit + git_editor "$GIT_DIR"/TAG_EDITMSG || exit else printf '%s\n' "$message" >"$GIT_DIR"/TAG_EDITMSG fi diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh new file mode 100755 index 0000000000..28643b0da4 --- /dev/null +++ b/t/t7005-editor.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +test_description='GIT_EDITOR, core.editor, and stuff' + +. ./test-lib.sh + +for i in GIT_EDITOR core_editor EDITOR VISUAL vi +do + cat >e-$i.sh <<-EOF + echo "Edited by $i" >"\$1" + EOF + chmod +x e-$i.sh +done +unset vi +mv e-vi.sh vi +PATH=".:$PATH" +unset EDITOR VISUAL GIT_EDITOR + +test_expect_success setup ' + + msg="Hand edited" && + echo "$msg" >expect && + git add vi && + test_tick && + git commit -m "$msg" && + git show -s --pretty=oneline | + sed -e "s/^[0-9a-f]* //" >actual && + diff actual expect + +' + +TERM=dumb +export TERM +test_expect_success 'dumb should error out when falling back on vi' ' + + if git commit --amend + then + echo "Oops?" + exit 1 + else + : happy + fi +' + +TERM=vt100 +export TERM +for i in vi EDITOR VISUAL core_editor GIT_EDITOR +do + echo "Edited by $i" >expect + unset EDITOR VISUAL GIT_EDITOR + git config --unset-all core.editor + case "$i" in + core_editor) + git config core.editor ./e-core_editor.sh + ;; + [A-Z]*) + eval "$i=./e-$i.sh" + export $i + ;; + esac + test_expect_success "Using $i" ' + git commit --amend && + git show -s --pretty=oneline | + sed -e "s/^[0-9a-f]* //" >actual && + diff actual expect + ' +done + +unset EDITOR VISUAL GIT_EDITOR +git config --unset-all core.editor +for i in vi EDITOR VISUAL core_editor GIT_EDITOR +do + echo "Edited by $i" >expect + case "$i" in + core_editor) + git config core.editor ./e-core_editor.sh + ;; + [A-Z]*) + eval "$i=./e-$i.sh" + export $i + ;; + esac + test_expect_success "Using $i (override)" ' + git commit --amend && + git show -s --pretty=oneline | + sed -e "s/^[0-9a-f]* //" >actual && + diff actual expect + ' +done + +test_done -- cgit v1.3 From d1cc130a5eb50d5bfe1e8b76cab3d8970fd70ad1 Mon Sep 17 00:00:00 2001 From: Steven Grimm Date: Sun, 22 Jul 2007 21:17:42 -0700 Subject: Teach git-commit about commit message templates. These are useful in organizations that enforce particular formats for commit messages, e.g., to specify bug IDs or test plans. Use of the template is not enforced; it is simply used as the initial content when the editor is invoked. Signed-off-by: Steven Grimm Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 8 ++++ git-commit.sh | 54 ++++++++++++++++++++++--- t/t7500-commit.sh | 96 ++++++++++++++++++++++++++++++++++++++++++++ t/t7500/add-comments | 4 ++ t/t7500/add-content | 3 ++ t/t7500/add-signed-off | 3 ++ 6 files changed, 163 insertions(+), 5 deletions(-) create mode 100755 t/t7500-commit.sh create mode 100755 t/t7500/add-comments create mode 100755 t/t7500/add-content create mode 100755 t/t7500/add-signed-off (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 8e0e7e2d04..3f36c6782f 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -74,6 +74,14 @@ OPTIONS -m |--message=:: Use the given as the commit message. +-t |--template=:: + Use the contents of the given file as the initial version + of the commit message. The editor is invoked and you can + make subsequent changes. If a message is specified using + the `-m` or `-F` options, this option has no effect. The + template file may also be specified using the `commit.template` + configuration variable. + -s|--signoff:: Add Signed-off-by line at the end of the commit message. diff --git a/git-commit.sh b/git-commit.sh index 92749df1e7..4290ae2dd2 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -3,7 +3,7 @@ # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2006 Junio C Hamano -USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m | -F | (-C|-c) | --amend] [-u] [-e] [--author ] [[-i | -o] ...]' +USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m | -F | (-C|-c) | --amend] [-u] [-e] [--author ] [--template ] [[-i | -o] ...]' SUBDIRECTORY_OK=Yes . git-sh-setup require_work_tree @@ -87,6 +87,7 @@ signoff= force_author= only_include_assumed= untracked_files= +templatefile="`git config commit.template`" while case "$#" in 0) break;; esac do case "$1" in @@ -248,6 +249,13 @@ $1" signoff=t shift ;; + -t|--t|--te|--tem|--temp|--templ|--templa|--templat|--template) + case "$#" in 1) usage ;; esac + shift + templatefile="$1" + no_edit= + shift + ;; -q|--q|--qu|--qui|--quie|--quiet) quiet=t shift @@ -321,6 +329,14 @@ t,,[1-9]*) die "No paths with -i does not make sense." ;; esac +if test ! -z "$templatefile" -a -z "$log_given" +then + if test ! -f "$templatefile" + then + die "Commit template file does not exist." + fi +fi + ################################################################ # Prepare index to have a tree to be committed @@ -454,6 +470,9 @@ then elif test -f "$GIT_DIR/SQUASH_MSG" then cat "$GIT_DIR/SQUASH_MSG" +elif test "$templatefile" != "" +then + cat "$templatefile" fi | git stripspace >"$GIT_DIR"/COMMIT_EDITMSG case "$signoff" in @@ -572,10 +591,35 @@ else fi | git stripspace >"$GIT_DIR"/COMMIT_MSG -if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG | - git stripspace | - wc -l` && - test 0 -lt $cnt +# Test whether the commit message has any content we didn't supply. +have_commitmsg= +grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG | + git stripspace > "$GIT_DIR"/COMMIT_BAREMSG + +# Is the commit message totally empty? +if test -s "$GIT_DIR"/COMMIT_BAREMSG +then + if test "$templatefile" != "" + then + # Test whether this is just the unaltered template. + if cnt=`sed -e '/^#/d' < "$templatefile" | + git stripspace | + diff "$GIT_DIR"/COMMIT_BAREMSG - | + wc -l` && + test 0 -lt $cnt + then + have_commitmsg=t + fi + else + # No template, so the content in the commit message must + # have come from the user. + have_commitmsg=t + fi +fi + +rm -f "$GIT_DIR"/COMMIT_BAREMSG + +if test "$have_commitmsg" = "t" then if test -z "$TMP_INDEX" then diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh new file mode 100755 index 0000000000..f11ada8617 --- /dev/null +++ b/t/t7500-commit.sh @@ -0,0 +1,96 @@ +#!/bin/sh +# +# Copyright (c) 2007 Steven Grimm +# + +test_description='git-commit + +Tests for selected commit options.' + +. ./test-lib.sh + +commit_msg_is () { + test "`git log --pretty=format:%s%b -1`" = "$1" +} + +# A sanity check to see if commit is working at all. +test_expect_success 'a basic commit in an empty tree should succeed' ' + echo content > foo && + git add foo && + git commit -m "initial commit" +' + +test_expect_success 'nonexistent template file should return error' ' + echo changes >> foo && + git add foo && + ! git commit --template "$PWD"/notexist +' + +test_expect_success 'nonexistent template file in config should return error' ' + git config commit.template "$PWD"/notexist && + ! git commit && + git config --unset commit.template +' + +# From now on we'll use a template file that exists. +TEMPLATE="$PWD"/template + +test_expect_success 'unedited template should not commit' ' + echo "template line" > "$TEMPLATE" && + ! git commit --template "$TEMPLATE" +' + +test_expect_success 'unedited template with comments should not commit' ' + echo "# comment in template" >> "$TEMPLATE" && + ! git commit --template "$TEMPLATE" +' + +test_expect_success 'a Signed-off-by line by itself should not commit' ' + ! GIT_EDITOR=../t7500/add-signed-off git commit --template "$TEMPLATE" +' + +test_expect_success 'adding comments to a template should not commit' ' + ! GIT_EDITOR=../t7500/add-comments git commit --template "$TEMPLATE" +' + +test_expect_success 'adding real content to a template should commit' ' + GIT_EDITOR=../t7500/add-content git commit --template "$TEMPLATE" && + commit_msg_is "template linecommit message" +' + +test_expect_success '-t option should be short for --template' ' + echo "short template" > "$TEMPLATE" && + echo "new content" >> foo && + git add foo && + GIT_EDITOR=../t7500/add-content git commit -t "$TEMPLATE" && + commit_msg_is "short templatecommit message" +' + +test_expect_success 'config-specified template should commit' ' + echo "new template" > "$TEMPLATE" && + git config commit.template "$TEMPLATE" && + echo "more content" >> foo && + git add foo && + GIT_EDITOR=../t7500/add-content git commit && + git config --unset commit.template && + commit_msg_is "new templatecommit message" +' + +test_expect_success 'explicit commit message should override template' ' + echo "still more content" >> foo && + git add foo && + GIT_EDITOR=../t7500/add-content git commit --template "$TEMPLATE" \ + -m "command line msg" && + commit_msg_is "command line msg" +' + +test_expect_success 'commit message from file should override template' ' + echo "content galore" >> foo && + git add foo && + echo "standard input msg" | + GIT_EDITOR=../t7500/add-content git commit \ + --template "$TEMPLATE" --file - && + commit_msg_is "standard input msg" +' + +test_done diff --git a/t/t7500/add-comments b/t/t7500/add-comments new file mode 100755 index 0000000000..a72e65c891 --- /dev/null +++ b/t/t7500/add-comments @@ -0,0 +1,4 @@ +#!/bin/sh +echo "# this is a new comment" >> "$1" +echo "# and so is this" >> "$1" +exit 0 diff --git a/t/t7500/add-content b/t/t7500/add-content new file mode 100755 index 0000000000..2fa3d86a10 --- /dev/null +++ b/t/t7500/add-content @@ -0,0 +1,3 @@ +#!/bin/sh +echo "commit message" >> "$1" +exit 0 diff --git a/t/t7500/add-signed-off b/t/t7500/add-signed-off new file mode 100755 index 0000000000..e1d856af6d --- /dev/null +++ b/t/t7500/add-signed-off @@ -0,0 +1,3 @@ +#!/bin/sh +echo "Signed-off-by: foo " >> "$1" +exit 0 -- cgit v1.3 From 383e45cec40a0b881e59e44e011c410218ef476a Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Thu, 26 Jul 2007 16:34:59 -0400 Subject: Document commit.template configuration variable. Add it to the list in config.txt and explicitly say that the --template option to git-commit overrides the configuration variable. Signed-off-by: Junio C Hamano --- Documentation/config.txt | 3 +++ Documentation/git-commit.txt | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/config.txt b/Documentation/config.txt index dd98d95d97..3135cb7a66 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -393,6 +393,9 @@ color.status.:: or `untracked` (files which are not tracked by git). The values of these variables may be specified as in color.branch.. +commit.template:: + Specify a file to use as the template for new commit messages. + diff.renameLimit:: The number of files to consider when performing the copy/rename detection; equivalent to the git diff option '-l'. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 3f36c6782f..627994eb97 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -78,9 +78,8 @@ OPTIONS Use the contents of the given file as the initial version of the commit message. The editor is invoked and you can make subsequent changes. If a message is specified using - the `-m` or `-F` options, this option has no effect. The - template file may also be specified using the `commit.template` - configuration variable. + the `-m` or `-F` options, this option has no effect. This + overrides the `commit.template` configuration variable. -s|--signoff:: Add Signed-off-by line at the end of the commit message. -- cgit v1.3 From a76c2acb28146f5630592f2ba738c0ebf0f3c1c4 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Mon, 6 Aug 2007 00:34:02 -0400 Subject: documentation: use the word "index" in the git-commit man page As with git-add, I think previous updates to the git-commit man page did indeed help make it more user-friendly. But I think the banishment of the word "index" from the description goes too far; reinstate its use, to simplify some of the language slightly and smooth the transition to other documentation. Signed-off-by: J. Bruce Fields Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 627994eb97..63599d3828 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -15,26 +15,26 @@ SYNOPSIS DESCRIPTION ----------- -Use 'git commit' when you want to record your changes into the repository -along with a log message describing what the commit is about. All changes -to be committed must be explicitly identified using one of the following -methods: +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. +The content to be added can be specified in several ways: 1. by using gitlink:git-add[1] to incrementally "add" changes to the - next commit before using the 'commit' command (Note: even modified + index before using the 'commit' command (Note: even modified files must be "added"); -2. by using gitlink:git-rm[1] to identify content removal for the next - commit, again before using the 'commit' command; +2. by using gitlink:git-rm[1] to remove files from the working tree + and the index, again before using the 'commit' command; -3. by directly listing files containing changes to be committed as arguments - to the 'commit' command, in which cases only those files alone will be - considered for the commit; +3. by listing files as arguments to the 'commit' command, in which + case the commit will ignore changes staged in the index, and instead + record the current content of the listed files; -4. by using the -a switch with the 'commit' command to automatically "add" - changes from all known files i.e. files that have already been committed - before, and to automatically "rm" files that have been - removed from the working tree, and perform the actual commit. +4. by using the -a switch with the 'commit' command to automatically + "add" changes from all known files (i.e. all files that are already + listed in the index) and to automatically "rm" files in the index + that have been removed from the working tree, and then perform the + actual commit; 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 -- cgit v1.3 From f9935bf9312dd6681e5051fbdce03204b6458c73 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 6 Aug 2007 14:56:32 +0200 Subject: Documentation/git-commit.txt: correct bad list formatting. Signed-off-by: David Kastrup Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 63599d3828..e54fb12103 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -19,6 +19,7 @@ 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. The content to be added can be specified in several ways: + 1. by using gitlink:git-add[1] to incrementally "add" changes to the index before using the 'commit' command (Note: even modified files must be "added"); -- cgit v1.3 From 97e9a2216f33d1b6cff312f9535b6cf0d0ba4f16 Mon Sep 17 00:00:00 2001 From: Jing Xue Date: Sun, 11 Nov 2007 23:43:00 -0500 Subject: replace reference to git-rm with git-reset in git-commit doc The message in git-commit suggesting to use 'git rm --cached' to unstage is just plain wrong. It really should mention 'git reset'. Suggested by Jan Hudec. Signed-off-by: Jing Xue Signed-off-by: Junio C Hamano --- Documentation/git-add.txt | 1 + Documentation/git-commit.txt | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 2fe7355555..fd82fc19b5 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -224,6 +224,7 @@ See Also -------- gitlink:git-status[1] gitlink:git-rm[1] +gitlink:git-reset[1] gitlink:git-mv[1] gitlink:git-commit[1] gitlink:git-update-index[1] diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index e54fb12103..d4bfd49ce1 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -154,10 +154,13 @@ 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 gitlink:git-add[1]. Removal -of a file is staged with gitlink:git-rm[1]. After building the -state to be committed incrementally with these commands, `git -commit` (without any pathname parameter) is used to record what +called the "index" with gitlink:git-add[1]. 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 -- `, +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 has been staged so far. This is the most basic form of the command. An example: -- cgit v1.3 From 36863af16e91aebc87696209f4f4780cf4c4059f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 3 Dec 2007 00:03:10 -0800 Subject: git-commit --allow-empty It does not usually make sense to record a commit that has the exact same tree as its sole parent commit and that is why git-commit prevents you from making such a mistake, but when data from foreign scm is involved, it is a different story. We are equipped to represent such an (perhaps insane, perhaps by mistake, or perhaps done on purpose) empty change, and it is better to represent it bypassing the safety valve for native use. This is primarily for use by foreign scm interface scripts. Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 8 +++++++- git-commit.sh | 13 ++++++++++--- t/t7501-commit.sh | 7 +++++++ 3 files changed, 24 insertions(+), 4 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index d4bfd49ce1..a7ef71ff99 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -10,7 +10,7 @@ SYNOPSIS [verse] 'git-commit' [-a | --interactive] [-s] [-v] [-u] [(-c | -C) | -F | -m | --amend] - [--no-verify] [-e] [--author ] + [--allow-empty] [--no-verify] [-e] [--author ] [--] [[-i | -o ]...] DESCRIPTION @@ -89,6 +89,12 @@ OPTIONS This option bypasses the pre-commit hook. See also link:hooks.html[hooks]. +--allow-empty:: + Usually recording a commit that has the exact same tree as its + sole parent commit and the command prevents you from making such + a mistake. This option bypasses the safety, and is primarily + for use by foreign scm interface scripts. + -e|--edit:: The message taken from file with `-F`, command line with `-m`, and from file with `-C` are usually used as the diff --git a/git-commit.sh b/git-commit.sh index cef76a7775..2c4a4062a5 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -74,6 +74,7 @@ trap ' all= also= +allow_empty=f interactive= only= logfile= @@ -114,6 +115,10 @@ do -a|--a|--al|--all) all=t ;; + --allo|--allow|--allow-|--allow-e|--allow-em|--allow-emp|\ + --allow-empt|--allow-empty) + allow_empty=t + ;; --au=*|--aut=*|--auth=*|--autho=*|--author=*) force_author="${1#*=}" ;; @@ -515,9 +520,11 @@ else # we need to check if there is anything to commit run_status >/dev/null fi -case "$?,$PARENTS" in -0,* | *,-p' '?*-p' '?*) - # a merge commit can record the same tree as its parent. +case "$allow_empty,$?,$PARENTS" in +t,* | ?,0,* | ?,*,-p' '?*-p' '?*) + # an explicit --allow-empty, or a merge commit can record the + # same tree as its parent. Otherwise having commitable paths + # is required. ;; *) rm -f "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG" diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 2e7bcb016a..0316ecf5a1 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -256,6 +256,13 @@ test_expect_success 'same tree (single parent)' ' ' +test_expect_success 'same tree (single parent) --allow-empty' ' + + git commit --allow-empty -m "forced empty" && + git cat-file commit HEAD | grep forced + +' + test_expect_success 'same tree (merge and amend merge)' ' git checkout -b side HEAD^ && -- cgit v1.3 From 17ef10d0558d9622884e5b5930cee2569e40a4e4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 3 Dec 2007 13:35:26 -0800 Subject: git-commit documentation: fix unfinished sentence. Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index a7ef71ff99..4bb2791550 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -91,9 +91,9 @@ OPTIONS --allow-empty:: Usually recording a commit that has the exact same tree as its - sole parent commit and the command prevents you from making such - a mistake. This option bypasses the safety, and is primarily - for use by foreign scm interface scripts. + sole parent commit is a mistake, and the command prevents you + from making such a commit. This option bypasses the safety, and + is primarily for use by foreign scm interface scripts. -e|--edit:: The message taken from file with `-F`, command line with -- cgit v1.3 From aa6da6cddb65c3889751d0b06a7e3d339e303b1b Mon Sep 17 00:00:00 2001 From: Wincent Colaiuta Date: Sat, 8 Dec 2007 12:38:08 +0100 Subject: Documentation: fix --no-verify documentation for "git commit" The documentation for the --no-verify switch should mention the commit-msg hook, not just the pre-commit hook. Signed-off-by: Wincent Colaiuta Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 4bb2791550..4261384158 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -86,7 +86,7 @@ OPTIONS Add Signed-off-by line at the end of the commit message. --no-verify:: - This option bypasses the pre-commit hook. + This option bypasses the pre-commit and commit-msg hooks. See also link:hooks.html[hooks]. --allow-empty:: -- cgit v1.3 From 5f0657374344a5d8cf5ce5a9920a08c0be422194 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Sat, 22 Dec 2007 19:46:24 +0100 Subject: Allow selection of different cleanup modes for commit messages Although we traditionally stripped away excess blank lines, trailing whitespaces and lines that begin with "#" from the commit log message, sometimes the message just has to be the way user wants it. For instance, a commit message template can contain lines that begin with "#", the message must be kept as close to its original source as possible if you are converting from a foreign SCM, or maybe the message has a shell script including its comments for future reference. The cleanup modes are default, verbatim, whitespace and strip. The default mode depends on if the message is being edited and will either strip whitespace and comments (if editor active) or just strip the whitespace (for where the message is given explicitely). Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 12 +++++++- builtin-commit.c | 42 +++++++++++++++++++++++++--- t/t7502-commit.sh | 65 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 5 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 4261384158..96383b6543 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -11,7 +11,7 @@ SYNOPSIS 'git-commit' [-a | --interactive] [-s] [-v] [-u] [(-c | -C) | -F | -m | --amend] [--allow-empty] [--no-verify] [-e] [--author ] - [--] [[-i | -o ]...] + [--cleanup=] [--] [[-i | -o ]...] DESCRIPTION ----------- @@ -95,6 +95,16 @@ OPTIONS from making such a commit. This option bypasses the safety, and is primarily for use by foreign scm interface scripts. +--cleanup=:: + This option sets how the commit message is cleaned up. + The '' can be one of 'verbatim', 'whitespace', 'strip', + and 'default'. The 'default' mode will strip leading and + trailing empty lines and #commentary from the commit message + only if the message is to be edited. Otherwise only whitespace + removed. The 'verbatim' mode does not change message at all, + 'whitespace' removes just leading/trailing whitespace lines + and 'strip' removes both whitespace and commentary. + -e|--edit:: The message taken from file with `-F`, command line with `-m`, and from file with `-C` are usually used as the diff --git a/builtin-commit.c b/builtin-commit.c index 1d544cbe35..73f1e3576a 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -47,6 +47,19 @@ static char *logfile, *force_author, *template_file; static char *edit_message, *use_message; static int all, edit_flag, also, interactive, only, amend, signoff; static int quiet, verbose, untracked_files, no_verify, allow_empty; +/* + * The default commit message cleanup mode will remove the lines + * beginning with # (shell comments) and leading and trailing + * whitespaces (empty lines or containing only whitespaces) + * if editor is used, and only the whitespaces if the message + * is specified explicitly. + */ +static enum { + CLEANUP_SPACE, + CLEANUP_NONE, + CLEANUP_ALL, +} cleanup_mode; +static char *cleanup_arg; static int use_editor = 1, initial_commit, in_merge; const char *only_include_assumed; @@ -88,6 +101,7 @@ static struct option builtin_commit_options[] = { OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"), OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"), + OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), OPT_END() }; @@ -346,7 +360,8 @@ static int prepare_log_message(const char *index_file, const char *prefix) if (fp == NULL) die("could not open %s", git_path(commit_editmsg)); - stripspace(&sb, 0); + if (cleanup_mode != CLEANUP_NONE) + stripspace(&sb, 0); if (signoff) { struct strbuf sob; @@ -411,7 +426,12 @@ static int prepare_log_message(const char *index_file, const char *prefix) fprintf(fp, "\n" "# Please enter the commit message for your changes.\n" - "# (Comment lines starting with '#' will not be included)\n"); + "# (Comment lines starting with '#' will "); + if (cleanup_mode == CLEANUP_ALL) + fprintf(fp, "not be included)\n"); + else /* CLEANUP_SPACE, that is. */ + fprintf(fp, "be kept.\n" + "# You can remove them yourself if you want to)\n"); if (only_include_assumed) fprintf(fp, "# %s\n", only_include_assumed); @@ -435,10 +455,13 @@ static int message_is_empty(struct strbuf *sb, int start) const char *nl; int eol, i; + if (cleanup_mode == CLEANUP_NONE && sb->len) + return 0; + /* See if the template is just a prefix of the message. */ strbuf_init(&tmpl, 0); if (template_file && strbuf_read_file(&tmpl, template_file, 0) > 0) { - stripspace(&tmpl, 1); + stripspace(&tmpl, cleanup_mode == CLEANUP_ALL); if (start + tmpl.len <= sb->len && memcmp(tmpl.buf, sb->buf + start, tmpl.len) == 0) start += tmpl.len; @@ -591,6 +614,16 @@ static int parse_and_validate_options(int argc, const char *argv[], only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths..."; also = 0; } + if (!cleanup_arg || !strcmp(cleanup_arg, "default")) + cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE; + else if (!strcmp(cleanup_arg, "verbatim")) + cleanup_mode = CLEANUP_NONE; + else if (!strcmp(cleanup_arg, "whitespace")) + cleanup_mode = CLEANUP_SPACE; + else if (!strcmp(cleanup_arg, "strip")) + cleanup_mode = CLEANUP_ALL; + else + die("Invalid cleanup mode %s", cleanup_arg); if (all && argc > 0) die("Paths with -a does not make sense."); @@ -817,7 +850,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix) if (p != NULL) strbuf_setlen(&sb, p - sb.buf + 1); - stripspace(&sb, 1); + if (cleanup_mode != CLEANUP_NONE) + stripspace(&sb, cleanup_mode == CLEANUP_ALL); if (sb.len < header_len || message_is_empty(&sb, header_len)) { rollback_index_files(); die("no commit message? aborting commit."); diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 21ac785e3d..aaf497e6a5 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -89,4 +89,69 @@ test_expect_success 'verbose' ' ' +test_expect_success 'cleanup commit messages (verbatim,-t)' ' + + echo >>negative && + { echo;echo "# text";echo; } >expect && + git commit --cleanup=verbatim -t expect -a && + git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual && + diff -u expect actual + +' + +test_expect_success 'cleanup commit messages (verbatim,-F)' ' + + echo >>negative && + git commit --cleanup=verbatim -F expect -a && + git cat-file -p HEAD |sed -e "1,/^\$/d">actual && + diff -u expect actual + +' + +test_expect_success 'cleanup commit messages (verbatim,-m)' ' + + echo >>negative && + git commit --cleanup=verbatim -m "$(cat expect)" -a && + git cat-file -p HEAD |sed -e "1,/^\$/d">actual && + diff -u expect actual + +' + +test_expect_success 'cleanup commit messages (whitespace,-F)' ' + + echo >>negative && + { echo;echo "# text";echo; } >text && + echo "# text" >expect && + git commit --cleanup=whitespace -F text -a && + git cat-file -p HEAD |sed -e "1,/^\$/d">actual && + diff -u expect actual + +' + +test_expect_success 'cleanup commit messages (strip,-F)' ' + + echo >>negative && + { echo;echo "# text";echo sample;echo; } >text && + echo sample >expect && + git commit --cleanup=strip -F text -a && + git cat-file -p HEAD |sed -e "1,/^\$/d">actual && + diff -u expect actual + +' + +echo "sample + +# Please enter the commit message for your changes. +# (Comment lines starting with '#' will not be included)" >expect + +test_expect_success 'cleanup commit messages (strip,-F,-e)' ' + + echo >>negative && + { echo;echo sample;echo; } >text && + git commit -e -F text -a && + head -n 4 .git/COMMIT_EDITMSG >actual && + diff -u expect actual + +' + test_done -- cgit v1.3 From 5162e69732d13dd079919a389a6ace8878aad716 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2007 00:20:38 -0600 Subject: Documentation: rename gitlink macro to linkgit Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P\w(\w|-)*?):(?P\S*?)(\[(?P.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P(http|https|ftp|file|mailto|callto|image|link)):(?P\S*?)(\[(?P.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee Signed-off-by: Junio C Hamano --- Documentation/asciidoc.conf | 8 +- Documentation/blame-options.txt | 2 +- Documentation/cmd-list.perl | 2 +- Documentation/config.txt | 126 ++++++++-------- Documentation/cvs-migration.txt | 10 +- Documentation/diff-options.txt | 4 +- Documentation/everyday.txt | 48 +++--- Documentation/fetch-options.txt | 2 +- Documentation/git-add.txt | 16 +- Documentation/git-am.txt | 16 +- Documentation/git-annotate.txt | 4 +- Documentation/git-apply.txt | 12 +- Documentation/git-archimport.txt | 2 +- Documentation/git-archive.txt | 2 +- Documentation/git-bisect.txt | 2 +- Documentation/git-blame.txt | 8 +- Documentation/git-branch.txt | 12 +- Documentation/git-bundle.txt | 10 +- Documentation/git-cat-file.txt | 4 +- Documentation/git-check-attr.txt | 4 +- Documentation/git-check-ref-format.txt | 6 +- Documentation/git-checkout-index.txt | 2 +- Documentation/git-checkout.txt | 4 +- Documentation/git-cherry-pick.txt | 4 +- Documentation/git-cherry.txt | 2 +- Documentation/git-citool.txt | 6 +- Documentation/git-clean.txt | 4 +- Documentation/git-clone.txt | 2 +- Documentation/git-commit-tree.txt | 6 +- Documentation/git-commit.txt | 30 ++-- Documentation/git-config.txt | 2 +- Documentation/git-count-objects.txt | 2 +- Documentation/git-cvsexportcommit.txt | 2 +- Documentation/git-cvsimport.txt | 4 +- Documentation/git-cvsserver.txt | 4 +- Documentation/git-daemon.txt | 2 +- Documentation/git-describe.txt | 2 +- Documentation/git-diff-files.txt | 2 +- Documentation/git-diff-index.txt | 2 +- Documentation/git-diff-tree.txt | 2 +- Documentation/git-diff.txt | 8 +- Documentation/git-fast-export.txt | 12 +- Documentation/git-fast-import.txt | 18 +-- Documentation/git-fetch-pack.txt | 4 +- Documentation/git-fetch.txt | 4 +- Documentation/git-filter-branch.txt | 16 +- Documentation/git-fmt-merge-msg.txt | 4 +- Documentation/git-format-patch.txt | 8 +- Documentation/git-fsck-objects.txt | 2 +- Documentation/git-fsck.txt | 2 +- Documentation/git-gc.txt | 14 +- Documentation/git-get-tar-commit-id.txt | 4 +- Documentation/git-grep.txt | 2 +- Documentation/git-gui.txt | 4 +- Documentation/git-hash-object.txt | 2 +- Documentation/git-help.txt | 6 +- Documentation/git-http-fetch.txt | 2 +- Documentation/git-http-push.txt | 2 +- Documentation/git-imap-send.txt | 2 +- Documentation/git-index-pack.txt | 10 +- Documentation/git-init-db.txt | 2 +- Documentation/git-init.txt | 2 +- Documentation/git-instaweb.txt | 2 +- Documentation/git-log.txt | 10 +- Documentation/git-lost-found.txt | 4 +- Documentation/git-ls-files.txt | 8 +- Documentation/git-ls-remote.txt | 4 +- Documentation/git-ls-tree.txt | 2 +- Documentation/git-mailinfo.txt | 4 +- Documentation/git-mailsplit.txt | 2 +- Documentation/git-merge-base.txt | 2 +- Documentation/git-merge-file.txt | 4 +- Documentation/git-merge-index.txt | 2 +- Documentation/git-merge-one-file.txt | 2 +- Documentation/git-merge-tree.txt | 2 +- Documentation/git-merge.txt | 8 +- Documentation/git-mergetool.txt | 4 +- Documentation/git-mktag.txt | 2 +- Documentation/git-mktree.txt | 2 +- Documentation/git-mv.txt | 2 +- Documentation/git-name-rev.txt | 4 +- Documentation/git-pack-objects.txt | 10 +- Documentation/git-pack-redundant.txt | 8 +- Documentation/git-pack-refs.txt | 2 +- Documentation/git-parse-remote.txt | 2 +- Documentation/git-patch-id.txt | 2 +- Documentation/git-peek-remote.txt | 2 +- Documentation/git-prune-packed.txt | 6 +- Documentation/git-prune.txt | 2 +- Documentation/git-pull.txt | 10 +- Documentation/git-push.txt | 4 +- Documentation/git-quiltimport.txt | 2 +- Documentation/git-read-tree.txt | 8 +- Documentation/git-rebase.txt | 10 +- Documentation/git-receive-pack.txt | 4 +- Documentation/git-reflog.txt | 8 +- Documentation/git-relink.txt | 2 +- Documentation/git-remote.txt | 12 +- Documentation/git-repack.txt | 14 +- Documentation/git-repo-config.txt | 2 +- Documentation/git-request-pull.txt | 2 +- Documentation/git-rerere.txt | 4 +- Documentation/git-reset.txt | 8 +- Documentation/git-rev-list.txt | 20 +-- Documentation/git-rev-parse.txt | 2 +- Documentation/git-revert.txt | 4 +- Documentation/git-rm.txt | 4 +- Documentation/git-send-email.txt | 2 +- Documentation/git-send-pack.txt | 6 +- Documentation/git-sh-setup.txt | 2 +- Documentation/git-shell.txt | 2 +- Documentation/git-shortlog.txt | 2 +- Documentation/git-show-branch.txt | 2 +- Documentation/git-show-index.txt | 2 +- Documentation/git-show-ref.txt | 6 +- Documentation/git-show.txt | 8 +- Documentation/git-stash.txt | 10 +- Documentation/git-status.txt | 6 +- Documentation/git-stripspace.txt | 2 +- Documentation/git-submodule.txt | 6 +- Documentation/git-svn.txt | 12 +- Documentation/git-symbolic-ref.txt | 2 +- Documentation/git-tag.txt | 2 +- Documentation/git-tar-tree.txt | 2 +- Documentation/git-unpack-file.txt | 2 +- Documentation/git-unpack-objects.txt | 2 +- Documentation/git-update-index.txt | 12 +- Documentation/git-update-ref.txt | 2 +- Documentation/git-update-server-info.txt | 2 +- Documentation/git-upload-archive.txt | 2 +- Documentation/git-upload-pack.txt | 2 +- Documentation/git-var.txt | 8 +- Documentation/git-verify-pack.txt | 2 +- Documentation/git-verify-tag.txt | 2 +- Documentation/git-whatchanged.txt | 2 +- Documentation/git-write-tree.txt | 2 +- Documentation/git.txt | 20 +-- Documentation/gitattributes.txt | 10 +- Documentation/gitcli.txt | 2 +- Documentation/gitignore.txt | 6 +- Documentation/gitk.txt | 6 +- Documentation/gitmodules.txt | 6 +- Documentation/glossary.txt | 18 +-- Documentation/repository-layout.txt | 10 +- Documentation/tutorial-2.txt | 2 +- Documentation/tutorial.txt | 24 +-- Documentation/urls.txt | 2 +- Documentation/user-manual.conf | 2 +- Documentation/user-manual.txt | 246 +++++++++++++++---------------- 149 files changed, 603 insertions(+), 603 deletions(-) (limited to 'Documentation/git-commit.txt') diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 99d8874aa0..10c1a151a4 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -1,6 +1,6 @@ -## gitlink: macro +## linkgit: macro # -# Usage: gitlink:command[manpage-section] +# Usage: linkgit:command[manpage-section] # # Note, {0} is the manpage section, while {target} is the command. # @@ -15,7 +15,7 @@ endsb=] tilde=~ ifdef::backend-docbook[] -[gitlink-inlinemacro] +[linkgit-inlinemacro] {0%{target}} {0#} {0#{target}{0}} @@ -61,6 +61,6 @@ endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] -[gitlink-inlinemacro] +[linkgit-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 17379f0576..ea1007bfb0 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -39,7 +39,7 @@ of lines before or after the line given by . Show raw timestamp (Default: off). -S :: - Use revs from revs-file instead of calling gitlink:git-rev-list[1]. + Use revs from revs-file instead of calling linkgit:git-rev-list[1]. -p, --porcelain:: Show in a format designed for machine consumption. diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index c2d55cdb5e..04f99778d8 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -27,7 +27,7 @@ sub format_one { die "No description found in $name.txt"; } if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { - print $out "gitlink:$name\[1\]::\n\t"; + print $out "linkgit:$name\[1\]::\n\t"; if ($attr =~ / deprecated /) { print $out "(deprecated) "; } diff --git a/Documentation/config.txt b/Documentation/config.txt index e1eaee9971..d44bc7ac4c 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -115,7 +115,7 @@ porcelain configuration variables in the respective porcelain documentation. core.fileMode:: If false, the executable bit differences between the index and the working copy are ignored; useful on broken filesystems like FAT. - See gitlink:git-update-index[1]. True by default. + See linkgit:git-update-index[1]. True by default. core.quotepath:: The commands that output paths (e.g. `ls-files`, @@ -141,8 +141,8 @@ core.autocrlf:: core.symlinks:: If false, symbolic links are checked out as small plain files that - contain the link text. gitlink:git-update-index[1] and - gitlink:git-add[1] will not change the recorded type to regular + contain the link text. linkgit:git-update-index[1] and + linkgit:git-add[1] will not change the recorded type to regular file. Useful on filesystems like FAT that do not support symbolic links. True by default. @@ -163,7 +163,7 @@ core.ignoreStat:: The working copy files are assumed to stay unchanged until you mark them otherwise manually - Git will not detect the file changes by lstat() calls. This is useful on systems where those are very - slow, such as Microsoft Windows. See gitlink:git-update-index[1]. + slow, such as Microsoft Windows. See linkgit:git-update-index[1]. False by default. core.preferSymlinkRefs:: @@ -176,10 +176,10 @@ core.bare:: If true this repository is assumed to be 'bare' and has no working directory associated with it. If this is the case a number of commands that require a working directory will be - disabled, such as gitlink:git-add[1] or gitlink:git-merge[1]. + disabled, such as linkgit:git-add[1] or linkgit:git-merge[1]. + -This setting is automatically guessed by gitlink:git-clone[1] or -gitlink:git-init[1] when the repository was created. By default a +This setting is automatically guessed by linkgit:git-clone[1] or +linkgit:git-init[1] when the repository was created. By default a repository that ends in "/.git" is assumed to be not bare (bare = false), while all other repositories are assumed to be bare (bare = true). @@ -216,7 +216,7 @@ core.sharedRepository:: group-writable). When 'all' (or 'world' or 'everybody'), the repository will be readable by all users, additionally to being group-shareable. When 'umask' (or 'false'), git will use permissions - reported by umask(2). See gitlink:git-init[1]. False by default. + reported by umask(2). See linkgit:git-init[1]. False by default. core.warnAmbiguousRefs:: If true, git will warn you if the ref name you passed it is ambiguous @@ -281,7 +281,7 @@ core.excludesfile:: In addition to '.gitignore' (per-directory) and '.git/info/exclude', git looks into this file for patterns of files which are not meant to be tracked. See - gitlink:gitignore[5]. + linkgit:gitignore[5]. core.editor:: Commands such as `commit` and `tag` that lets you edit @@ -310,7 +310,7 @@ core.whitespace:: space characters as an error (not enabled by default). alias.*:: - Command aliases for the gitlink:git[1] command wrapper - e.g. + Command aliases for the linkgit:git[1] command wrapper - e.g. after defining "alias.last = cat-file commit HEAD", the invocation "git last" is equivalent to "git cat-file commit HEAD". To avoid confusion and troubles with script usage, aliases that @@ -326,11 +326,11 @@ it will be treated as a shell command. For example, defining apply.whitespace:: Tells `git-apply` how to handle whitespaces, in the same way - as the '--whitespace' option. See gitlink:git-apply[1]. + as the '--whitespace' option. See linkgit:git-apply[1]. branch.autosetupmerge:: Tells `git-branch` and `git-checkout` to setup new branches - so that gitlink:git-pull[1] will appropriately merge from that + so that linkgit:git-pull[1] will appropriately merge from that remote branch. Note that even if this option is not set, this behavior can be chosen per-branch using the `--track` and `--no-track` options. This option defaults to false. @@ -356,7 +356,7 @@ branch..merge:: branch..mergeoptions:: Sets default options for merging into branch . The syntax and - supported options are equal to that of gitlink:git-merge[1], but + supported options are equal to that of linkgit:git-merge[1], but option values containing whitespace characters are currently not supported. @@ -364,7 +364,7 @@ branch..rebase:: When true, rebase the branch on top of the fetched branch, instead of merging the default branch from the default remote. *NOTE*: this is a possibly dangerous operation; do *not* use - it unless you understand the implications (see gitlink:git-rebase[1] + it unless you understand the implications (see linkgit:git-rebase[1] for details). clean.requireForce:: @@ -373,7 +373,7 @@ clean.requireForce:: color.branch:: A boolean to enable/disable color in the output of - gitlink:git-branch[1]. May be set to `always`, + linkgit:git-branch[1]. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which case colors are used only when the output is to a terminal. Defaults to false. @@ -423,7 +423,7 @@ color.pager:: color.status:: A boolean to enable/disable color in the output of - gitlink:git-status[1]. May be set to `always`, + linkgit:git-status[1]. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which case colors are used only when the output is to a terminal. Defaults to false. @@ -453,7 +453,7 @@ diff.external:: performed using the internal diff machinery, but using the given command. Note: if you want to use an external diff program only on a subset of your files, you might want to - use gitlink:gitattributes[5] instead. + use linkgit:gitattributes[5] instead. diff.renameLimit:: The number of files to consider when performing the copy/rename @@ -478,11 +478,11 @@ format.numbered:: A boolean which can enable sequence numbers in patch subjects. Setting this option to "auto" will enable it only if there is more than one patch. See --numbered option in - gitlink:git-format-patch[1]. + linkgit:git-format-patch[1]. format.headers:: Additional email headers to include in a patch to be submitted - by mail. See gitlink:git-format-patch[1]. + by mail. See linkgit:git-format-patch[1]. format.suffix:: The default for format-patch is to output files with the suffix @@ -530,27 +530,27 @@ gc.reflogexpireunreachable:: gc.rerereresolved:: Records of conflicted merge you resolved earlier are kept for this many days when `git rerere gc` is run. - The default is 60 days. See gitlink:git-rerere[1]. + 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. - The default is 15 days. See gitlink:git-rerere[1]. + The default is 15 days. See linkgit:git-rerere[1]. rerere.enabled:: Activate recording of resolved conflicts, so that identical conflict hunks can be resolved automatically, should they - be encountered again. gitlink:git-rerere[1] command is by + be encountered again. linkgit:git-rerere[1] command is by default enabled, but can be disabled by setting this option to false. gitcvs.enabled:: Whether the CVS server interface is enabled for this repository. - See gitlink:git-cvsserver[1]. + See linkgit:git-cvsserver[1]. gitcvs.logfile:: Path to a log file where the CVS server interface well... logs - various stuff. See gitlink:git-cvsserver[1]. + various stuff. See linkgit:git-cvsserver[1]. gitcvs.allbinary:: If true, all files are sent to the client in mode '-kb'. This @@ -563,7 +563,7 @@ gitcvs.dbname:: derived from the git repository. The exact meaning depends on the used database driver, for SQLite (which is the default driver) this is a filename. Supports variable substitution (see - gitlink:git-cvsserver[1] for details). May not contain semicolons (`;`). + linkgit:git-cvsserver[1] for details). May not contain semicolons (`;`). Default: '%Ggitcvs.%m.sqlite' gitcvs.dbdriver:: @@ -572,13 +572,13 @@ gitcvs.dbdriver:: with 'DBD::SQLite', reported to work with 'DBD::Pg', and reported *not* to work with 'DBD::mysql'. Experimental feature. May not contain double colons (`:`). Default: 'SQLite'. - See gitlink:git-cvsserver[1]. + See linkgit:git-cvsserver[1]. gitcvs.dbuser, gitcvs.dbpass:: Database user and password. Only useful if setting 'gitcvs.dbdriver', since SQLite has no concept of database users and/or passwords. 'gitcvs.dbuser' supports variable substitution (see - gitlink:git-cvsserver[1] for details). + linkgit:git-cvsserver[1] for details). All gitcvs variables except for 'gitcvs.allbinary' can also be specified as 'gitcvs..' (where 'access_method' @@ -587,7 +587,7 @@ access method. http.proxy:: Override the HTTP proxy, normally configured using the 'http_proxy' - environment variable (see gitlink:curl[1]). This can be overridden + environment variable (see linkgit:curl[1]). This can be overridden on a per-remote basis; see remote..proxy http.sslVerify:: @@ -636,7 +636,7 @@ i18n.commitEncoding:: does not care per se, but this information is necessary e.g. when importing commits from emails or in the gitk graphical history browser (and possibly at other places in the future or in other - porcelains). See e.g. gitlink:git-mailinfo[1]. Defaults to 'utf-8'. + porcelains). See e.g. linkgit:git-mailinfo[1]. Defaults to 'utf-8'. i18n.logOutputEncoding:: Character encoding the commit messages are converted to when @@ -645,7 +645,7 @@ i18n.logOutputEncoding:: log.showroot:: If true, the initial commit will be shown as a big creation event. This is equivalent to a diff against an empty tree. - Tools like gitlink:git-log[1] or gitlink:git-whatchanged[1], which + Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which normally hide the root commit will now show it. True by default. merge.summary:: @@ -654,7 +654,7 @@ merge.summary:: merge.tool:: Controls which merge resolution program is used by - gitlink:git-mergetool[1]. Valid values are: "kdiff3", "tkdiff", + linkgit:git-mergetool[1]. Valid values are: "kdiff3", "tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", and "opendiff". merge.verbosity:: @@ -667,31 +667,31 @@ merge.verbosity:: merge..name:: Defines a human readable name for a custom low-level - merge driver. See gitlink:gitattributes[5] for details. + merge driver. See linkgit:gitattributes[5] for details. merge..driver:: Defines the command that implements a custom low-level - merge driver. See gitlink:gitattributes[5] for details. + merge driver. See linkgit:gitattributes[5] for details. merge..recursive:: Names a low-level merge driver to be used when performing an internal merge between common ancestors. - See gitlink:gitattributes[5] for details. + See linkgit:gitattributes[5] for details. mergetool..path:: Override the path for the given tool. This is useful in case your tool is not in the PATH. pack.window:: - The size of the window used by gitlink:git-pack-objects[1] when no + The size of the window used by linkgit:git-pack-objects[1] when no window size is given on the command line. Defaults to 10. pack.depth:: - The maximum delta depth used by gitlink:git-pack-objects[1] when no + The maximum delta depth used by linkgit:git-pack-objects[1] when no maximum depth is given on the command line. Defaults to 50. pack.windowMemory:: - The window memory size limit used by gitlink:git-pack-objects[1] + The window memory size limit used by linkgit:git-pack-objects[1] when no limit is given on the command line. The value can be suffixed with "k", "m", or "g". Defaults to 0, meaning no limit. @@ -707,16 +707,16 @@ pack.compression:: pack.deltaCacheSize:: The maximum memory in bytes used for caching deltas in - gitlink:git-pack-objects[1]. + linkgit:git-pack-objects[1]. A value of 0 means no limit. Defaults to 0. pack.deltaCacheLimit:: The maximum size of a delta, that is cached in - gitlink:git-pack-objects[1]. Defaults to 1000. + linkgit:git-pack-objects[1]. Defaults to 1000. pack.threads:: Specifies the number of threads to spawn when searching for best - delta matches. This requires that gitlink:git-pack-objects[1] + delta matches. This requires that linkgit:git-pack-objects[1] be compiled with pthreads otherwise this option is ignored with a warning. This is meant to reduce packing time on multiprocessor machines. The required amount of memory for the delta search window @@ -739,8 +739,8 @@ pull.twohead:: The default merge strategy to use when pulling a single branch. remote..url:: - The URL of a remote repository. See gitlink:git-fetch[1] or - gitlink:git-push[1]. + The URL of a remote repository. See linkgit:git-fetch[1] or + linkgit:git-push[1]. remote..proxy:: For remotes that require curl (http, https and ftp), the URL to @@ -748,24 +748,24 @@ remote..proxy:: disable proxying for that remote. remote..fetch:: - The default set of "refspec" for gitlink:git-fetch[1]. See - gitlink:git-fetch[1]. + The default set of "refspec" for linkgit:git-fetch[1]. See + linkgit:git-fetch[1]. remote..push:: - The default set of "refspec" for gitlink:git-push[1]. See - gitlink:git-push[1]. + The default set of "refspec" for linkgit:git-push[1]. See + linkgit:git-push[1]. remote..skipDefaultUpdate:: If true, this remote will be skipped by default when updating - using the update subcommand of gitlink:git-remote[1]. + using the update subcommand of linkgit:git-remote[1]. remote..receivepack:: The default program to execute on the remote side when pushing. See - option \--exec of gitlink:git-push[1]. + option \--exec of linkgit:git-push[1]. remote..uploadpack:: The default program to execute on the remote side when fetching. See - option \--exec of gitlink:git-fetch-pack[1]. + option \--exec of linkgit:git-fetch-pack[1]. remote..tagopt:: Setting this value to --no-tags disables automatic tag following when fetching @@ -773,22 +773,22 @@ remote..tagopt:: remotes.:: The list of remotes which are fetched by "git remote update - ". See gitlink:git-remote[1]. + ". See linkgit:git-remote[1]. repack.usedeltabaseoffset:: - Allow gitlink:git-repack[1] to create packs that uses + Allow linkgit:git-repack[1] to create packs that uses delta-base offset. Defaults to false. show.difftree:: - The default gitlink:git-diff-tree[1] arguments to be used - for gitlink:git-show[1]. + The default linkgit:git-diff-tree[1] arguments to be used + for linkgit:git-show[1]. showbranch.default:: - The default set of branches for gitlink:git-show-branch[1]. - See gitlink:git-show-branch[1]. + The default set of branches for linkgit:git-show-branch[1]. + See linkgit:git-show-branch[1]. status.relativePaths:: - By default, gitlink:git-status[1] shows paths relative to the + By default, linkgit:git-status[1] shows paths relative to the current directory. Setting this variable to `false` shows paths relative to the repository root (this was the default for git prior to v1.5.4). @@ -798,32 +798,32 @@ tar.umask:: tar archive entries. The default is 0002, which turns off the world write bit. The special value "user" indicates that the archiving user's umask will be used instead. See umask(2) and - gitlink:git-archive[1]. + linkgit:git-archive[1]. user.email:: Your email address to be recorded in any newly created commits. Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and - 'EMAIL' environment variables. See gitlink:git-commit-tree[1]. + 'EMAIL' environment variables. See linkgit:git-commit-tree[1]. user.name:: Your full name to be recorded in any newly created commits. Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME' - environment variables. See gitlink:git-commit-tree[1]. + environment variables. See linkgit:git-commit-tree[1]. user.signingkey:: - If gitlink:git-tag[1] is not selecting the key you want it to + If linkgit:git-tag[1] is not selecting the key you want it to automatically when creating a signed tag, you can override the default selection with this variable. This option is passed unchanged to gpg's --local-user parameter, so you may specify a key using any method that gpg supports. whatchanged.difftree:: - The default gitlink:git-diff-tree[1] arguments to be used - for gitlink:git-whatchanged[1]. + The default linkgit:git-diff-tree[1] arguments to be used + for linkgit:git-whatchanged[1]. imap:: The configuration variables in the 'imap' section are described - in gitlink:git-imap-send[1]. + in linkgit:git-imap-send[1]. receive.unpackLimit:: If the number of objects received in a push is below this diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt index 3b6b494162..ea98900228 100644 --- a/Documentation/cvs-migration.txt +++ b/Documentation/cvs-migration.txt @@ -36,12 +36,12 @@ them first before running git pull. ================================ 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 gitlink:git-config[1] man +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 gitlink:git-push[1] command: +your changes, and then using the linkgit:git-push[1] command: ------------------------------------------------ $ git push origin master @@ -88,7 +88,7 @@ Next, give every team member read/write access to this repository. One easy way to do this is to give all the team members ssh access to the machine where the repository is hosted. If you don't want to give them a full shell on the machine, there is a restricted shell which only allows -users to do git pushes and pulls; see gitlink:git-shell[1]. +users to do git pushes and pulls; see linkgit:git-shell[1]. Put all the committers in the same group, and make the repository writable by that group: @@ -106,7 +106,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 gitlink:git-cvsimport[1]: +of the project you are interested in and run linkgit:git-cvsimport[1]: ------------------------------------------- $ git cvsimport -C @@ -146,7 +146,7 @@ Providing CVS Access to a git Repository ---------------------------------------- It is also possible to provide true CVS access to a git repository, so -that developers can still use CVS; see gitlink:git-cvsserver[1] for +that developers can still use CVS; see linkgit:git-cvsserver[1] for details. Alternative Development Models diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 1a78635fba..8d35cbd60d 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -205,8 +205,8 @@ endif::git-format-patch[] --ext-diff:: Allow an external diff helper to be executed. If you set an - external diff driver with gitlink:gitattributes[5], you need - to use this option with gitlink:git-log[1] and friends. + external diff driver with linkgit:gitattributes[5], you need + to use this option with linkgit:git-log[1] and friends. --no-ext-diff:: Disallow external diff drivers. diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt index f1993e2935..fdbd15a181 100644 --- a/Documentation/everyday.txt +++ b/Documentation/everyday.txt @@ -25,12 +25,12 @@ Basic Repository[[Basic Repository]] Everybody uses these commands to maintain git repositories. - * gitlink:git-init[1] or gitlink:git-clone[1] to create a + * linkgit:git-init[1] or linkgit:git-clone[1] to create a new repository. - * gitlink:git-fsck[1] to check the repository for errors. + * linkgit:git-fsck[1] to check the repository for errors. - * gitlink:git-gc[1] to do common housekeeping tasks such as + * linkgit:git-gc[1] to do common housekeeping tasks such as repack and prune. Examples @@ -69,28 +69,28 @@ A standalone individual developer does not exchange patches with other people, and works alone in a single repository, using the following commands. - * gitlink:git-show-branch[1] to see where you are. + * linkgit:git-show-branch[1] to see where you are. - * gitlink:git-log[1] to see what happened. + * linkgit:git-log[1] to see what happened. - * gitlink:git-checkout[1] and gitlink:git-branch[1] to switch + * linkgit:git-checkout[1] and linkgit:git-branch[1] to switch branches. - * gitlink:git-add[1] to manage the index file. + * linkgit:git-add[1] to manage the index file. - * gitlink:git-diff[1] and gitlink:git-status[1] to see what + * linkgit:git-diff[1] and linkgit:git-status[1] to see what you are in the middle of doing. - * gitlink:git-commit[1] to advance the current branch. + * linkgit:git-commit[1] to advance the current branch. - * gitlink:git-reset[1] and gitlink:git-checkout[1] (with + * linkgit:git-reset[1] and linkgit:git-checkout[1] (with pathname parameters) to undo changes. - * gitlink:git-merge[1] to merge between local branches. + * linkgit:git-merge[1] to merge between local branches. - * gitlink:git-rebase[1] to maintain topic branches. + * linkgit:git-rebase[1] to maintain topic branches. - * gitlink:git-tag[1] to mark known point. + * linkgit:git-tag[1] to mark known point. Examples ~~~~~~~~ @@ -156,16 +156,16 @@ A developer working as a participant in a group project needs to learn how to communicate with others, and uses these commands in addition to the ones needed by a standalone developer. - * gitlink:git-clone[1] from the upstream to prime your local + * linkgit:git-clone[1] from the upstream to prime your local repository. - * gitlink:git-pull[1] and gitlink:git-fetch[1] from "origin" + * linkgit:git-pull[1] and linkgit:git-fetch[1] from "origin" to keep up-to-date with the upstream. - * gitlink:git-push[1] to shared repository, if you adopt CVS + * linkgit:git-push[1] to shared repository, if you adopt CVS style shared repository workflow. - * gitlink:git-format-patch[1] to prepare e-mail submission, if + * linkgit:git-format-patch[1] to prepare e-mail submission, if you adopt Linux kernel-style public forum workflow. Examples @@ -258,17 +258,17 @@ project receives changes made by others, reviews and integrates them and publishes the result for others to use, using these commands in addition to the ones needed by participants. - * gitlink:git-am[1] to apply patches e-mailed in from your + * linkgit:git-am[1] to apply patches e-mailed in from your contributors. - * gitlink:git-pull[1] to merge from your trusted lieutenants. + * linkgit:git-pull[1] to merge from your trusted lieutenants. - * gitlink:git-format-patch[1] to prepare and send suggested + * linkgit:git-format-patch[1] to prepare and send suggested alternative to contributors. - * gitlink:git-revert[1] to undo botched commits. + * linkgit:git-revert[1] to undo botched commits. - * gitlink:git-push[1] to publish the bleeding edge. + * linkgit:git-push[1] to publish the bleeding edge. Examples @@ -343,10 +343,10 @@ Repository Administration[[Repository Administration]] A repository administrator uses the following tools to set up and maintain access to the repository by developers. - * gitlink:git-daemon[1] to allow anonymous download from + * linkgit:git-daemon[1] to allow anonymous download from repository. - * gitlink:git-shell[1] can be used as a 'restricted login shell' + * linkgit:git-shell[1] can be used as a 'restricted login shell' for shared central repository users. link:howto/update-hook-example.txt[update hook howto] has a good diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index da034223f3..61e48ccf02 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -50,5 +50,5 @@ \--depth=:: Deepen the history of a 'shallow' repository created by - `git clone` with `--depth=` option (see gitlink:git-clone[1]) + `git clone` with `--depth=` option (see linkgit:git-clone[1]) by the specified number of commits. diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 721ca998c1..9d2ac865d2 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -37,7 +37,7 @@ directory recursion or filename globbing performed by Git (quote your globs before the shell) will be silently ignored. The 'add' command can be used to add ignored files with the `-f` (force) option. -Please see gitlink:git-commit[1] for alternative ways to add content to a +Please see linkgit:git-commit[1] for alternative ways to add content to a commit. @@ -231,12 +231,12 @@ diff:: See Also -------- -gitlink:git-status[1] -gitlink:git-rm[1] -gitlink:git-reset[1] -gitlink:git-mv[1] -gitlink:git-commit[1] -gitlink:git-update-index[1] +linkgit:git-status[1] +linkgit:git-rm[1] +linkgit:git-reset[1] +linkgit:git-mv[1] +linkgit:git-commit[1] +linkgit:git-update-index[1] Author ------ @@ -248,4 +248,4 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the gitlink:git[7] suite +Part of the linkgit:git[7] suite diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index e4a6b3a6f0..2ffba2102b 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -37,10 +37,10 @@ OPTIONS area to store extracted patches. -k, --keep:: - Pass `-k` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]). + Pass `-k` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]). -u, --utf8:: - Pass `-u` flag to `git-mailinfo` (see gitlink: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 @@ -51,7 +51,7 @@ default. You could use `--no-utf8` to override this. --no-utf8:: Pass `-n` flag to `git-mailinfo` (see - gitlink:git-mailinfo[1]). + linkgit:git-mailinfo[1]). -3, --3way:: When the patch does not apply cleanly, fall back on @@ -61,15 +61,15 @@ default. You could use `--no-utf8` to override this. -b, --binary:: Pass `--allow-binary-replacement` flag to `git-apply` - (see gitlink:git-apply[1]). + (see linkgit:git-apply[1]). --whitespace=