Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:38

Jeff King [off-list ref] writes:
On Fri, Oct 30, 2009 at 05:36:34PM -0200, Erick Mattos wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help