git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 0/2] index-pack out-of-repo fixups
Date: Thu, 31 May 2018 18:39:01 -0400	[thread overview]
Message-ID: <20180531223901.GA18999@sigill.intra.peff.net> (raw)

Coverity reported that the recently-added call to add_packed_git() in
index-pack.c actually does nothing. It's right, and it turns out this is
a minor bug in the .gitmodules fsck patches in v2.17.1. I say minor
because it errs on the side of complaining too much (so it's not a
security problem) and it comes up only in what I can imagine is a pretty
obscure case.

The second patch here fixes that. But while looking into it, I notice a
much older breakage in running "index-pack --strict" outside of a
repository entirely. That's fixed by the first patch.

  [1/2]: prepare_commit_graft: treat non-repository as a noop
  [2/2]: index-pack: handle --strict checks of non-repo packs

 builtin/index-pack.c       |  8 ++++++--
 commit.c                   |  3 +++
 t/t5300-pack-object.sh     |  6 ++++++
 t/t7415-submodule-names.sh | 10 ++++++++++
 4 files changed, 25 insertions(+), 2 deletions(-)

-Peff

             reply	other threads:[~2018-05-31 22:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 22:39 Jeff King [this message]
2018-05-31 22:42 ` [PATCH 1/2] prepare_commit_graft: treat non-repository as a noop Jeff King
2018-05-31 22:45 ` [PATCH 2/2] index-pack: handle --strict checks of non-repo packs Jeff King

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=20180531223901.GA18999@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@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.
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).