From: Peter Rosin <peda@lysator.liu.se>
To: git@vger.kernel.org
Cc: Peter Rosin <peda@lysator.liu.se>
Subject: [PATCH] git filter-branch: Process commits in --date-order
Date: Tue, 3 Mar 2009 00:10:54 +0100 [thread overview]
Message-ID: <1236035454-12236-1-git-send-email-peda@lysator.liu.se> (raw)
When converting an svn repository to git, I am filtering the commits
using --msg-filter. During this conversion I want to use the
.git-rewrite/map data to fill in references to other commits. In the
svn repo, there is a commit message e.g. "Cherry-pick r207", and I
want to append "r207 = <commit>" to the git commit message, as r207
no longer means very much. This works fine when the git commit
corresponding to r207 has been filtered before the current commit, and
is present in the map. When filtering in --topo-order, this is not
always the case, making it impossible to look up the git commit.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
---
git-filter-branch.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 9a09ba1..dbb2bb3 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -257,11 +257,11 @@ mkdir ../map || die "Could not create map/ directory"
case "$filter_subdir" in
"")
- git rev-list --reverse --topo-order --default HEAD \
+ git rev-list --reverse --date-order --default HEAD \
--parents --simplify-merges "$@"
;;
*)
- git rev-list --reverse --topo-order --default HEAD \
+ git rev-list --reverse --date-order --default HEAD \
--parents --simplify-merges "$@" -- "$filter_subdir"
esac > ../revs || die "Could not get the commits"
commits=$(wc -l <../revs | tr -d " ")
--
1.6.0.4
next reply other threads:[~2009-03-03 0:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 23:10 Peter Rosin [this message]
2009-03-03 0:28 ` [PATCH] git filter-branch: Process commits in --date-order Johannes Schindelin
2009-03-03 0:39 ` Peter Rosin
2009-03-03 0:51 ` Junio C Hamano
2009-03-03 7:41 ` 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=1236035454-12236-1-git-send-email-peda@lysator.liu.se \
--to=peda@lysator.liu.se \
--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 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).