<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t7501-commit.sh, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-12-19T22:45:34Z</updated>
<entry>
<title>Merge branch 'ak/commit-only-allow-empty'</title>
<updated>2016-12-19T22:45:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-19T22:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3aead1cad7a9a35534b86763bbe8c97dfd3f1a03'/>
<id>urn:sha1:3aead1cad7a9a35534b86763bbe8c97dfd3f1a03</id>
<content type='text'>
"git commit --allow-empty --only" (no pathspec) with dirty index
ought to be an acceptable way to create a new commit that does not
change any paths, but it was forbidden, perhaps because nobody
needed it so far.

* ak/commit-only-allow-empty:
  commit: remove 'Clever' message for --only --amend
  commit: make --only --allow-empty work without paths
</content>
</entry>
<entry>
<title>commit: make --only --allow-empty work without paths</title>
<updated>2016-12-05T20:41:06Z</updated>
<author>
<name>Andreas Krey</name>
<email>a.krey@gmx.de</email>
</author>
<published>2016-12-02T22:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=319d835240b752b94ccb67f6515759824955937b'/>
<id>urn:sha1:319d835240b752b94ccb67f6515759824955937b</id>
<content type='text'>
--only is implied when paths are present, and required
them unless --amend. But with --allow-empty it should
be allowed as well - it is the only way to create an
empty commit in the presence of staged changes.

Signed-off-by: Andreas Krey &lt;a.krey@gmx.de&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: use trailer's trailer layout</title>
<updated>2016-11-29T22:22:18Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2016-11-02T17:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=967dfd4d568c2b102281de8cc22ee35f7558358b'/>
<id>urn:sha1:967dfd4d568c2b102281de8cc22ee35f7558358b</id>
<content type='text'>
Make sequencer use trailer.c's trailer layout definition, as opposed to
parsing the footer by itself. This makes "commit -s", "cherry-pick -x",
and "format-patch --signoff" consistent with trailer, allowing
non-trailer lines and multiple-line trailers in trailer blocks under
certain conditions, and therefore suppressing the extra newline in those
cases.

Consistency with trailer extends to respecting trailer configs.  Tests
have been included to show that.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ss/commit-dry-run-resolve-merge-to-no-op'</title>
<updated>2016-05-23T21:54:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-23T21:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ce2824e4ba56bf0f2017a0e351fa35c22a705ac'/>
<id>urn:sha1:9ce2824e4ba56bf0f2017a0e351fa35c22a705ac</id>
<content type='text'>
"git commit --dry-run" reported "No, no, you cannot commit." in one
case where "git commit" would have allowed you to commit, and this
improves it a little bit ("git commit --dry-run --short" still does
not give you the correct answer, for example).  This is a stop-gap
measure in that "commit --short --dry-run" still gives an incorrect
result.

* ss/commit-dry-run-resolve-merge-to-no-op:
  wt-status.c: set commitable bit if there is a meaningful merge.
</content>
</entry>
<entry>
<title>commit: do not ignore an empty message given by -m ''</title>
<updated>2016-04-07T20:25:12Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-04-07T19:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27014cbc04e369624f6c1754b72ef4eddb911166'/>
<id>urn:sha1:27014cbc04e369624f6c1754b72ef4eddb911166</id>
<content type='text'>
When f9568530 (builtin-commit: resurrect behavior for multiple -m
options, 2007-11-11) converted a "char *message" to "struct strbuf
message" to hold the messages given with the "-m" option, it
incorrectly changed the checks "did we get a message with the -m
option?" to "is message.len 0?".  Later, we noticed one breakage
from this change and corrected it with 25206778 (commit: don't start
editor if empty message is given with -m, 2013-05-25).

However, "we got a message with -m, even though an empty one, so we
shouldn't be launching an editor" was not the only breakage.

 * "git commit --amend -m '' --allow-empty", even though it looks
   strange, is a valid request to amend the commit to have no
   message at all.  Due to the misdetection of the presence of -m on
   the command line, we ended up keeping the log messsage from the
   original commit.

 * "git commit -m "$msg" -F file" should be rejected whether $msg is
   an empty string or not, but due to the same bug, was not rejected
   when $msg is empty.

 * "git -c template=file -m "$msg"" should ignore the template even
   when $msg is empty, but it didn't and instead used the contents
   from the template file.

Correct these by checking have_option_m, which the earlier 25206778
introduced to fix the same bug.

Reported-by: Adam Dinwoodie &lt;adam@dinwoodie.org&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: --amend -m '' silently fails to wipe message</title>
<updated>2016-04-07T20:21:43Z</updated>
<author>
<name>Adam Dinwoodie</name>
<email>adam@dinwoodie.org</email>
</author>
<published>2016-04-06T17:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=178e8143b4f79290b3ffe40fe2ebf769fccc1ab7'/>
<id>urn:sha1:178e8143b4f79290b3ffe40fe2ebf769fccc1ab7</id>
<content type='text'>
`git commit --amend -m ''` seems to be an unambiguous request to blank a
commit message, but it actually leaves the commit message as-is.  That's
the case regardless of whether `--allow-empty-message` is specified, and
doesn't so much as drop a non-zero return code.

Add failing tests to show this behaviour.

Signed-off-by: Adam Dinwoodie &lt;adam@dinwoodie.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>wt-status.c: set commitable bit if there is a meaningful merge.</title>
<updated>2016-02-17T16:53:11Z</updated>
<author>
<name>Stephen P. Smith</name>
<email>ischis2@cox.net</email>
</author>
<published>2016-02-16T02:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8dc874b2ee61f0c457c4482ed2f202cac55b52ad'/>
<id>urn:sha1:8dc874b2ee61f0c457c4482ed2f202cac55b52ad</id>
<content type='text'>
The 'commit --dry-run' and 'commit' return values differed if a
conflicted merge had been resolved and the resulting commit would
record the same tree as the parent.

Update show_merge_in_progress to set the commitable bit if conflicts
have been resolved and a merge is in progress.

Signed-off-by: Stephen P. Smith &lt;ischis2@cox.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: accept more date formats for "--date"</title>
<updated>2014-05-02T21:15:22Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-02T01:12:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14ac2864dcd566a025e449ab9db6b5dc57744a32'/>
<id>urn:sha1:14ac2864dcd566a025e449ab9db6b5dc57744a32</id>
<content type='text'>
Right now we pass off the string found by "--date" straight
to the fmt_ident function, which will use our strict
parse_date to normalize it. However, this means obvious
things like "--date=now" or "--date=2.days.ago" will not
work.

Instead, let's fallback to the approxidate function to
handle this for us. Note that we must try parse_date
ourselves first, even though approxidate will try strict
parsing itself. The reason is that approxidate throws away
any timezone information it sees from the strict parsing,
and we want to preserve it. So asking for:

  git commit --date="@1234567890 -0700"

continues to set the date in -0700, regardless of what the
local timezone is.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: print "Date" line when the user has set date</title>
<updated>2014-05-02T21:14:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-02T01:10:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7242b8c9e4b3c57a07c2a76d0337389605aadcc'/>
<id>urn:sha1:b7242b8c9e4b3c57a07c2a76d0337389605aadcc</id>
<content type='text'>
When we make a commit and the author is not the same as the
committer (e.g., because you used "-c $commit" or
"--author=$somebody"), we print the author's name and email
in both the commit-message template and as part of the
commit summary. This is a safety check to give the user a
chance to confirm that we are doing what they expect.

This patch brings the same safety for the "date" field,
which may be set by "-c" or by using "--date".  Note that we
explicitly do not set it for $GIT_AUTHOR_DATE, as it is
probably not of interest when "git commit" is being fed its
parameters by a script.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>demonstrate git-commit --dry-run exit code behaviour</title>
<updated>2014-02-24T17:16:53Z</updated>
<author>
<name>Tay Ray Chuan</name>
<email>rctay89@gmail.com</email>
</author>
<published>2014-02-21T19:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cbcc2a7ca5b09ff57b52b7f6e422228f6cfd451'/>
<id>urn:sha1:9cbcc2a7ca5b09ff57b52b7f6e422228f6cfd451</id>
<content type='text'>
In particular, show that --short and --porcelain, while implying
--dry-run, do not return the same exit code as --dry-run. This is due to
the wt_status.commitable flag being set only when a long status is
requested.

No fix is provided here; with [1], it should be trivial to fix though -
just a matter of calling wt_status_mark_commitable().

[1] http://article.gmane.org/gmane.comp.version-control.git/242489

Signed-off-by: Tay Ray Chuan &lt;rctay89@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
