From: bill lam <cbill.lam@gmail.com>
To: git <git@vger.kernel.org>
Subject: meaning of HEAD in context of filter-branch
Date: Sun, 11 Oct 2009 10:43:57 +0800 [thread overview]
Message-ID: <20091011024357.GA9021@debian.b2j> (raw)
I tried to process some files that changed between each commit using
the command
git filter-branch --tree-filter 'git diff --name-only HEAD^.. | foo
however it seems that HEAD is fixed to mean the HEAD of the current
tip before starting git-filter-branch, by trying like this
$ git rev-list -1 HEAD^
2bf95faed2d51c338ea6fa93e7bb6cc9c1bc759b
git filter-branch --tree-filter 'git rev-list -1 HEAD^ >>/tmp/sha' -- --all
$ cat /tmp/sha
2bf95faed2d51c338ea6fa93e7bb6cc9c1bc759b
2bf95faed2d51c338ea6fa93e7bb6cc9c1bc759b
2bf95faed2d51c338ea6fa93e7bb6cc9c1bc759b
2bf95faed2d51c338ea6fa93e7bb6cc9c1bc759b
how to get the HEAD during filter-branch or other workaround?
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
next reply other threads:[~2009-10-11 2:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 2:43 bill lam [this message]
2009-10-11 9:38 ` meaning of HEAD in context of filter-branch Andreas Schwab
2009-10-12 10:41 ` bill lam
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=20091011024357.GA9021@debian.b2j \
--to=cbill.lam@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.