git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Glen Choo via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Taylor Blau <me@ttaylorr.com>, Glen Choo <chooglen@google.com>
Subject: Re: [PATCH] object-file: use real paths when adding alternates
Date: Thu, 17 Nov 2022 16:54:37 -0500	[thread overview]
Message-ID: <Y3atneCCAA4fMFKL@nand.local> (raw)
In-Reply-To: <pull.1382.git.git.1668706274099.gitgitgadget@gmail.com>

On Thu, Nov 17, 2022 at 05:31:13PM +0000, Glen Choo via GitGitGadget wrote:
> From: Glen Choo <chooglen@google.com>
>
> When adding an alternate ODB, we check if the alternate has the same
> path as the object dir, and if so, we do nothing. However, that
> comparison does not resolve symlinks. This makes it possible to add the
> object dir as an alternate, which may result in bad behavior. For
> example, it can trick "git repack -a -l -d" (possibly run by "git gc")
> into thinking that all packs come from an alternate and delete all
> objects.

Nice find and fix. Looks like Peff had a couple of good suggestions
which I'd like to see incorporated into another version before we pick
this up.

Otherwise, looking at the patch myself, it seems obviously good. Thanks
for working on it.


Thanks,
Taylor

  parent reply	other threads:[~2022-11-17 21:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 17:31 [PATCH] object-file: use real paths when adding alternates Glen Choo via GitGitGadget
2022-11-17 18:47 ` Jeff King
2022-11-17 19:41   ` Ævar Arnfjörð Bjarmason
2022-11-17 21:57     ` Jeff King
2022-11-17 22:03       ` Taylor Blau
2022-11-18  0:00       ` Glen Choo
2022-11-17 21:54 ` Taylor Blau [this message]
2022-11-21 23:49 ` [PATCH v2] " Glen Choo via GitGitGadget
2022-11-22  0:56   ` Ævar Arnfjörð Bjarmason
2022-11-22 19:53     ` Jeff King
2022-11-24  0:50       ` Glen Choo
2022-11-24  1:06         ` Jeff King
2022-11-24  0:20     ` Glen Choo
2022-11-22 19:40   ` Jeff King
2022-11-24  0:55   ` [PATCH v3] " Glen Choo via GitGitGadget
2022-11-24  1:08     ` Jeff King
2022-11-25  6:51       ` Junio C Hamano

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=Y3atneCCAA4fMFKL@nand.local \
    --to=me@ttaylorr.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --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).