<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-commit.txt, branch v2.26.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-01-22T20:27:08Z</updated>
<entry>
<title>doc: provide guidance on user.name format</title>
<updated>2020-01-22T20:27:08Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-01-22T03:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69e104d70e29060742c75ccdcb6653e23c65f3c3'/>
<id>urn:sha1:69e104d70e29060742c75ccdcb6653e23c65f3c3</id>
<content type='text'>
It's a frequent misconception that the user.name variable controls
authentication in some way, and as a result, beginning users frequently
attempt to change it when they're having authentication troubles.
Document that the convention is that this variable represents some form
of a human's personal name, although that is not required.  In addition,
address concerns about whether Unicode is supported.

Use the term "personal name" as this is likely to draw the intended
contrast, be applicable across cultures which may have different naming
conventions, and be easily understandable to people who do not speak
English as their first language.  Indicate that "some form" is
conventionally used, as people may use a nickname or preferred name
instead of a full legal name.

Point users who may be confused about authentication to an appropriate
configuration option instead.  Provide a shortened form of this
information in the configuration option description.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: expand on possible and recommended user config options</title>
<updated>2020-01-22T20:27:08Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-01-22T03:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=813f6025a5094bc27df879eb0152441c4157c47e'/>
<id>urn:sha1:813f6025a5094bc27df879eb0152441c4157c47e</id>
<content type='text'>
In the section on setting author and committer information, we omit the
author.* and committer.* variables, so mention them for completeness.
In addition, guide users to the typical case: simply setting user.name
and user.email, which are recommended if one does not need complex
configuration.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: move author and committer information to git-commit(1)</title>
<updated>2020-01-22T20:27:08Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-01-22T03:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc94e5862aed854c77d4f96da9447161ce84a824'/>
<id>urn:sha1:bc94e5862aed854c77d4f96da9447161ce84a824</id>
<content type='text'>
While at one time it made perfect sense to store information about
configuring author and committer information in the documentation for
git commit-tree, in modern Git that operation is seldom used.  Most
users will use git commit and expect to find comprehensive documentation
about its use in the manual page for that command.

Considering that there is significant confusion about how one is to use
the user.name and user.email variables, let's put as much documentation
as possible into an obvious place where users will be more likely to
find it.

In addition, expand the environment variables section to describe their
use more fully.  Even though we now describe all of the options there
and in the configuration settings documentation, preserve the existing
text in git-commit.txt so that people can easily reason about the
ordering of the various options they can use.  Explain the use of the
author.* and committer.* options as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: support the --pathspec-from-file option</title>
<updated>2019-11-20T04:01:53Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2019-11-19T16:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e440fc5888bd5faf1775fc61621caa3c5fab96b6'/>
<id>urn:sha1:e440fc5888bd5faf1775fc61621caa3c5fab96b6</id>
<content type='text'>
Decisions taken for simplicity:
1) For now, `--pathspec-from-file` is declared incompatible with
   `--interactive/--patch`, even when &lt;file&gt; is not `stdin`. Such use
   case it not really expected. Also, it would require changes to
   `interactive_add()`.
2) It is not allowed to pass pathspec in both args and file.

Signed-off-by: Alexandr Miloslavskiy &lt;alexandr.miloslavskiy@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: commit: synchronize &lt;pathspec&gt; description</title>
<updated>2019-11-20T04:01:53Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2019-11-19T16:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66a25a7242e4e16480eab89da6557f90a2924c12'/>
<id>urn:sha1:66a25a7242e4e16480eab89da6557f90a2924c12</id>
<content type='text'>
`git add` shows an example of good writing, follow it.
This also better disambiguates &lt;file&gt;... header.

Signed-off-by: Alexandr Miloslavskiy &lt;alexandr.miloslavskiy@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: wrap blocks with "--"</title>
<updated>2019-09-09T18:05:51Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2019-09-07T14:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2017956a192d0dbcecbba604a76082ff8bbd3e3d'/>
<id>urn:sha1:2017956a192d0dbcecbba604a76082ff8bbd3e3d</id>
<content type='text'>
The documentation for each of these options contains a list. After the
list, AsciiDoc interprets the continuation as a continuation of the
*list*, not as a continution of the larger block. As a result, we get
too much indentation. Wrap the entire blocks in "--" to fix this. With
Asciidoctor, this commit is a no-op, and the two programs now render
these identically.

These two files share the same problem and indeed, they both document
`--untracked-files` in quite similar ways. I haven't checked to what
extent that is intentional or warranted, and to what extent they have
simply drifted apart. I consider such an investigation and possible
cleanup as out of scope for this commit and this patch series.

Signed-off-by: Martin Ågren &lt;martin.agren@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>git-commit.txt: better description what it does</title>
<updated>2019-02-04T18:00:01Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-02-01T10:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cfd4a9d108fa739c96beaa2dbcee3d7911db2a9'/>
<id>urn:sha1:5cfd4a9d108fa739c96beaa2dbcee3d7911db2a9</id>
<content type='text'>
The description of git-commit jumps right into the commit content, which
is important, but it fails to mention how the commit is "added" to the
repository. Update the first paragraph saying a bit more about branch
update to fill this gap.

While at there, add a couple linkgit references when the command is
first mentioned.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
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>commit: add support for --fixup &lt;commit&gt; -m"&lt;extra message&gt;"</title>
<updated>2017-12-22T21:10:24Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-12-22T20:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30884c9afcd03aa7d9a0524fde3c96d2e29cf9a9'/>
<id>urn:sha1:30884c9afcd03aa7d9a0524fde3c96d2e29cf9a9</id>
<content type='text'>
Add support for supplying the -m option with --fixup. Doing so has
errored out ever since --fixup was introduced. Before this, the only
way to amend the fixup message while committing was to use --edit and
amend it in the editor.

The use-case for this feature is one of:

 * Leaving a quick note to self when creating a --fixup commit when
   it's not self-evident why the commit should be squashed without a
   note into another one.

 * (Ab)using the --fixup feature to "fix up" commits that have already
   been pushed to a branch that doesn't allow non-fast-forwards,
   i.e. just noting "this should have been part of that other commit",
   and if the history ever got rewritten in the future the two should
   be combined.

   In such a case you might want to leave a small message,
   e.g. "forgot this part, which broke XYZ".

With this, --fixup &lt;commit&gt; -m"More" -m"Details" will result in a
commit message like:

    !fixup &lt;subject of &lt;commit&gt;&gt;

    More

    Details

The reason the test being added here seems to squash "More" at the end
of the subject line of the commit being fixed up is because the test
code is using "%s%b" so the body immediately follows the subject, it's
not a bug in this code, and other tests t7500-commit.sh do the same
thing.

When the --fixup option was initially added the "Option -m cannot be
combined" error was expanded from -c, -C and -F to also include
--fixup[1]

Those options could also support combining with -m, but given what
they do I can't think of a good use-case for doing that, so I have not
made the more invasive change of splitting up the logic in commit.c to
first act on those, and then on -m options.

1. d71b8ba7c9 ("commit: --fixup option for use with rebase
   --autosquash", 2010-11-02)

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit doc: document that -c, -C, -F and --fixup with -m error</title>
<updated>2017-12-22T19:20:47Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-12-22T16:00:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f55e84fff9b53e532a874f39384a3bcbb9292f28'/>
<id>urn:sha1:f55e84fff9b53e532a874f39384a3bcbb9292f28</id>
<content type='text'>
Document that providing any of -c, -C, -F and --fixup along with -m
will result in an error. Some variant of this has been errored about
explicitly since 0c091296c0 ("git-commit: log parameter updates.",
2005-08-08), but the documentation was never updated to reflect this.

Wording-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
