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

Re: [PATCH] commit -c/-C/--amend: take over authorship and restamp time with --claim

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2009, 21:24 UTC
Message-ID
<7v7hub5kam.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1256958480-6775-1-git-send-email-erick.mattos@gmail.com>
Erick Mattos <erick.mattos@gmail.com> writes:
> The new --claim option is meant to solve this need by regenerating the
> timestamp and setting as new author the committer or the one specified
> on --author option.
I'll leave discussion on the option name to others.
> +--claim::
> +	When used with -C/-c/--amend options the committer takes over
> +	the cloned commit authorship and renew the timestamp thus using
> +	only the commit message from the source.

"The cloned commit" is a bit misleading; in the mind of users --amend does not clone but rewrite, as the old commit usually only belongs to a reflog and not any other branch. I'd rewrite it this way, perhaps.

	When used with -C/-c/--amend options, declare that the authorship
	of the resulting commit now belongs of the committer.  This also
	renews the author timestamp.

We also would need a test to protect this new feature from getting broken by future updates.

Thanks.
Previous: Erick MattosNext: Erick Mattos
Message 2 of 13 in “commit -c/-C/--amend: take over authorship and restamp time with --claim”
  1. commit -c/-C/--amend: take over authorship and restamp time with --claimErick Mattos, Oct 31, 2009
  2. Junio C HamanoOct 31, 2009
  3. commit -c/-C/--amend: take over authorship and restamp time with --claimErick Mattos, Nov 1, 2009
  4. commit -c/-C/--amend: acquire authorship and restamp time with --claimErick Mattos, Nov 1, 2009
  5. Junio C HamanoNov 1, 2009
  6. Erick MattosNov 1, 2009
  7. Junio C HamanoNov 2, 2009
  8. Erick MattosNov 2, 2009
  9. Junio C HamanoNov 2, 2009
  10. Junio C HamanoNov 2, 2009
  11. Erick MattosNov 3, 2009
  12. Erick MattosNov 1, 2009
  13. commit -c/-C/--amend: reset timestamp and authorship to committer with --mineErick Mattos, Nov 2, 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.