Re: [PATCH 1/3] Call extended-semantics commands through variables.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/3] Call extended-semantics commands through variables.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:18

Jason Riedy [off-list ref] writes:
The variables are just XARGS, FIND, and CPIO.  No GIT_
was appended so a user can set those once for all scripts
that may use them (e.g. configure).  A follow-on patch
will modify the Makefile to allow installation-specific
defaults.
The use of FIND or CPIO in git clone does not need -0 (and the
code does not use -0, nor your patch adds -0), so you should not
have to override them this way.  Except refnames, the file names
are not something under arbitrary user control and usual LF
termination would work fine.  Even refnames cannot contain LF in
them.  Same thing for FIND in ls-remote and git-push.

FIND in count-objects only lists .git/objects/?? so filenames
there are already well-behaved and you do not need -0 there for
FIND nor XARGS.  Same thing for XARGS in git-prune.sh and FIND
in repack (BTW, you got count-objects one wrong; there is a
leftover GIT_FIND there).

Although most of what your patch does seems to be unnecessary,
reviewing this patch gave me an opportunity to see if we fail to
use -0 where we should, and I am grateful for it.

I did not see any place we did not use -0 when we should, except
one.  The places we _do_ use -0 currently should be converted
with something like your patch to use -0 capable version of the
tool.

The exception is where finding refnames from rsync'ed copy of a
remote (the remote may have screwed-up refnames just to be
hostile), but nobody should be using rsync transfer anyway,
so...

Re: [PATCH 1/3] Call extended-semantics commands through variables.

From: Jason Riedy <hidden>
Date: 2016-06-15 22:42:18

And Junio C Hamano writes:
 - The use of FIND or CPIO in git clone does not need -0 (and the
 - code does not use -0, nor your patch adds -0), so you should not
 - have to override them this way.

I'm not sure what's up with cpio, but git causes pkgsrc's 
default cpio to segfault on my Solaris machines.  It's 
easier to point CPIO at a different cpio than debug a 
utility I've never really used.  ;)  I thought it was
git-clone breaking in the tests, but it could have been
git-merge.  I'll check again when I get a chance.

And I worry about using different programs in different 
scripts, so I just changed all of them.

 - (BTW, you got count-objects one wrong; there is a leftover 
 - GIT_FIND there).

Friday afternoon patching, sorry.  That also means either 
that count-objects has no test cases or that branch of it 
is not exercised by tests.

 - The places we _do_ use -0 currently should be converted
 - with something like your patch to use -0 capable version of the
 - tool.

Again, I'm not very comfortable using different finds or 
xargs in different places.  But if you want, I'll re-do the
patch with just those locations changed, and I'll double-
check which cpio invocation is breaking.

 - [...] but nobody should be using rsync transfer anyway,
 - so...

Is there a better way of grabbing all the tags now?  I haven't
kept track, as I haven't had to do that in a while.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help