<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/commit.c, branch v2.25.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.25.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.25.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-02-14T20:42:27Z</updated>
<entry>
<title>Merge branch 'hw/commit-advise-while-rejecting' into maint</title>
<updated>2020-02-14T20:42:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-14T20:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bba763373a5d0e5fcbe37a5f54a16f9b7f2e7b5'/>
<id>urn:sha1:3bba763373a5d0e5fcbe37a5f54a16f9b7f2e7b5</id>
<content type='text'>
"git commit" gives output similar to "git status" when there is
nothing to commit, but without honoring the advise.statusHints
configuration variable, which has been corrected.

* hw/commit-advise-while-rejecting:
  commit: honor advice.statusHints when rejecting an empty commit
</content>
</entry>
<entry>
<title>Merge branch 'am/pathspec-from-file'</title>
<updated>2019-12-25T19:21:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-25T19:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff0cb70d456f586c94f15daa67d2ff1bb8e75fb6'/>
<id>urn:sha1:ff0cb70d456f586c94f15daa67d2ff1bb8e75fb6</id>
<content type='text'>
An earlier series to teach "--pathspec-from-file" to "git commit"
forgot to make the option incompatible with "--all", which has been
corrected.

* am/pathspec-from-file:
  commit: forbid --pathspec-from-file --all
</content>
</entry>
<entry>
<title>commit: honor advice.statusHints when rejecting an empty commit</title>
<updated>2019-12-19T19:58:08Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2019-12-17T09:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c4f55f1f62b64f530bd135e5b248ceba7b95708'/>
<id>urn:sha1:5c4f55f1f62b64f530bd135e5b248ceba7b95708</id>
<content type='text'>
In ea9882bfc4 (commit: disable status hints when writing to
COMMIT_EDITMSG, 2013-09-12) the intent was to disable status hints
when writing to COMMIT_EDITMSG, because giving the hints in the "git
status" like output in the commit message template are too late to
be useful (they say things like "'git add' to stage", but that is
only possible after aborting the current "git commit" session).

But there is one case that the hints can be useful: When the current
attempt to commit is rejected because no change is recorded in the
index.  The message is given and "git commit" errors out, so the
hints can immediately be followed by the user.  Teach the codepath
to honor the configuration variable.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: forbid --pathspec-from-file --all</title>
<updated>2019-12-18T22:14:14Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2019-12-16T15:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=509efef789de51f5d68e5c9799918f9a5ea09670'/>
<id>urn:sha1:509efef789de51f5d68e5c9799918f9a5ea09670</id>
<content type='text'>
I forgot this in my previous patch `--pathspec-from-file` for
`git commit` [1]. When both `--pathspec-from-file` and `--all` were
specified, `--all` took precedence and `--pathspec-from-file` was
ignored. Before `--pathspec-from-file` was implemented, this case was
prevented by this check in `parse_and_validate_options()` :

    die(_("paths '%s ...' with -a does not make sense"), argv[0]);

It is unfortunate that these two cases are disconnected. This came as
result of how the code was laid out before my patches, where `pathspec`
is parsed outside of `parse_and_validate_options()`. This branch is
already full of refactoring patches and I did not dare to go for another
one.

Fix by mirroring `die()` for `--pathspec-from-file` as well.

[1] Commit e440fc58 ("commit: support the --pathspec-from-file option" 2019-11-19)

Reported-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
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>Merge branch 'rs/commit-export-env-simplify'</title>
<updated>2019-12-16T21:14:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-16T21:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3b72391d1ab9fb55a8c22a06501d7a8d7c5e02a'/>
<id>urn:sha1:e3b72391d1ab9fb55a8c22a06501d7a8d7c5e02a</id>
<content type='text'>
Code cleanup.

* rs/commit-export-env-simplify:
  commit: use strbuf_add() to add a length-limited string
</content>
</entry>
<entry>
<title>Merge branch 'am/pathspec-from-file'</title>
<updated>2019-12-10T21:11:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-10T21:11:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c58ae96fc4bb11916b62a96940bb70bb85ea5992'/>
<id>urn:sha1:c58ae96fc4bb11916b62a96940bb70bb85ea5992</id>
<content type='text'>
A few commands learned to take the pathspec from the
standard input or a named file, instead of taking it as the command
line arguments.

* am/pathspec-from-file:
  commit: support the --pathspec-from-file option
  doc: commit: synchronize &lt;pathspec&gt; description
  reset: support the `--pathspec-from-file` option
  doc: reset: synchronize &lt;pathspec&gt; description
  pathspec: add new function to parse file
  parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`
</content>
</entry>
<entry>
<title>commit: use strbuf_add() to add a length-limited string</title>
<updated>2019-12-09T19:25:27Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-12-07T11:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=147ee35558a300a7e51af5335ef59b09fd57ab7c'/>
<id>urn:sha1:147ee35558a300a7e51af5335ef59b09fd57ab7c</id>
<content type='text'>
This is shorter and simpler.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&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>Merge branch 'pw/post-commit-from-sequencer'</title>
<updated>2019-11-10T09:02:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-11-10T09:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c8c0a0d78b0e0ee50ba13823f0cfbee05334461'/>
<id>urn:sha1:5c8c0a0d78b0e0ee50ba13823f0cfbee05334461</id>
<content type='text'>
"rebase -i" ceased to run post-commit hook by mistake in an earlier
update, which has been corrected.

* pw/post-commit-from-sequencer:
  sequencer: run post-commit hook
  move run_commit_hook() to libgit and use it there
  sequencer.h fix placement of #endif
  t3404: remove uneeded calls to set_fake_editor
  t3404: set $EDITOR in subshell
  t3404: remove unnecessary subshell
</content>
</entry>
<entry>
<title>move run_commit_hook() to libgit and use it there</title>
<updated>2019-10-16T01:30:51Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2019-10-15T10:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49697cb72122cf84b44111124821c9a4bcba3ab6'/>
<id>urn:sha1:49697cb72122cf84b44111124821c9a4bcba3ab6</id>
<content type='text'>
This function was declared in commit.h but was implemented in
builtin/commit.c so was not part of libgit. Move it to libgit so we can
use it in the sequencer. This simplifies the implementation of
run_prepare_commit_msg_hook() and will be used in the next commit.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
