mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Hamdy Abou El Anein <info@daylightlinux.ch>
Cc: Hamdy Abou El Anein <hamdy.aea@protonmail.com>,
	linux-kernel@vger.kernel.org, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH] scripts: git-resolve: ignore non-commit objects
Date: Tue,  3 Nov 2026 12:26:26 -0500	[thread overview]
Message-ID: <20261103172629.1393309-1-sashal@kernel.org> (raw)
In-Reply-To: <20261103164202.129624-1-info@daylightlinux.ch>

On Tue, Nov 03, 2026 at 05:42:02PM +0100, Hamdy Abou El Anein wrote:
>git rev-parse --disambiguate lists objects of every type. A unique blob
>or tree prefix is therefore returned successfully as a commit ID. Such
>an ID cannot be used as a commit reference or Fixes tag.
>
>Filter the candidates by object type before deciding whether the prefix
>is unique or looking up its subject.

This also fixes a more common case: an abbreviated ID that collides only
with trees or blobs used to fail unless a subject was given. 117 of the
last 2000 commits in linux.git have a 7 character abbreviation like that.

The argument check at the bottom of the script still counts every object
type, so a prefix that matches only a blob now exits 1 without printing
the "does not match any git commit" error. Could you send a follow-up
that filters that check the same way?

Acked-by: Sasha Levin <sashal@kernel.org>

-- 
Thanks,
Sasha

      reply	other threads:[~2026-11-03 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 16:42 Hamdy Abou El Anein
2026-11-03 17:26 ` Sasha Levin [this message]

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=20261103172629.1393309-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hamdy.aea@protonmail.com \
    --cc=info@daylightlinux.ch \
    --cc=linux-kernel@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®