<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-format-patch.txt, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-09T22:25:44Z</updated>
<entry>
<title>Merge branch 'nd/switch-and-restore'</title>
<updated>2019-07-09T22:25:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f496b064fc1135e0dded7f93d85d72eb0b302c22'/>
<id>urn:sha1:f496b064fc1135e0dded7f93d85d72eb0b302c22</id>
<content type='text'>
Two new commands "git switch" and "git restore" are introduced to
split "checking out a branch to work on advancing its history" and
"checking out paths out of the index and/or a tree-ish to work on
advancing the current history" out of the single "git checkout"
command.

* nd/switch-and-restore: (46 commits)
  completion: disable dwim on "git switch -d"
  switch: allow to switch in the middle of bisect
  t2027: use test_must_be_empty
  Declare both git-switch and git-restore experimental
  help: move git-diff and git-reset to different groups
  doc: promote "git restore"
  user-manual.txt: prefer 'merge --abort' over 'reset --hard'
  completion: support restore
  t: add tests for restore
  restore: support --patch
  restore: replace --force with --ignore-unmerged
  restore: default to --source=HEAD when only --staged is specified
  restore: reject invalid combinations with --staged
  restore: add --worktree and --staged
  checkout: factor out worktree checkout code
  restore: disable overlay mode by default
  restore: make pathspec mandatory
  restore: take tree-ish from --source option instead
  checkout: split part of it to new command 'restore'
  doc: promote "git switch"
  ...
</content>
</entry>
<entry>
<title>format-patch: teach format.notes config option</title>
<updated>2019-05-17T03:51:53Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-05-16T23:14:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13cdf78094a5ba2968adb90707d27b98f53db1f7'/>
<id>urn:sha1:13cdf78094a5ba2968adb90707d27b98f53db1f7</id>
<content type='text'>
In git-format-patch, notes can be appended with the `--notes` option.
However, this must be specified by the user on an
invocation-by-invocation basis. If a user is not careful, it's possible
that they may forget to include it and generate a patch series without
notes.

Teach git-format-patch the `format.notes` config option. Its value is a
notes ref that will be automatically appended. The special value of
"standard" can be used to specify the standard notes. This option is
overridable with the `--no-notes` option in case a user wishes not to
append notes.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-format-patch.txt: document --no-notes option</title>
<updated>2019-05-13T01:58:18Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-05-10T18:37:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83d9db7893e479a836b11e141c1717f0d5b829a0'/>
<id>urn:sha1:83d9db7893e479a836b11e141c1717f0d5b829a0</id>
<content type='text'>
Internally, git-format-patch uses the `handle_revision_opt` parser. The
parser handles the `--no-notes` option to negate an earlier `--notes`
option, but it isn't documented. Document this option so that users are
aware of it.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: promote "git restore"</title>
<updated>2019-05-07T04:04:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-04-25T09:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80f537f79c16efeb7b92b3409ede434a230b5679'/>
<id>urn:sha1:80f537f79c16efeb7b92b3409ede434a230b5679</id>
<content type='text'>
The new command "git restore" (together with "git switch") are added
to avoid the confusion of one-command-do-all "git checkout" for new
users. They are also helpful to avoid ambiguous context.

For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands.

One nice thing about git-restore is the ability to restore
"everything", so it can be used in "git status" advice instead of both
"git checkout" and "git reset".  The three commands suggested by "git
status" are add, rm and restore.

"git checkout" is also removed from "git help" (i.e. it's no longer
considered a commonly used command)

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: promote "git switch"</title>
<updated>2019-04-02T04:57:00Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-03-29T10:39:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=328c6cb853d7237098569de9f94bc3d259846a08'/>
<id>urn:sha1:328c6cb853d7237098569de9f94bc3d259846a08</id>
<content type='text'>
The new command "git switch" is added to avoid the confusion of
one-command-do-all "git checkout" for new users. They are also helpful
to avoid ambiguation context.

For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands...

The "Checking out files" progress line in unpack-trees.c is also updated
to "Updating files" to be neutral to both git-checkout and git-switch.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: tidy asciidoc style</title>
<updated>2019-01-23T19:37:29Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2019-01-22T20:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba170517be039a04b1914ebe9b492d4139c707df'/>
<id>urn:sha1:ba170517be039a04b1914ebe9b492d4139c707df</id>
<content type='text'>
This mainly refers to enforcing indentation on additional lines of
items of lists.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: do not let its diff-options affect --range-diff</title>
<updated>2018-11-30T04:47:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-30T04:27:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8981c3f885ceaddfec0e545b0f995b96e5ec58f'/>
<id>urn:sha1:d8981c3f885ceaddfec0e545b0f995b96e5ec58f</id>
<content type='text'>
Stop leaking how the primary output of format-patch is customized to
the range-diff machinery and instead let the latter use its own
"reasonable default", in order to correct the breakage introduced by
a5170794 ("Merge branch 'ab/range-diff-no-patch'", 2018-11-18) on
the 'master' front.  "git format-patch --range-diff..." without any
weird diff option started to include the "range-diff --stat" output,
which is rather useless right now, that made the whole thing
unusable and this is probably the least disruptive way to whip the
codebase into a shippable shape.

We may want to later make the range-diff driven by format-patch more
configurable, but that would have to wait until we have a good
design.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: allow --range-diff to apply to a lone-patch</title>
<updated>2018-08-14T21:27:05Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40ce41604daf200cdc85abded0133d40faafc2f8'/>
<id>urn:sha1:40ce41604daf200cdc85abded0133d40faafc2f8</id>
<content type='text'>
When submitting a revised version of a patch or series, it can be
helpful (to reviewers) to include a summary of changes since the
previous attempt in the form of a range-diff, typically in the cover
letter. However, it is occasionally useful, despite making for a noisy
read, to insert a range-diff into the commentary section of the lone
patch of a 1-patch series.

Therefore, extend "git format-patch --range-diff=&lt;refspec&gt;" to insert a
range-diff into the commentary section of a lone patch rather than
requiring a cover letter.

Implementation note: Generating a range-diff for insertion into the
commentary section of a patch which itself is currently being generated
requires invoking the diffing machinery recursively. However, the
machinery does not (presently) support this since it uses global state.
Consequently, we need to take care to stash away the state of the
in-progress operation while generating the range-diff, and restore it
after.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: add --creation-factor tweak for --range-diff</title>
<updated>2018-08-14T21:27:05Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8631bf1cdd7296684deebab2708761bfc8085fc2'/>
<id>urn:sha1:8631bf1cdd7296684deebab2708761bfc8085fc2</id>
<content type='text'>
When generating a range-diff, matching up commits between two version of
a patch series involves heuristics, thus may give unexpected results.
git-range-diff allows tweaking the heuristic via --creation-factor.
Follow suit by accepting --creation-factor in combination with
--range-diff when generating a range-diff for a cover-letter.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: extend --range-diff to accept revision range</title>
<updated>2018-08-14T21:27:04Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e6fd71a52f5bde1c4036b8b0c586ae446f620f8'/>
<id>urn:sha1:2e6fd71a52f5bde1c4036b8b0c586ae446f620f8</id>
<content type='text'>
When submitting a revised a patch series, the --range-diff option embeds
a range-diff in the cover letter showing changes since the previous
version of the patch series. The argument to --range-diff is a simple
revision naming the tip of the previous series, which works fine if the
previous and current versions of the patch series share a common base.

However, it fails if the revision ranges of the old and new versions of
the series are disjoint. To address this shortcoming, extend
--range-diff to also accept an explicit revision range for the previous
series. For example:

    git format-patch --cover-letter --range-diff=v1~3..v1 -3 v2

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
