From: Junio C Hamano <gitster@pobox.com>
To: Yuki Kokubun <orga.chem.job@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] filter-branch: fix errors caused by refs that cannot be used with ^0
Date: Fri, 23 Mar 2018 13:20:22 -0700 [thread overview]
Message-ID: <xmqqvadmilx5.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180323050913.5188-1-orga.chem.job@gmail.com> (Yuki Kokubun's message of "Fri, 23 Mar 2018 05:09:13 +0000")
Yuki Kokubun <orga.chem.job@gmail.com> writes:
> "git filter-branch -- --all" print unwanted error messages when refs that
> cannot be used with ^0 exist.
It is not incorrect per-se, but if I were writing this, I'd say
"... when refs that point at objects that are not committish" or
something like that, as that is much closer to people (both end
users and Git developers) than the "^0" implementation detail.
> Such refs can be created by "git replace" with
> trees or blobs. Also, "git tag" with trees or blobs can create such refs.
Taking two paragraphs above together, you wrote an excellent
description of the problem to be solved (i.e. what would be seen by
users and under what condition the symptom would trigger). If there
is a single obvious solution that would trivially follow from the
problem description, it is perfectly fine to stop here. Otherwise,
it would help to describe how it is solved next. Something as brief
like
Filter these problematic refs out early, and warn that these
refs are left unwritten while doing so.
would suffice in this case, I think. We _could_ insert
before they are seen by the logic to see which refs have
been modified and which have been left intact (which is
where the unwanted error messages come from),
between "early," and "and warn", if we wanted to.
> ---
> git-filter-branch.sh | 14 ++++++++++++--
> t/t7003-filter-branch.sh | 14 ++++++++++++++
> 2 files changed, 26 insertions(+), 2 deletions(-)
The diff looks good.
Please sign-off your patch (cf. Documentation/SubmittingPatches).
Thanks.
next prev parent reply other threads:[~2018-03-23 20:20 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
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 [this message]
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
2018-03-24 19:29 ` [PATCH] filter-branch: consider refs can refer to an object other than commit or tag Yuki Kokubun
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=xmqqvadmilx5.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=orga.chem.job@gmail.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.
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).