git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: amend warnings with no changes staged

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 6, 2019, 03:00 UTC
Message-ID
<20190806030026.GA8864@google.com>
In-Reply-To
<xmqqtvavko1h.fsf@gitster-ct.c.googlers.com>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Lukas Gross wrote:
>>> I had intended to stage commits but forgot to do so. Git responded
>>> with a normal commit creation message, so I pushed to the remote to
>>> begin a CI build. When the build failed for the same reason, I
>>> realized
[...]
Show 17 quoted lines
>> 	$ git commit --amend --no-edit
>> 	[detached HEAD 33a3db8805] Git 2.23-rc1
>> 	 Author: Junio C Hamano <gitster@pobox.com>
>> 	 Date: Fri Aug 2 13:12:24 2019 -0700
>> 	 2 files changed, 2 insertions(+), 1 deletion(-)
>> 	$
>>
>> Some non-judgemental descriptive output like
>>
>> 	$ git commit --amend --no-edit
>> 	No changes.
>> 	$
>>
>> would address this case, without bothering people who are doing it
>> intentionally.  So I think there's room for a simple improvement here.
>
> I do that to refresh the committer timestamp.
I do, too.  The proposal is, paraphrasing,
	$ git commit --amend --no-edit
	Ah, I see that you want me to refresh the committer timestamp.
	Done, as requested.
	$
In other words:
[...]
>                                                           I am not
> yet convinced that "--amend --no-edit will become a no-op" is the
> final solution we want.
Not this.

Hoping that clarifies, Jonathan

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 13 in “amend warnings with no changes staged”
  1. Lukas GrossAug 6, 2019
  2. Jonathan NiederAug 6, 2019
  3. Lukas GrossAug 6, 2019
  4. Jonathan NiederAug 6, 2019
  5. Jonathan NiederAug 6, 2019
  6. Junio C HamanoAug 6, 2019
  7. Jonathan NiederAug 6, 2019
  8. Junio C HamanoAug 6, 2019
  9. Junio C HamanoAug 6, 2019
  10. Phillip WoodAug 6, 2019
  11. Jeff KingAug 6, 2019
  12. Junio C HamanoAug 6, 2019
  13. Jeff KingAug 8, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.