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

Re: [PATCH v2] commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-author

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Nov 5, 2009, 03:34 UTC
Message-ID
<20091105123456.6117@nanako3.lavabit.com>
In-Reply-To
<7vpr7ykbh8.fsf@alter.siamese.dyndns.org>
Quoting Junio C Hamano <gitster@pobox.com>
Show 7 quoted lines
> I had an impression that we have already established that setting the
> author with --author="Somebody Else <s@b.e>" and committing with the
> current time does not make much sense from the workflow point of view long
> time ago in this thread.
> <snip>
> But allowing this combination, even though it might not make much sense,
> is just giving extra length to the rope, so it may not be such a big deal.

It may be wise to forbid a combination of options if it encourages mistakes or a wrong workflow, but I don't think using --author and --reset-author with 'git commit --amend' is such a case.

Imagine somebody other than you (eg. me) were the maintainer, and a message by Szeder was sent with a good commit log message.

 http://article.gmane.org/gmane.comp.version-control.git/132029

Then you sent a replacement patch that solves the same problem in a more elegant way, but without anything that is usable as the commit log message.

 http://article.gmane.org/gmane.comp.version-control.git/132041

If I were the maintainer, I would find it very convenient if I can work like this:

 % git am -s 132029   --- first I apply Szeder's version

Then I see your message. Replace the code change but use Szeder's log message.

 % git reset --hard HEAD^
 % git am 132041   --- your version with no usable log message
 % git commit --amend -s -c @{2} --author='Junio C Hamano <...>'
> Sorry, but I cannot help feeling a bit frustrated and mildly irritated.

Don't try to be perfect and feel stressed out, and please take a good rest.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: Erick MattosNext: Junio C Hamano
Message 4 of 6 in “commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-author”
  1. commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-authorErick Mattos, Nov 4, 2009
  2. Junio C HamanoNov 4, 2009
  3. Erick MattosNov 4, 2009
  4. Nanako ShiraishiNov 5, 2009
  5. Junio C HamanoNov 5, 2009
  6. Erick MattosNov 5, 2009

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.