git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erick Mattos <erick.mattos@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Changed timestamp behavior of options -c/-C/--amend
Date: Fri, 30 Oct 2009 23:42:47 -0200	[thread overview]
Message-ID: <55bacdd30910301842m77cf5d7fi8389e305fd439a72@mail.gmail.com> (raw)
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 <gitster@pobox.com>:
> Erick Mattos <erick.mattos@gmail.com> 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.
>

  reply	other threads:[~2009-10-31  1:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30 19:36 [PATCH] Changed timestamp behavior of options -c/-C/--amend Erick Mattos
2009-10-30 20:26 ` Jeff King
2009-10-30 21:22   ` Erick Mattos
2009-10-30 21:51   ` Junio C Hamano
2009-10-30 22:10   ` Johannes Sixt
2009-10-31 23:34   ` Paolo Bonzini
2009-10-30 21:34 ` Junio C Hamano
2009-10-30 21:58   ` Junio C Hamano
2009-10-30 22:20     ` Erick Mattos
2009-10-30 22:33       ` Junio C Hamano
2009-10-30 23:12         ` Erick Mattos
2009-10-31  0:10           ` Junio C Hamano
2009-10-31  1:42             ` Erick Mattos [this message]
     [not found]   ` <55bacdd30910301505xe712b74m837dc862a6ee953@mail.gmail.com>
2009-10-30 22:13     ` Erick Mattos
2009-10-30 22:26       ` Junio C Hamano
2009-10-30 22:30         ` Erick Mattos
2009-10-30 21:56 ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55bacdd30910301842m77cf5d7fi8389e305fd439a72@mail.gmail.com \
    --to=erick.mattos@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).