From: Yuki Kokubun <orga.chem.job@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] filter-branch: consider refs can refer to an object other than commit or tag
Date: Thu, 22 Mar 2018 14:26:10 +0000 [thread overview]
Message-ID: <5ab3bd79.d14d650a.be5c0.8544@mx.google.com> (raw)
In-Reply-To: <xmqqpo3xnqq4.fsf@gitster-ct.c.googlers.com>
> Yuki Kokubun <orga.chem.job@gmail.com> writes:
>
> >> Yuki Kokubun <orga.chem.job@gmail.com> writes:
> >>
> >> > "git filter-branch -- --all" can be confused when refs that refer to objects
> >> > other than commits or tags exists.
> >> > Because "git rev-parse --all" that is internally used can return refs that
> >> > refer to an object other than commit or tag. But it is not considered in the
> >> > phase of updating refs.
> >>
> >> Could you describe what the consequence of that is? We have a ref
> >> that points directly at a blob object, or a ref that points at a tag
> >> object that points at a blob object. The current code leaves both of
> >> these refs in "$tempdir/heads". Then...?
> >
> > Sorry, this is my wrong.
> > I wrongly thought only refs/replace can point at a blob or tree object.
>
> No need to be sorry. You still need to describe what (bad things)
> happen if we do not filter out refs that do not point at committish
> in the proposed log message.
>
> IOW, can you elaborate and clarify your "can be confused" at the
> beginning?
I meant the confusion is abnormal messages from the output of "git filter-branch -- --all".
For example, this is an output of "git filter-branch -- --all":
Rewrite bcdbd016c77df3d5641a3cf820b2ed46ba7bf3b4 (5/5) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
WARNING: Ref 'refs/heads/no-newline' is unchanged
WARNING: Ref 'refs/heads/original' is unchanged
error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit
error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit
fatal: ambiguous argument 'refs/replace/8a2016f3730cad8309c110f819c855403ed0a5b9^0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
WARNING: Ref 'refs/replace/8a2016f3730cad8309c110f819c855403ed0a5b9' is unchanged
WARNING: Ref 'refs/tags/add-file' is unchanged
WARNING: Ref 'refs/tags/file' is unchanged
error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit
error: object 1bf53b49c26465454e4ac377f2ed3f91bb1d6ac1 is a tree, not a commit
fatal: ambiguous argument 'refs/tags/treetag^0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
WARNING: Ref 'refs/tags/treetag' is unchanged
You can see a lot of terrible messages such as "error" and "fatal".
But on the whole, the result of "git filter-branch -- --all" is not so abnormal.
So, this is a just problem about abonormal messages.
I think this messages should be suppressed.
How do you feel about it?
next prev parent reply other threads:[~2018-03-22 14:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 10:35 [PATCH] filter-branch: consider refs/replace can refer to an object other than commit Yuki Kokubun
2018-03-21 15:31 ` [PATCH] filter-branch: consider refs can refer to an object other than commit or tag Yuki Kokubun
2018-03-21 17:21 ` Junio C Hamano
2018-03-21 20:00 ` Yuki Kokubun
2018-03-21 20:00 ` Junio C Hamano
2018-03-22 14:26 ` Yuki Kokubun [this message]
2018-03-22 17:01 ` Junio C Hamano
2018-03-23 2:15 ` Yuki Kokubun
2018-03-23 5:09 ` [PATCH v2] filter-branch: fix errors caused by refs that cannot be used with ^0 Yuki Kokubun
2018-03-23 20:20 ` Junio C Hamano
2018-03-24 19:29 ` [PATCH] filter-branch: consider refs can refer to an object other than commit or tag Yuki Kokubun
2018-03-24 19:41 ` [PATCH v3] filter-branch: fix errors caused by refs that point at non-committish Yuki Kokubun
2018-03-25 16:25 ` Junio C Hamano
2018-03-25 16:39 ` Yuki Kokubun
2018-03-25 20:24 ` Junio C Hamano
2018-03-25 16:54 ` [PATCH v4] " Yuki Kokubun
2018-03-25 16:45 ` Yuki Kokubun
2018-04-08 23:10 ` Junio C Hamano
2018-03-25 17:01 ` [PATCH v5] " Yuki Kokubun
2018-03-25 17:13 ` [PATCH v4] " Junio C Hamano
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=5ab3bd79.d14d650a.be5c0.8544@mx.google.com \
--to=orga.chem.job@gmail.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.