From: Sven Verdoolaege <skimo@kotnet.org>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 6/6] Add git-rewrite-commits
Date: Fri, 13 Jul 2007 10:01:00 +0200 [thread overview]
Message-ID: <20070713080100.GN1528MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <11842671631635-git-send-email-skimo@liacs.nl>
On Thu, Jul 12, 2007 at 09:06:03PM +0200, skimo@liacs.nl wrote:
> +static int rewrite_parents(struct commit *commit, int path_pruning)
> +{
> + int n;
> + struct commit_list *list, *parents, **prev;
> + unsigned char sha1[20];
> +
> + for (n = 0, prev = &commit->parents; *prev; ++n) {
> + list = *prev;
> +
> + rewrite_parents(list->item, path_pruning);
> + if (!is_pruned(list->item, path_pruning)) {
> + prev = &list->next;
> + continue;
> + }
Oops... that should be the other way around...
diff --git a/builtin-rewrite-commits.c b/builtin-rewrite-commits.c
index d95a16c..4cd17ae 100644
--- a/builtin-rewrite-commits.c
+++ b/builtin-rewrite-commits.c
@@ -279,11 +279,11 @@ static int rewrite_parents(struct commit *commit, int path_pruning)
for (n = 0, prev = &commit->parents; *prev; ++n) {
list = *prev;
- rewrite_parents(list->item, path_pruning);
if (!is_pruned(list->item, path_pruning)) {
prev = &list->next;
continue;
}
+ rewrite_parents(list->item, path_pruning);
hashcpy(sha1, list->item->object.sha1);
get_rewritten_sha1(sha1);
I'll include it in my next version.
skimo
next prev parent reply other threads:[~2007-07-13 8:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 19:05 [PATCH 0/6] Add git-rewrite-commits v2 skimo
2007-07-12 19:05 ` [PATCH 1/6] revision: allow selection of commits that do not match a pattern skimo
2007-07-12 19:05 ` [PATCH 2/6] export get_short_sha1 skimo
2007-07-12 19:06 ` [PATCH 3/6] Define ishex(x) in git-compat-util.h skimo
2007-07-14 10:18 ` Johannes Schindelin
2007-07-12 19:06 ` [PATCH 4/6] refs.c: lock cached_refs during for_each_ref skimo
2007-07-12 19:06 ` [PATCH 5/6] revision: mark commits that didn't match a pattern for later use skimo
2007-07-12 19:06 ` [PATCH 6/6] Add git-rewrite-commits skimo
2007-07-13 8:01 ` Sven Verdoolaege [this message]
2007-07-14 12:49 ` Johannes Schindelin
2007-07-14 19:26 ` Junio C Hamano
2007-07-15 14:07 ` Sven Verdoolaege
2007-07-14 20:15 ` Sven Verdoolaege
2007-07-15 14:44 ` Sven Verdoolaege
2007-07-16 0:38 ` Johannes Schindelin
2007-07-16 10:24 ` Sven Verdoolaege
2007-07-18 11:02 ` Johannes Schindelin
2007-07-18 12:05 ` Sven Verdoolaege
2007-07-16 20:04 ` Sven Verdoolaege
2007-07-16 21:47 ` Sven Verdoolaege
2007-07-18 11:05 ` Johannes Schindelin
2007-07-18 11:17 ` Johannes Schindelin
2007-07-19 12:40 ` Sven Verdoolaege
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=20070713080100.GN1528MdfPADPa@greensroom.kotnet.org \
--to=skimo@kotnet.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=skimo@liacs.nl \
/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).