From: Junio C Hamano <gitster@pobox.com>
To: "Grégory Pakosz" <gpakosz@visionobjects.com>
Cc: git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>
Subject: Re: git filter-branch doesn't dereference annotated tags
Date: Tue, 01 Jan 2013 13:04:24 -0800 [thread overview]
Message-ID: <7vk3rwaa3r.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAC_01E3VWtsFd8ww+7W8DMhRAs4WgHf=bm+xoh9wszCkb-DfUA@mail.gmail.com> ("Grégory Pakosz"'s message of "Tue, 1 Jan 2013 21:20:14 +0100")
Grégory Pakosz <gpakosz@visionobjects.com> writes:
> Are you suggesting $sha1 should be obtained differently before
> entering case "$rewritten" ?
> That would mean changing sha1=$(git rev-parse "$ref"^0) at line 376 to
> something like $(git cat-file -t "$ref") = 'tag' && sha1=$(git
> rev-parse "$ref") || sha1=$(git rev-parse "$ref^0") ?
I was wondering if it should be
sha1=$(git rev-parse --verify "$ref")
or something that does not dereference a tag at all.
The way I read what that loop seems to want to do is:
Read each refname that was given originally from the file
$tempdir/heads, find out the object it used to refer to and
have it in $sha1, find out what new object the object was
rewritten to and have it in $rewritten, and:
(1) if the rewrite left the object unchanged, do nothing but
warn users just in case this was a mistake;
(2) if the rewrite told us to remove it, then delete the
ref; or
(3) if the rewrite gave us a new object, replace the ref to
point to that new one.
And in the latter two cases, save the original one in
$orig_namespace so that the user can choose to recover if
this filter-branch was done by mistake.
So I do not think unwraping the ref at that point makes any sense,
unless it is not prepared to handle annotated tags at all by
unwrapping tags too early.
What am I missing?
next prev parent reply other threads:[~2013-01-01 21:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-31 16:24 git filter-branch doesn't dereference annotated tags Grégory Pakosz
2012-12-31 18:31 ` Junio C Hamano
2013-01-01 13:11 ` Grégory Pakosz
2013-01-01 19:49 ` Junio C Hamano
2013-01-01 20:20 ` Grégory Pakosz
2013-01-01 21:04 ` Junio C Hamano [this message]
2013-01-02 22:03 ` Grégory Pakosz
2013-01-02 23:19 ` Junio C Hamano
2013-01-03 9:38 ` Johannes Sixt
2013-01-03 9:50 ` Grégory Pakosz
2013-01-03 10:33 ` Johannes Sixt
2013-01-03 20:52 ` Brandon Casey
2013-01-01 12:30 ` Johannes Sixt
-- strict thread matches above, loose matches on Subject: below --
2012-12-31 14:36 Grégory Pakosz
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk3rwaa3r.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gpakosz@visionobjects.com \
--cc=j6t@kdbg.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).