Git development
 help / color / mirror / Atom feed
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Colin Stagner <ask+git@howdoi.land>,
	Johannes  Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 1/2] git-subtree: Bail out if we find output from Rust rewrite
Date: Mon, 6 Jul 2026 16:03:12 +0100	[thread overview]
Message-ID: <27211.50096.133710.528147@chiark.greenend.org.uk> (raw)
In-Reply-To: <xmqqy0fob2kl.fsf@gitster.g>

Hi.  Thanks for the quick review.

Junio C Hamano writes ("Re: [PATCH 1/2] git-subtree: Bail out if we find output from Rust rewrite"):
> If (global) $rev is not set here, we'd check :.git-subtree/config in
> the index in order to detect the v2's configuration.  It seems to me
> that this code however wants to inspect HEAD's tree.

This was a slip.  The code in reject_if_v2_config is supposed to use
its argument (as per the usage comment I added), not a global.  I'll
fix this with a respin.

(I think it may somehow work by accident in my tests.)

> The above helper may work for one caller that passes "$rev" but not
> for the other caller that passes "HEAD", no?

HEAD is a valid revision spec for git-rev-parse, but the
function should use $1 (which in that case would be HEAD), not $rev.

> 	if git rev-parse --verify -q "$1:$config"
> 	then
> 		die "fatal: tree contains $config: has been processed with new standalone (Rust) git-subtree; use that tool instead of this one.  See https://codeberg.org/diziet/git-subtree https://crates.io/crates/git-subtree"
> 	fi
> 
> Overly long output does not look very easy to read, but I kept it
> the same as the original.

I'm not a great fan of the long error message myself, but it seemed to
be what the rest of the script was doing.  I didn't find any
multi-line calls to die, so that's why I did it this way.

I'm happy to reformat this to your taste.

Thanks,
Ian.

-- 
Ian Jackson <ijackson@chiark.greenend.org.uk>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

  reply	other threads:[~2026-07-06 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 11:58 [PATCH 0/2] git-subtree: Bail out if we find output from Rust rewrite Ian Jackson
2026-07-06 11:58 ` [PATCH 1/2] " Ian Jackson
2026-07-06 14:44   ` Junio C Hamano
2026-07-06 15:03     ` Ian Jackson [this message]
2026-07-06 20:16       ` Junio C Hamano
2026-07-06 11:58 ` [PATCH 2/2] git-subtree: Bail out if we find output from Rust rewrite (test) Ian Jackson

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=27211.50096.133710.528147@chiark.greenend.org.uk \
    --to=ijackson@chiark.greenend.org.uk \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ask+git@howdoi.land \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox