From: Erick Mattos Date: Sat, 31 Oct 2009 01:42:47 GMT Subject: Re: [PATCH] Changed timestamp behavior of options -c/-C/--amend Message-ID: <55bacdd30910301842m77cf5d7fi8389e305fd439a72@mail.gmail.com> In-Reply-To: <7vocnoe83m.fsf@alter.siamese.dyndns.org> You are completely right. All your concern is relevant and the whole problem must be re-engineered. The good news is that I have almost finished it and I will be starting a new thread with the new solution in a few minutes. Regards 2009/10/30 Junio C Hamano : > Erick Mattos writes: > >> I don't see a use for comparing the author and committer because I can >> use as template my own commits or others'. > > You _can_ use whichever irrelevant commit as a template, but "you _can_" > is different from what it means, and what is and what is not _sensible_. > > You may be rewriting somebody else's patch (e.g. fixing up a typo in the > message, or changing the implementation, or both).  If you are going to > keep the authorship, you are saying that "it is still _his_ code, not > mine".  In such a case, it never makes sense to change the timestamp, if > that author is somebody other than you.  After all that other guy may not > even be aware of what you are doing when you make this commit; he may be > in bed sound asleep in a different timezone. > > In another scenario, if your fix-up is very significant, even if you > started from somebody else's patch, you may want to say "now this is my > patch, the original author may have given me some inspiration, but the > changes in this commit, including all the bugs, are mine".  The same > applies if you looked at the problem description of somebody' patch, and > did your own solution without using anything from his commit. > > At that point, you would want the resulting commit to say it was written > by you at this moment.  You do not want to see -c/-C/--amend to retain any > part of the authorship (not just timestamp) from the original commit. > >    Side note. You may be fixing your own patch, in which case you may or >    may not consider your change significant, but at the time of either >    old timestamp or current time, you were working on this change, so >    using the current timestamp instead of using the old one is not a big >    deal, and that is why I think committer==author may be a good >    heuristic when deciding to touch or not touch the timestamp. > >    But in general I do not like such dwim that depends on who you are (it >    makes it harder to explain, even if the end result may be useful in >    practice), so I'd rather not to see such a code for this topic if we >    can avoid it. > > In short, I do not think it makes sense to change only the timestamp while > keeping the author.  The issue is not "timestamp behaviour" with "use new > timestamp" option, but rather is an ability to declare "Now this is a > commit made _by me_ and _now_; iow, I take authorship for this change", > even when you reuse the commit log message from somewhere else. > > So what is needed is an option to tell -c/-C/--amend to reuse _only_ the > message but no authorship information from the original commit, I think. >