From: Johannes Sixt <J.Sixt@eudaptics.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH] filter-branch: Big syntax change; support rewriting multiplerefs
Date: Tue, 24 Jul 2007 11:27:49 +0200 [thread overview]
Message-ID: <46A5C615.24C24F0F@eudaptics.com> (raw)
In-Reply-To: Pine.LNX.4.64.0707231829210.14781@racer.site
Johannes Schindelin wrote:
> +# These refs should be updated if their heads were rewritten
> +
> +git rev-parse --revs-only --symbolic "$@" |
> +while read ref
> +do
> + # normalize ref
> + case "$ref" in
> + HEAD)
> + ref="$(git symbolic-ref "$ref")"
> + ;;
> + refs/*)
> + ;;
> + *)
> + ref="$(git for-each-ref --format='%(refname)' |
> + grep /"$ref")"
> + esac
> +
> + git check-ref-format "$ref" && echo "$ref"
> +done > "$tempdir"/heads
This does not work as I'd expected it: I can't successfully say:
git-filter-branch master
It tells me:
Which ref do you want to rewrite?
> +# NEEDSWORK: we should sort the unmapped refs topologically first
> +while read ref
> +do
> + sha1=$(git rev-parse "$ref"^0)
> + test -f "$workdir"/../map/$sha1 && continue
> + # Assign the boundarie(s) in the set of rewritten commits
> + # as the replacement commit(s).
> + # (This would look a bit nicer if --not --stdin worked.)
> + for p in $((cd "$workdir"/../map; ls | sed "s/^/^/") |
> + git rev-list $ref --boundary --stdin |
> + sed -n "s/^-//p")
> + do
> + map $p >> "$workdir"/../map/$sha1
> + done
> +done < "$tempdir"/heads
This logic seems to be borked, and I don't grok it. I was trying this:
git-filter-branch -- --since=2007.01.10 \
refs/heads/topic refs/heads/master
where topic's last change is from before 2007.01.10, i.e. it is not
among the rewritten commits. And I get this:
WARNING: Ref 'refs/heads/master' is unchanged
WARNING: 'refs/heads/topic' was rewritten into multiple commits:
329325526647503382ae7dee41c12fe6b81bbe43
2bdf3349b76f72ceb71755c75a555d60bc7c73aa
ce6c9dfeac5ddbd64da2d9360d6552717df81d1f
The first 2 of these 3 sha1s happen to be merge bases of topic and
master, but none of them appear anywhere in
git rev-list --parents --boundary --since=2007.07.10 \
refs/heads/topic refs/heads/master
What's up?
-- Hannes
next prev parent reply other threads:[~2007-07-24 9:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 17:34 [PATCH] filter-branch: Big syntax change; support rewriting multiple refs Johannes Schindelin
2007-07-24 5:35 ` Junio C Hamano
2007-07-24 9:10 ` Johannes Schindelin
2007-07-24 9:27 ` Johannes Sixt [this message]
2007-07-24 10:36 ` [PATCH] filter-branch: when dwim'ing a ref, only allow heads and tags Johannes Schindelin
2007-07-24 11:04 ` [PATCH] filter-branch: when dwim'ing a ref, only allow heads andtags Johannes Sixt
2007-07-24 11:20 ` Johannes Schindelin
2007-07-24 11:27 ` [PATCH] filter-branch: when dwim'ing a ref, only allow heads and tags Johannes Schindelin
2007-07-24 11:06 ` [PATCH] filter-branch: rewrite only refs which were not excluded by the options Johannes Schindelin
2007-07-24 11:23 ` [PATCH] filter-branch: rewrite only refs which were not excluded bythe options Johannes Sixt
2007-07-24 11:33 ` Johannes Schindelin
2007-07-24 13:32 ` [PATCH] filter-branch: rewrite only refs which were not excludedbythe options Johannes Sixt
2007-07-24 13:41 ` Johannes Schindelin
2007-07-24 14:08 ` Johannes Sixt
2007-07-24 14:21 ` Johannes Schindelin
2007-07-24 15:03 ` Johannes Sixt
2007-07-24 19:52 ` Johannes Schindelin
2007-07-24 13:42 ` [REVISED PATCH] filter-branch: rewrite only unexcluded refs Johannes Schindelin
2007-07-24 13:33 ` [PATCH] filter-branch: rewrite only refs which were not excludedbythe options Johannes Sixt
2007-07-24 13:46 ` Johannes Schindelin
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=46A5C615.24C24F0F@eudaptics.com \
--to=j.sixt@eudaptics.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 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.