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

Re: Request to add option to interactive rebase to preserve latest commit date

From
Philip Oakley <philipoakley@iee.org>
Date
May 10, 2019, 16:57 UTC
Message-ID
<412f07c2-3ab2-0902-89bd-21e8fe8dc190@iee.org>
In-Reply-To
<xmqqtve6nbfv.fsf@gitster-ct.c.googlers.com>
On 07/05/2019 05:19, Junio C Hamano wrote:
Show 8 quoted lines
> The principle is "the bulk of the work was done in A, no matter what
> is done incrementally by squashing in or amending small refinements;
> the primary authorship date and time stays the same as the original".
>
> When the person who is correcting other's change with --amend makes
> a contribution that is substantial enough such that the amended HEAD
> no longer resembles the original HEAD, there is a mechanism to let
> the amender take authorship,

IIUC the effective change in authorship was noted in another thread about a perceived problem in rebase, and it just bit me as well recently (and the Github PR bot rejected my series for a mismatched author/sign-off :-(.

If a commit is edited in a `rebase -i` then I think the same can happen, resulting in the same user surprise at the change. Possibly a simple documentation note may help reduce user surprise.

Show 6 quoted lines
> i.e. do this at the last step instead
>
> 	$ git commit --reset-author --amend -a
>
> in the second sequence.  I do not think there currently is an
> equivalent in "rebase -i" language to do so.

-- Philip

Previous: Jeff Schwartz
Message 7 of 7 in “Request to add option to interactive rebase to preserve latest commit date”
  1. Jeff SchwartzApr 25, 2019
  2. Junio C HamanoApr 26, 2019
  3. Peter KreftingMay 1, 2019
  4. Junio C HamanoMay 7, 2019
  5. Peter KreftingMay 7, 2019
  6. Jeff SchwartzMay 7, 2019
  7. Philip OakleyMay 10, 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.