Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-29 Thread Junio C Hamano
Eric Rannaud writes: > On Thu, Sep 28, 2017 at 8:51 PM, Junio C Hamano wrote: >> I think that your patch the last round that feeds fd#8 in the >> foreground (i.e. fully trusting that the caller is sensibly giving >> input that produces no output) is

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Eric Rannaud
On Thu, Sep 28, 2017 at 8:51 PM, Junio C Hamano wrote: > I think that your patch the last round that feeds fd#8 in the > foreground (i.e. fully trusting that the caller is sensibly giving > input that produces no output) is already a good place to stop. > > Your patch this

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Junio C Hamano
"Eric Rannaud" writes: > Junio, this last version addresses your last remark regarding the > potential for the cat $input_file sequence to block when the FIFOs are > unbuffered. > > The concern is mainly theoretical (*if* the shell function is used > correctly):

[PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Eric Rannaud
The checkpoint command cycles packfiles if object_count != 0, a sensible test or there would be no pack files to write. Since 820b931012, the command also dumps branches, tags and marks, but still conditionally. However, it is possible for a command stream to modify refs or create marks without

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Eric Rannaud
On Thu, Sep 28, 2017 at 5:59 AM, Adam Dinwoodie wrote: > On Wed, Sep 27, 2017 at 10:07:41PM -0700, Eric Rannaud wrote: >> >> Also adding the necessary PIPE prereq, as pointed out by Ramsay Jones. > > Cygwin doesn't have the PIPE prereq; I've just confirmed that the > previous

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Eric Rannaud
On Wed, Sep 27, 2017 at 11:02 PM, Junio C Hamano wrote: > Eric Rannaud writes: > >> Doesn't fast-import get a copy of 8 (open for both reading and >> writing), as a child process, and exec 8>&- only closes the copy of >> the file descriptor in the parent

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-28 Thread Junio C Hamano
Eric Rannaud writes: > Doesn't fast-import get a copy of 8 (open for both reading and > writing), as a child process, and exec 8>&- only closes the copy of > the file descriptor in the parent shell, so the named pipe remains > open for writing somewhere (in the fast-import

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-27 Thread Eric Rannaud
On Wed, Sep 27, 2017 at 8:48 PM, Junio C Hamano wrote: >> + cat $input_file >&8 > > It probably is a good idea to quote "$input_file" in case other > people later use a full path to the file or something; for now this > is OK. Right. > fd#8 at this point does not have a

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-27 Thread Junio C Hamano
"Eric Rannaud" writes: > diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh > index 67b8c50a5ab4..9aa3470d895b 100755 > --- a/t/t9300-fast-import.sh > +++ b/t/t9300-fast-import.sh > @@ -3120,4 +3120,133 @@ test_expect_success 'U: validate root delete result' ' >

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-27 Thread Ramsay Jones
On 27/09/17 20:46, Eric Rannaud wrote: > The checkpoint command cycles packfiles if object_count != 0, a sensible > test or there would be no pack files to write. Since 820b931012, the > command also dumps branches, tags and marks, but still conditionally. > However, it is possible for a command

[PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-27 Thread Eric Rannaud
The checkpoint command cycles packfiles if object_count != 0, a sensible test or there would be no pack files to write. Since 820b931012, the command also dumps branches, tags and marks, but still conditionally. However, it is possible for a command stream to modify refs or create marks without

Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-25 Thread Junio C Hamano
"Eric Rannaud" writes: > The checkpoint command cycles packfiles if object_count != 0, a sensible > test or there would be no pack files to write. Since 820b931012, the > command also dumps branches, tags and marks, but still conditionally. > However, it is possible for a

[PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-25 Thread Eric Rannaud
The checkpoint command cycles packfiles if object_count != 0, a sensible test or there would be no pack files to write. Since 820b931012, the command also dumps branches, tags and marks, but still conditionally. However, it is possible for a command stream to modify refs or create marks without