Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread Torsten Bögershausen
On 04.10.15 20:06, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > The stats command works differently on OS X compared to Linux. Detect > OS X and execute the appropriate assertions. > Is there a special need to use the stat() function at all ? That's what

Re: [PATCH v5 2/3] path: optimize common dir checking

2015-10-04 Thread Michael Haggerty
On 09/01/2015 04:13 AM, David Turner wrote: > Instead of a linear search over common_list to check whether > a path is common, use a trie. The trie search operates on > path prefixes, and handles excludes. Here I am, coming late to the discussion as usual. Sorry for that. I dug into this code

[PATCH 3/3] init: use strbufs to store paths

2015-10-04 Thread Jeff King
The init code predates strbufs, and uses PATH_MAX-sized buffers along with many manual checks on intermediate sizes (some of which make magic assumptions, such as that init will not create a path inside .git longer than 50 characters). We can simplify this greatly by using strbufs, which drops

[PATCH 2/3] probe_utf8_pathname_composition: use internal strbuf

2015-10-04 Thread Jeff King
When we are initializing a .git directory, we may call probe_utf8_pathname_composition to detect utf8 mangling. We pass in a path buffer for it to use, and it blindly strcpy()s into it, not knowing whether the buffer is large enough to hold the result or not. In practice this isn't a big deal,

Re: [PATCH v2 02/43] refs: make repack_without_refs and is_branch public

2015-10-04 Thread Michael Haggerty
On 09/29/2015 12:01 AM, David Turner wrote: > Signed-off-by: Ronnie Sahlberg > Signed-off-by: David Turner > --- > refs.c | 9 + > refs.h | 13 + > 2 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/refs.c

Re: [PATCH 41/68] init: use strbufs to store paths

2015-10-04 Thread Jeff King
On Sun, Oct 04, 2015 at 08:31:31AM +0200, Torsten Bögershausen wrote: > > That is the original signature, before my sprintf series. I do not mind > > leaving that as-is, and simply cleaning up probe_utf8_pathname_composition > > by using a strbuf internally there. Though I have to wonder if it

[PATCH 1/3] precompose_utf8: drop unused variable

2015-10-04 Thread Jeff King
The result of iconv is assigned to a variable, but we never use it (instead, we check errno and whether the function consumed all bytes). Let's drop the assignment, as it triggers gcc's -Wunused-but-set-variable. Signed-off-by: Jeff King --- This is obviously completely optional;

Re: [PATCH v2 01/43] refs.c: create a public version of verify_refname_available

2015-10-04 Thread Michael Haggerty
On 09/29/2015 12:01 AM, David Turner wrote: > From: Ronnie Sahlberg > > Create a public version of verify_refname_available that backends can > provide. > > Signed-off-by: Ronnie Sahlberg > Signed-off-by: David Turner > --- >

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Matthieu Moy
Junio C Hamano writes: > On Sat, Oct 3, 2015 at 3:23 PM, Roberto Tyley wrote: >> >> Given this, enabling Travis CI for git/git seems pretty low risk, >> are there any strong objections to it happening? > > I still don't see a reason why git/git needs

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Dennis Kaarsemaker
On za, 2015-10-03 at 18:37 -0700, Junio C Hamano wrote: > If somebody says "I've been maintaining a clone of git/git with > Travis webhooks enabled and as the result caught this many glitches > during the past two months without any ill side effect. I've been maintaining a clone of git/git with a

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Johannes Schindelin
Hi Junio, On 2015-10-04 03:37, Junio C Hamano wrote: > Junio C Hamano writes: > >> On Sat, Oct 3, 2015 at 3:23 PM, Roberto Tyley >> wrote: >>> >>> Given this, enabling Travis CI for git/git seems pretty low risk, >>> are there any strong objections

Re: [PATCH 1/9] ref-filter: implement %(if), %(then), and %(else) atoms

2015-10-04 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> My take on it: >> >> Implement %(if), %(then) and %(else) atoms. Used as >> %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the >> format string between %(if) and %(then)

Re: [PATCH v2 01/43] refs.c: create a public version of verify_refname_available

2015-10-04 Thread Torsten Bögershausen
On 2015-10-03 18.50, David Turner wrote: > On Sat, 2015-10-03 at 07:02 +0200, Torsten Bögershausen wrote: >> On 29.09.15 00:01, David Turner wrote: >> (Not sure if this is the right thread to report on) >> >> In file included from builtin/commit.c:20: >> ./refs.h:695:16: warning: redefinition of

Re: Git feature request: mark a commit as minor

2015-10-04 Thread Jacob Keller
On Fri, Oct 2, 2015 at 11:44 PM, Felipe Micaroni Lalli wrote: > Actually we already use the keyword MINOR for that, exactly as you said. > > The suggestion was made because I think it is a common behavior and it > would be nice to be a meta info to standardize this (today

Re: [PATCH 41/68] init: use strbufs to store paths

2015-10-04 Thread Torsten Bögershausen
On 2015-10-04 05.37, Jeff King wrote: > On Sat, Oct 03, 2015 at 11:12:13PM +0200, Torsten Bögershausen wrote: > >>> Hmph, Peff's quick-fix passed the original "CoNfIg" in directly >>> to probe_utf8_pathname_composition() without changing its signature. >> True, ( I was thinking that the test

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-04 Thread Johannes Schindelin
Hi Max, On 2015-10-02 21:21, Max Kirillov wrote: > On Fri, Oct 02, 2015 at 12:13:40PM +0200, Johannes Schindelin wrote: >> On 2015-10-02 12:05, Johannes Schindelin wrote: >> >> > On 2015-10-01 05:29, Max Kirillov wrote: When a builtin has done its job, but waits for pager or not waited

Re: [PATCH 3/9] ref-filter: add support for %(path) atom

2015-10-04 Thread Karthik Nayak
On Sat, Oct 3, 2015 at 3:32 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> This adds %(path) and %(path:short) atoms. The %(path) atom will print >> the path of the given ref, while %(path:short) will only print the >> subdirectory of

Re: [PATCH 1/9] ref-filter: implement %(if), %(then), and %(else) atoms

2015-10-04 Thread Junio C Hamano
Matthieu Moy writes: >> I found all the suggestions very good, except that the distinction >> between "expands to" and "is printed" bothers me a bit, as they want >> to mean exactly the same thing (imagine this whole thing were inside >> another %(if)...%(then)). >

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: >> >> I still don't see a reason why git/git needs to be the one that is >> used, > > The very nice thing with Travis-CI is that it does not only test the > repository's branches, but also all

Re: [PATCH 1/9] ref-filter: implement %(if), %(then), and %(else) atoms

2015-10-04 Thread Karthik Nayak
On Sat, Oct 3, 2015 at 3:09 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> Implement %(if), %(then) and %(else) atoms. Used as >> %(if)..%(then)..%(end) or %(if)..%(then)..%(else)..%(end). > > I prefer ... to .., which often means

Re: [PATCH 1/2] test-path-utils.c: remove incorrect assumption

2015-10-04 Thread Ray Donnelly
On Sat, Oct 3, 2015 at 6:13 PM, Junio C Hamano wrote: > Ray Donnelly writes: > >> In normalize_ceiling_entry(), we test that normalized paths end with >> slash, *unless* the path to be normalized was already the root >> directory. >> >> However,

Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > + if test_have_prereq CYGWIN; then > + : # NOOP > + elif test_have_prereq DARWIN; then > + stat -f %Sp text | egrep ^-r-- && > + stat -f %Sp text+x | egrep ^-r-x > +

Re: [PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test on OS X

2015-10-04 Thread Junio C Hamano
Lars Schneider writes: > By the way... what formatting should I use? > > if foo > then > bar > > or > > if foo; then > bar > > I think the latter is more used in the code base. I've allowed the latter in fringe scripts (i.e. the ones that I do not care too deeply)

Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread Pete Wyckoff
larsxschnei...@gmail.com wrote on Sun, 04 Oct 2015 11:44 -0700: > > On 04 Oct 2015, at 11:23, Junio C Hamano wrote: > > > larsxschnei...@gmail.com writes: > > > >> + if test_have_prereq CYGWIN; then > >> + : # NOOP > >> + elif

Re: [PATCH 3/9] ref-filter: add support for %(path) atom

2015-10-04 Thread Matthieu Moy
Karthik Nayak writes: > On Sat, Oct 3, 2015 at 3:32 PM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> This adds %(path) and %(path:short) atoms. The %(path) atom will print >>> the path of the given ref, while

Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread Lars Schneider
On 04 Oct 2015, at 11:23, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> +if test_have_prereq CYGWIN; then >> +: # NOOP >> +elif test_have_prereq DARWIN; then >> +stat -f %Sp text | egrep ^-r-- &&

Re: [PATCH 3/9] ref-filter: add support for %(path) atom

2015-10-04 Thread Junio C Hamano
Matthieu Moy writes: This adds %(path) and %(path:short) atoms. The %(path) atom will print the path of the given ref, while %(path:short) will only print the subdirectory of the given ref. >>> >>> What does "path" mean in this context? How is it

Re: [PATCH v2 2/4] Add prereq to detect OS X

2015-10-04 Thread Lars Schneider
On 04 Oct 2015, at 11:28, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> Some Unix tools differ between Linux and Mac OS X. Add this prereq to >> detect OS X and handle it appropriately. > > If my comment

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Junio C Hamano
Matthieu Moy writes: > Currenty, to mimick this flow, we would need something like > > 1) User activates Travis-CI on his repo (each user would have to do >this, not just once) > > 2) User commits .travis.yml on top of the code to submit > > 3) User pushes to

[PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider The stats command works differently on OS X compared to Linux. Detect OS X and execute the appropriate assertions. Signed-off-by: Lars Schneider --- t/t9815-git-p4-submit-fail.sh | 8 ++-- 1 file changed, 6

[PATCH v2 2/4] Add prereq to detect OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider Some Unix tools differ between Linux and Mac OS X. Add this prereq to detect OS X and handle it appropriately. Signed-off-by: Lars Schneider --- t/test-lib.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test on OS X

2015-10-04 Thread larsxschneider
From: Lars Schneider The OS X file system is case insensitive by default. Consequently this test does not apply. Signed-off-by: Lars Schneider --- t/t9819-git-p4-case-folding.sh | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v2 1/4] Add Travis CI support

2015-10-04 Thread larsxschneider
From: Lars Schneider The tests are executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider

Re: [PATCH v8 0/7] git-p4: add support for large file systems

2015-10-04 Thread Lars Schneider
On 03 Oct 2015, at 10:23, Junio C Hamano wrote: > Junio C Hamano writes: > >> Luke Diamand writes: >> >>> All looks good to me, Ack. >>> >>> One tiny thing perhaps Junio could comment on: the git commit message >>> for

Re: [PATCH v2 2/4] Add prereq to detect OS X

2015-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > Some Unix tools differ between Linux and Mac OS X. Add this prereq to > detect OS X and handle it appropriately. If my comment on 4/4 turns out to be to the point, then we do not need this, I presume? In

Re: [PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test on OS X

2015-10-04 Thread Lars Schneider
On 04 Oct 2015, at 11:26, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> The OS X file system is case insensitive by default. Consequently this >> test does not apply. >> >> Signed-off-by: Lars Schneider

[PATCH v2 0/4] Add Travis CI support

2015-10-04 Thread larsxschneider
From: Lars Schneider diff to v1: * improve readabilty of Travis "before_script" section * make OS X Perforce brew robust against changing Perforce builds [1] * add a prereq to detect OS X in tests * fix t9815 git-p4-submit-fail test case on OS X * disable t9819

Re: [RFC/PATCH v1] Add Travis CI support

2015-10-04 Thread Dennis Kaarsemaker
On zo, 2015-10-04 at 10:46 -0700, Junio C Hamano wrote: > One final question. Which configuration file does the CI use when > running a PR-initiated test? The one already in the repository > i.e. the target of the proposed pull, or the one that is possibly > updated by the PR? > > I am wondering

Re: [PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test on OS X

2015-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > The OS X file system is case insensitive by default. Consequently this > test does not apply. > > Signed-off-by: Lars Schneider > --- > t/t9819-git-p4-case-folding.sh | 5 + > 1

Re: [PATCH 3/9] ref-filter: add support for %(path) atom

2015-10-04 Thread Karthik Nayak
On Mon, Oct 5, 2015 at 12:14 AM, Junio C Hamano wrote: > > Is that a derived form of the refname, just like %(refname:short) > that is 'master' for a ref whose %(refname) is 'refs/heads/master' > is a derived form of %(refname), and ":short" is what tells the > formatting

Re: [PATCH 1/2] test-path-utils.c: remove incorrect assumption

2015-10-04 Thread Ray Donnelly
On Sun, Oct 4, 2015 at 6:21 PM, Junio C Hamano wrote: > Ray Donnelly writes: > >>> Some callers of this function in real code (i.e. not the one you are >>> removing the check) do seem to depend on that condition, e.g. the >>> codepath in clone that

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-04 Thread Max Kirillov
On Sun, Oct 04, 2015 at 04:53:30PM +0200, Johannes Schindelin wrote: > I guess then we would need two different patches for the > two different fixes, at least. > > So now I am unsure how to proceed: I do not want to step > on your toes, but I also want to see my use case fixed and > I want to