summaryrefslogtreecommitdiff
path: root/Documentation/git-am.txt
AgeCommit message (Collapse)Author
2020-10-20Documentation: stylistically normalize references to Signed-off-by:Bradley M. Kuhn
Ted reported an old typo in the git-commit.txt and merge-options.txt. Namely, the phrase "Signed-off-by line" was used without either a definite nor indefinite article. Upon examination, it seems that the documentation (including items in Documentation/, but also option help strings) have been quite inconsistent on usage when referring to `Signed-off-by`. First, very few places used a definite or indefinite article with the phrase "Signed-off-by line", but that was the initial typo that led to this investigation. So, normalize using either an indefinite or definite article consistently. The original phrasing, in Commit 3f971fc425b (Documentation updates, 2005-08-14), is "Add Signed-off-by line". Commit 6f855371a53 (Add --signoff, --check, and long option-names. 2005-12-09) switched to using "Add `Signed-off-by:` line", but didn't normalize the former commit to match. Later commits seem to have cut and pasted from one or the other, which is likely how the usage became so inconsistent. Junio stated on the git mailing list in <xmqqy2k1dfoh.fsf@gitster.c.googlers.com> a preference to leave off the colon. Thus, prefer `Signed-off-by` (with backticks) for the documentation files and Signed-off-by (without backticks) for option help strings. Additionally, Junio argued that "trailer" is now the standard term to refer to `Signed-off-by`, saying that "becomes plenty clear that we are not talking about any random line in the log message". As such, prefer "trailer" over "line" anywhere the former word fits. However, leave alone those few places in documentation that use Signed-off-by to refer to the process (rather than the specific trailer), or in places where mail headers are generally discussed in comparison with Signed-off-by. Reported-by: "Theodore Y. Ts'o" <tytso@mit.edu> Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-03Documentation: document am --no-gpg-signĐoàn Trần Công Danh
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-20am: support --show-current-patch=diff to retrieve .git/rebase-apply/patchPaolo Bonzini
When "git am --show-current-patch" was added in commit 984913a210 ("am: add --show-current-patch", 2018-02-12), "git am" started recommending it as a replacement for .git/rebase-merge/patch. Unfortunately the suggestion is somewhat misguided; for example, the output of "git am --show-current-patch" cannot be passed to "git apply" if it is encoded as quoted-printable or base64. Add a new mode to "git am --show-current-patch" in order to straighten the suggestion. Reported-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-20am: support --show-current-patch=raw as a synonym for--show-current-patchPaolo Bonzini
When "git am --show-current-patch" was added in commit 984913a210 ("am: add --show-current-patch", 2018-02-12), "git am" started recommending it as a replacement for .git/rebase-merge/patch. Unfortunately the suggestion is somewhat misguided; for example, the output "git am --show-current-patch" cannot be passed to "git apply" if it is encoded as quoted-printable or base64. To simplify worktree operations and to avoid that users poke into .git, it would be better if "git am" also provided a mode that copies .git/rebase-merge/patch to stdout. One possibility could be to have completely separate options, introducing for example --show-current-message (for .git/rebase-apply/NNNN) and --show-current-diff (for .git/rebase-apply/patch), while possibly deprecating --show-current-patch. That would even remove the need for the first two patches in the series. However, the long common prefix would have prevented using an abbreviated option such as "--show". Therefore, I chose instead to add a string argument to --show-current-patch. The new argument is optional, so that "git am --show-current-patch"'s behavior remains backwards-compatible. The next choice to make is how to handle multiple --show-current-patch options. Right now, something like "git am --abort --show-current-patch" is rejected, and the previous suggestion would likewise have naturally rejected a command line like git am --show-current-message --show-current-diff Therefore, I decided to also reject for example git am --show-current-patch=diff --show-current-patch=raw In other words the whole of --show-current-patch=xxx (including the optional argument) is treated as the command mode. I found this to be more consistent and intuitive, even though it differs from the usual "last one wins" semantics of the git command line. Add the code to parse submodes based on the above design, where for now "raw" is the only valid submode. "raw" prints the full e-mail message just like "git am --show-current-patch". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-01-08Merge branch 'pm/am-in-body-header-doc-update'Junio C Hamano
Doc update. * pm/am-in-body-header-doc-update: am: document that Date: can appear as an in-body header
2020-01-04am: document that Date: can appear as an in-body headerPaul Menzel
Similar to "From:" and "Subject:" already mentioned in the documentation, "Date:" can also appear as an in-body header to override the value in the e-mail headers. Document it. Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-10-23doc: am --show-current-patch gives an entire e-mail messageJunio C Hamano
The existing wording gives an impression that it only gives the contents of the $GIT_DIR/rebase-apply/patch file, i.e. the patch proper, but the option actually emits the entire e-mail message being processed (iow, one of the output files from "git mailsplit"). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-18am/cherry-pick/rebase/revert: document --rerere-autoupdatePhillip Wood
This option was missing from the man pages of these commands. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-06Merge branch 'nd/rebase-show-current-patch'Junio C Hamano
The new "--show-current-patch" option gives an end-user facing way to get the diff being applied when "git rebase" (and "git am") stops with a conflict. * nd/rebase-show-current-patch: rebase: introduce and use pseudo-ref REBASE_HEAD rebase: add --show-current-patch am: add --show-current-patch
2018-02-14am: support --quitNguyễn Thái Ngọc Duy
Among the "in progress" commands, only git-am and git-merge do not support --quit. Support --quit in git-am too. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-12am: add --show-current-patchNguyễn Thái Ngọc Duy
Pointing the user to $GIT_DIR/rebase-apply may encourage them to mess around in there, which is not a good thing. With this, the user does not have to keep the path around somewhere (because after a couple of commands, the path may be out of scrollback buffer) when they need to look at the patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-13Merge branch 'mm/doc-tt'Junio C Hamano
More mark-up updates to typeset strings that are expected to literally typed by the end user in fixed-width font. * mm/doc-tt: doc: typeset HEAD and variants as literal CodingGuidelines: formatting HEAD in documentation doc: typeset long options with argument as literal doc: typeset '--' as literal doc: typeset long command-line options as literal doc: typeset short command-line options as literal Documentation/git-mv.txt: fix whitespace indentation
2016-06-28doc: typeset long command-line options as literalMatthieu Moy
Similarly to the previous commit, use backquotes instead of forward-quotes, for long options. This was obtained with: perl -pi -e "s/'(--[a-z][a-z=<>-]*)'/\`\$1\`/g" *.txt and manual tweak to remove false positive in ascii-art (o'--o'--o' to describe rewritten history). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-06am: support --patch-format=mboxrdEric Wong
Combined with "git format-patch --pretty=mboxrd", this should allow us to round-trip commit messages with embedded mbox "From " lines without corruption. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-05Expand documentation describing --signoffDavid A. Wheeler
Modify various document (man page) files to explain in more detail what --signoff means. This was inspired by https://lwn.net/Articles/669976/ where paulj noted, "adding [the] '-s' argument to [a] git commit doesn't really mean you have even heard of the DCO...". Extending git's documentation will make it easier to argue that developers understood --signoff when they use it. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16Merge branch 'mm/keyid-docs' into maintJunio C Hamano
Very small number of options take a parameter that is optional (which is not a great UI element as they can only appear at the end of the command line). Add notice to documentation of each and every one of them. * mm/keyid-docs: Documentation: explain optional arguments better Documentation/grep: fix documentation of -O Documentation: use 'keyid' consistently, not 'key-id'
2015-09-21Documentation: explain optional arguments betterMatthieu Moy
Improve the documentation of commands taking optional arguments in two ways: * Documents the behavior of '-O' (for grep) and '-S' (for commands creating commits) when used without the optional argument. * Document the syntax of these options. For the second point, the behavior is documented in gitcli(7), but it is easy for users to miss, and hard for the same user to understand why e.g. "git status -u no" does not work. Document this explicitly in the documentation of each short option having an optional argument: they are the most error prone since there is no '=' sign between the option and its argument. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-05git-am: add am.threeWay config variableRemi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-24Revert "git-am: add am.threeWay config variable"Junio C Hamano
This reverts commit d96a275b91bae1800cd43be0651e886e7e042a17. It used to be possible to apply a patch series with "git am mbox" and then only after seeing a failure, switch to three-way mode via "git am -3" (no other options or arguments). The commit being reverted broke this workflow. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-04git-am: add am.threeWay config variableRemi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-05Merge branch 'mm/am-c-doc'Junio C Hamano
The configuration variable 'mailinfo.scissors' was hard to discover in the documentation. * mm/am-c-doc: Documentation/git-am.txt: mention mailinfo.scissors config variable Documentation/config.txt: document mailinfo.scissors
2015-02-20Documentation/git-am.txt: mention mailinfo.scissors config variableMatthieu Moy
It was already documented, but the user had to follow the link to git-mailinfo.txt to find it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-22Merge branch 'rw/apply-does-not-take-ignore-date'Junio C Hamano
* rw/apply-does-not-take-ignore-date: git-am.txt: --ignore-date flag is not passed to git-apply
2014-12-09git-am.txt: --ignore-date flag is not passed to git-applyRonald Wampler
Signed-off-by: Ronald Wampler <rdwampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-25git-am: add --message-id/--no-message-idPaolo Bonzini
Parse the option and pass it directly to git-mailinfo. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-25Merge branch 'cp/am-patch-format-doc'Junio C Hamano
* cp/am-patch-format-doc: Documentation/git-am: typofix Documentation/git-am: Document supported --patch-format options
2014-03-17Documentation/git-am: typofixChris Packham
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-14Merge branch 'jn/am-doc-hooks'Junio C Hamano
* jn/am-doc-hooks: am doc: add a pointer to relevant hooks
2014-03-11Documentation/git-am: Document supported --patch-format optionsChris Packham
The --patch-format option has been supported for a while but it is not mentioned in the man page and the short help cannot tell the user what the supported formats are. Add the option to the man page along with the supported options. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24am doc: add a pointer to relevant hooksJonathan Nieder
It is not obvious when looking at a new command what hooks will affect it. Add a HOOKS section to the git-am(1) page, imitating git-commit(1), to make it easier for people to discover e.g. the applypatch-msg hook that can implement a custom subject-mangling strategy (e.g., removing a "bug #nnnn:" prefix introduced by a bug tracker). Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-03am: add the --gpg-sign optionNicolas Vigier
Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-27am: replace uses of --resolved with --continueKevin Bracey
git am was previously modified to provide --continue for consistency with rebase, merge etc, and the documentation changed to showing --continue as the primary form. Complete the work by replacing remaining uses of --resolved by --continue, most notably in suggested command reminders. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17documentation: trivial style cleanupsFelipe Contreras
White-spaces, missing braces, standardize --[no-]foo. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-20Merge branch 'jb/am-include'Junio C Hamano
"git am" learned the "--include" option, which is an opposite of existing the "--exclude" option. By Johannes Berg * jb/am-include: am: support --include option
2012-03-28am: support --include optionJohannes Berg
am supports a number of pass-through options to apply, like --exclude and --directory. Add --include to this list. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-29Merge branch 'tr/maint-mailinfo'Junio C Hamano
* tr/maint-mailinfo: mailinfo: with -b, keep space after [foo] am: learn passing -b to mailinfo Conflicts: git-am.sh
2012-01-17am: learn passing -b to mailinfoThomas Rast
git-am could pass -k to mailinfo, but not -b. Introduce an option that does so. We change the meaning of the 'keep' state file, but are careful not to cause a problem unless you downgrade in the middle of an 'am' run. This uncovers a bug in mailinfo -b, hence the failing test. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-09am: Document new --exclude=<path> optionmaximilian attems
The --exclude=<path> option is passed down to apply; document it as such. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-22Merge branch 'maint'Junio C Hamano
* maint: git-am.txt: advertise 'git am --abort' instead of 'rm .git/rebase-apply' bisect: visualize with git-log if gitk is unavailable
2011-03-22git-am.txt: advertise 'git am --abort' instead of 'rm .git/rebase-apply'SZEDER Gábor
'git am --abort' is around for quite a long time now, and users should normally not poke around inside the .git directory, yet the documentation of 'git am' still recommends the following: ... if you decide to start over from scratch, run `rm -f -r .git/rebase-apply` ... Suggest 'git am --abort' instead. It's not quite the same as the original, because 'git am --abort' will restore the original branch, while simply removing '.git/rebase-apply' won't, but that's rather a thinko in the original wording, because that won't actually "start over _from scratch_". Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-11doc: drop author/documentation sections from most pagesJeff King
The point of these sections is generally to: 1. Give credit where it is due. 2. Give the reader an idea of where to ask questions or file bug reports. But they don't do a good job of either case. For (1), they are out of date and incomplete. A much more accurate answer can be gotten through shortlog or blame. For (2), the correct contact point is generally git@vger, and even if you wanted to cc the contact point, the out-of-date and incomplete fields mean you're likely sending to somebody useless. So let's drop the fields entirely from all manpages except git(1) itself. We already point people to the mailing list for bug reports there, and we can update the Authors section to give credit to the major contributors and point to shortlog and blame for more information. Each page has a "This is part of git" footer, so people can follow that to the main git manpage.
2010-10-08Use parentheses and `...' where appropriateŠtěpán Němec
Remove some stray usage of other bracket types and asterisks for the same purpose. Signed-off-by: Štěpán Němec <stepnem@gmail.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-10Merge branch 'sh/am-keep-cr'Junio C Hamano
* sh/am-keep-cr: git-am: Add tests for `--keep-cr`, `--no-keep-cr` and `am.keepcr` git-am: Add am.keepcr and --no-keep-cr to override it git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit documentation: 'git-mailsplit --keep-cr' is not hidden anymore
2010-03-05Merge branch 'maint-1.6.6' into maintJunio C Hamano
* maint-1.6.6: Remove extra '-' from git-am(1)
2010-03-05Remove extra '-' from git-am(1)Michal Sojka
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28git-am: Add am.keepcr and --no-keep-cr to override itStefan-W. Hahn
This patch adds the configuration `am.keepcr` for git-am. It also adds `--no-keep-cr` parameter for git-am to give the possibility to override configuration from command line. Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28git-am: Add command line parameter `--keep-cr` passing it to git-mailsplitStefan-W. Hahn
c2ca1d7 (Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings, 2009-08-04) fixed "git mailsplit" to help people with MUA whose output from save-as command uses CRLF as line terminators by stripping CR at the end of lines. However, when you know you are feeding output from "git format-patch" directly to "git am", and especially when your contents have CR at the end of line, such stripping is undesirable. To help such a use case, teach --keep-cr option to "git am" and pass that to "git mailinfo". Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12am: switch --resolved to --continueJeff King
Rebase calls this same function "--continue", which means users may be trained to type it. There is no reason to deprecate --resolved (or -r), so we will keep it as a synonym. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10Documentation: spell 'git cmd' without dash throughoutThomas Rast
The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH.
2009-09-11add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>