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

Re: [PATCH] Changed timestamp behavior of options -c/-C/--amend

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 30, 2009, 21:51 UTC
Message-ID
<7v3a50k0sg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091030202628.GA26513@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> On Fri, Oct 30, 2009 at 05:36:34PM -0200, Erick Mattos wrote:
>
>> Anyway this update creates new options for choosing the source timestamp
>> or a new one.  And set as default for -c option (editing one) to take a
>> new timestamp and for -C option the source timestamp.  That is because
>> we are normally using the source as template when we we are editing and
>> as a correction when we are just copying it.
>> 
>> Those options are also useful for --amend option which is by default
>> behaving the same.
>
> Thanks, this is something I have been wanting. I have always thought
> that --amend should give a new timestamp, so that while I'm fixing up
> commits via "rebase -i" the commits end up in correct date order.
>
> Your patch seems to always use the old timestamp for -C, the new one for
> -c, and the old one for --amend. I would want it always for --amend.
>
> I talked with Shawn about this at the GitTogether; his counter-argument
> was that many people in maintainer roles will be amending or rebasing
> just to do little things, like marking Signed-off-by, and that the date
> should remain the same.

Yeah, author timestamp shouldn't be molested for that kind of thing, although we should update commit timestamp.

Yuck, was this about author timestamp? Please then disregard my previous response about the default. I do not think there is strong reason to change the default for any of them at all, even though giving people to update what they committed with --no-reuse-timestamp would be a good addition.

I also suspect that comparing committer and author name may give us a good way to tweak the default in a more user friendly way.

Previous: Erick MattosNext: Johannes Sixt
Message 4 of 17 in “Changed timestamp behavior of options -c/-C/--amend”
  1. Changed timestamp behavior of options -c/-C/--amendErick Mattos, Oct 30, 2009
  2. Jeff KingOct 30, 2009
  3. Erick MattosOct 30, 2009
  4. Junio C HamanoOct 30, 2009
  5. Johannes SixtOct 30, 2009
  6. Paolo BonziniOct 31, 2009
  7. Junio C HamanoOct 30, 2009
  8. Junio C HamanoOct 30, 2009
  9. Erick MattosOct 30, 2009
  10. Junio C HamanoOct 30, 2009
  11. Erick MattosOct 30, 2009
  12. Junio C HamanoOct 31, 2009
  13. Erick MattosOct 31, 2009
  14. Johannes SixtOct 30, 2009
  15. Erick MattosOct 30, 2009
  16. Junio C HamanoOct 30, 2009
  17. Erick MattosOct 30, 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.