git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Turner <David.Turner@twosigma.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: RE: [PATCH v2] clarify documentation for remote helpers
Date: Fri, 30 Aug 2019 14:33:08 +0000	[thread overview]
Message-ID: <5b44a8bd476946b4990bbcb0112757f0@exmbdft7.ad.twosigma.com> (raw)
In-Reply-To: <CAN0heSouGV+0Z+j_Th794u-RNiLLLNNEpJu__nAH38_q_TSuig@mail.gmail.com>



> -----Original Message-----
> From: Martin Ågren <martin.agren@gmail.com>
> Sent: Friday, August 30, 2019 10:09 AM
> To: David Turner <David.Turner@twosigma.com>
> Cc: Git Mailing List <git@vger.kernel.org>
> Subject: Re: [PATCH v2] clarify documentation for remote helpers
> 
> On Fri, 30 Aug 2019 at 16:00, David Turner <dturner@twosigma.com> wrote:
> >
> > Signed-off-by: David Turner <dturner@twosigma.com>
> > ---
> >  Documentation/gitremote-helpers.txt | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/gitremote-helpers.txt
> > b/Documentation/gitremote-helpers.txt
> > index 43f80c8068..f4a165387f 100644
> > --- a/Documentation/gitremote-helpers.txt
> > +++ b/Documentation/gitremote-helpers.txt
> > @@ -297,9 +297,9 @@ Supported if the helper has the "option" capability.
> >         same batch are complete. Only objects which were reported
> >         in the output of 'list' with a sha1 may be fetched this way.
> >  +
> > -Optionally may output a 'lock <file>' line indicating a file under
> > -GIT_DIR/objects/pack which is keeping a pack until refs can be
> > -suitably updated.
> > +Optionally may output a 'lock <file>' line indicating the full path
> > +of a file under $GIT_DIR/objects/pack which is keeping a pack until
> > +refs
> 
> I'd still like to suggest backticks: `$GIT_DIR/objects/pack`
> 
> > +can be suitably updated.  The path must end with ".keep".
> >  +
> >  If option 'check-connectivity' is requested, the helper must output
> > 'connectivity-ok' if the clone is self-contained and connected.
> 
> Here's how I interpret the motivation behind the patch:
> 
>   Reading the text on the optional 'lock <file>' line, it's easy to
>   believe that the filename should be given relative to
>   $GIT_DIR/objects/pack. Actually, one needs to provide the full path.
>   Also, we fail to mention that the filename must end with ".pack".
> 
> But I'd have to take your word for these two claims, since I haven't actually
> tested or dug myself. ;-)

I did test it. 

> I do wonder... If we're giving a full path which points outside of
> $GIT_DIR/objects/pack, what will happen? Will /mnt/my-packs/foo.pack work
> just as fine? If yes, then I don't see a reason to mention $GIT_DIR/objects/pack
> at all. If no, it sort of begs the question of why we don't accept relative
> filenames. (Or mandate them, but that boat has obviously sailed.) Either way,
> I'm wondering if there isn't a bug left here. What do you think?

It  does appear from code inspection that it will accept a path from anywhere.  
And then, I think, that path gets deleted (even if it does not end with ".keep"). 
Is this a "bug"?  I don't know.  I don't really understand what the feature is 
intended to be used for.  Somewhere, there ought to be an explanation of how
git is supposed to handle races during various parts of pack manipulation.
I wouldn't even be using this feature if I could just pass connectivity-ok:
https://www.spinics.net/lists/git/msg365153.html

Will wait to see if anyone has further thoughts before I file v3.

      reply	other threads:[~2019-08-30 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 13:48 [PATCH v2] clarify documentation for remote helpers David Turner
2019-08-30 14:09 ` Martin Ågren
2019-08-30 14:33   ` David Turner [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=5b44a8bd476946b4990bbcb0112757f0@exmbdft7.ad.twosigma.com \
    --to=david.turner@twosigma.com \
    --cc=git@vger.kernel.org \
    --cc=martin.agren@gmail.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.
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).