git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Bryan Turner <bturner@atlassian.com>
Cc: Git Users <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: Unexpected cat-file --batch-check output
Date: Wed, 27 Oct 2021 10:08:11 +0200	[thread overview]
Message-ID: <ad21b3f5-d352-64f4-0dd2-5ad1e839193a@kdbg.org> (raw)
In-Reply-To: <CAGyf7-Gaphb9q=4cyT0BQa7oYGKXQQsU-XfqvoxfDyijehJO3Q@mail.gmail.com>

Am 27.10.21 um 01:58 schrieb Bryan Turner:
> $ /usr/bin/git rev-parse refs/heads/develop
> 28a05ce2e3079afcb32e4f1777b42971d7933a91
> $ /usr/bin/git rev-parse refs/heads/develop:path/to/parent/file
> cc10f4b278086325aab2f95df97c807c7c6cd75e
> 
> So it looks like rev-parse and cat-file --batch-check both exhibit the
> same behavior.
> 
> I also had them expand their cat-file --batch-check to include another
> file in the same "path/to/parent" directory:
> $ echo 'refs/heads/develop
> refs/heads/develop:path/to/parent/sibling
> refs/heads/develop:path/to/parent/file' | /usr/bin/git cat-file --batch-check
> 28a05ce2e3079afcb32e4f1777b42971d7933a91 commit 259
> 2bfe7b4b7c7cdeb9653801d99b65dfefe5780dda blob 897
> cc10f4b278086325aab2f95df97c807c7c6cd75e commit 330
> 
> So the "sibling" file in the same directory comes out as a "blob", as expected.
> 
> They also ran an ls-tree for the directory without any globs:
> # /usr/bin/git ls-tree refs/heads/develop:path/to/parent
> 100644 blob 2bfe7b4b7c7cdeb9653801d99b65dfefe5780dda    sibling
> 100644 blob 4c8d566ed80a1554a059b97f7cd533a55bbd2ea8    file

Just a shot in the dark: what happens when you use /usr/bin/git
--no-replace-objects?

-- Hannes

      parent reply	other threads:[~2021-10-27  8:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 19:02 Unexpected cat-file --batch-check output Bryan Turner
2021-10-25 19:18 ` Jeff King
2021-10-25 21:48   ` Bryan Turner
2021-10-26 23:58   ` Bryan Turner
2021-10-27  1:28     ` Jeff King
2021-10-27  8:08     ` Johannes Sixt [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

  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=ad21b3f5-d352-64f4-0dd2-5ad1e839193a@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).