git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ping Yin" <pkufranky@gmail.com>
To: "Matthias Kestenholz" <mk@spinlock.ch>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Why 'git commit --amend' generates different HEAD sha1 each time when no content changes
Date: Sun, 30 Dec 2007 19:20:04 +0800	[thread overview]
Message-ID: <46dff0320712300320n3d12edf9oedc36777a226528b@mail.gmail.com> (raw)
In-Reply-To: <1199012360.15996.6.camel@futex>

On Dec 30, 2007 6:59 PM, Matthias Kestenholz <mk@spinlock.ch> wrote:
>
> On Sun, 2007-12-30 at 18:56 +0800, Ping Yin wrote:
> > AFAIK, commit sha1 is only determined by commit object content (say
> > parent commit, tree sha1 and so on). So why 'git commit --amend'
> > changes the commit sha1 when no content changes as following shows.
> >
> The full commit includes a timestamp too, which changed. Try setting the
> GIT_AUTHOR_DATE and GIT_COMMITTER_DATE environment variables, you should
> get the same SHA-1 everytime.
>

Thanks. With 'git show --pretty=fuller', I find that commit date
changes each time and that author date keeps the same.



-- 
Ping Yin

      parent reply	other threads:[~2007-12-30 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-30 10:56 Why 'git commit --amend' generates different HEAD sha1 each time when no content changes Ping Yin
     [not found] ` <1199012360.15996.6.camel@futex>
2007-12-30 11:19   ` Ping Yin
2007-12-30 11:20   ` Ping Yin [this message]

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=46dff0320712300320n3d12edf9oedc36777a226528b@mail.gmail.com \
    --to=pkufranky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mk@spinlock.ch \
    /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).