Re: [PATCH 18/18] alternates: use fspathcmp to detect duplicates

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 10:34:55PM -0400, Aaron Schrab wrote: > At 16:36 -0400 03 Oct 2016, Jeff King wrote: > > On a case-insensitive filesystem, we should realize that > > "a/objects" and "A/objects" are the same path. > > The current repository being on a case-insensitive filesystem doesn't >

RE: [musl] Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread writeonce
< < < Original Message < Subject: [musl] Re: Regression: git no longer works with musl libc's < regex impl < From: Johannes Schindelin < Date: Tue, October 04, 2016 9:08 am < To: Rich Felker < Cc: Jeff King , git@vger.kernel.org, < m...@lists.openwall.com < < Hi Rich, < < O

Re: [PATCH 18/18] alternates: use fspathcmp to detect duplicates

2016-10-04 Thread Aaron Schrab
At 16:36 -0400 03 Oct 2016, Jeff King wrote: On a case-insensitive filesystem, we should realize that "a/objects" and "A/objects" are the same path. The current repository being on a case-insensitive filesystem doesn't guarantee that the alternates are as well. On the other hand, I suspect

Re: [PATCH 5/5] versioncmp: cope with common leading parts in versionsort.prereleaseSuffix

2016-10-04 Thread SZEDER Gábor
Quoting SZEDER Gábor : Quoting SZEDER Gábor : Version sort with prerelease reordering sometimes puts tagnames in the wrong order, when the common part of two compared tagnames ends with the leading character(s) of one or more configured prerelease suffixes. $ git config --get-all versionsort

Re: [RFC/PATCH] attr: Document a new possible thread safe API

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 4:13 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/Documentation/technical/api-gitattributes.txt >> b/Documentation/technical/api-gitattributes.txt >> index 92fc32a..940617e 100644 >> --- a/Documentation/technical/api-gitattributes.txt >> +++ b/Docume

Re: [RFC/PATCH] attr: Document a new possible thread safe API

2016-10-04 Thread Junio C Hamano
Stefan Beller writes: > diff --git a/Documentation/technical/api-gitattributes.txt > b/Documentation/technical/api-gitattributes.txt > index 92fc32a..940617e 100644 > --- a/Documentation/technical/api-gitattributes.txt > +++ b/Documentation/technical/api-gitattributes.txt > @@ -59,7 +59,10 @@ Qu

Re: GL bug: can not commit, reports error on changed submodule directory

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 3:58 PM, Junio C Hamano wrote: > ern0 writes: > >> When I say: >> $ gl commit -m "blah blah" >> It reports: >> ✘ Failed to read file into stream: Is a directory > > Not that I am interested in learning the answer to the question, but > what the h*ck is "gl"? http://gitle

Re: GL bug: can not commit, reports error on changed submodule directory

2016-10-04 Thread Junio C Hamano
ern0 writes: > When I say: > $ gl commit -m "blah blah" > It reports: > ✘ Failed to read file into stream: Is a directory Not that I am interested in learning the answer to the question, but what the h*ck is "gl"?

[PATCH 1/4] t4015: split out the "setup" part of ws-error-highlight test

2016-10-04 Thread Junio C Hamano
We'd want to run this same set of test twice, once with the option and another time with an equivalent configuration setting. Split out the step that prepares the test data and expected output and move the test for the command line option into a separate test. Signed-off-by: Junio C Hamano ---

[PATCH 0/4] diff.wsErrorHighlight configuration variable

2016-10-04 Thread Junio C Hamano
"git diff" and its family of commands have "--ws-error-highlight" option to allow whitespace breakages on old and context lines painted in color.diff.whitespace color, instead of the usual "we paint breakages only on new lines", but there wasn't a configuration variable that corresponds to it. Thi

[PATCH 2/4] diff.c: refactor parse_ws_error_highlight()

2016-10-04 Thread Junio C Hamano
Rename the function to parse_ws_error_highlight_opt(), because it is meant to parse a command line option, and then refactor the meat of the function into a helper function that reports the parsed result which is typically a small unsigned int (these are OR'ed bitmask after all), or a negative offs

[PATCH 3/4] diff.c: move ws-error-highlight parsing helpers up

2016-10-04 Thread Junio C Hamano
These need to be usable from git_diff_ui_config() code to help parsing a configuration variable, so move them up. Signed-off-by: Junio C Hamano --- diff.c | 74 +- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/diff

[PATCH 4/4] diff: introduce diff.wsErrorHighlight option

2016-10-04 Thread Junio C Hamano
With the preparatory steps, it has become trivial to teach the system a new diff.wsErrorHighlight configuration that gives the default value for --ws-error-highlight command line option. Signed-off-by: Junio C Hamano --- Documentation/diff-config.txt | 6 ++ Documentation/diff-options.txt

Re: [musl] Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Junio C Hamano
Rich Felker writes: > This is especially unfriendly when the semantics of the switch come > across, at least to some users, as "your system regex is incomplete" > rather than "git can't use it because git depends on nonstandard > extensions". The latter is exactly what Makefile patch that brough

Re: What's cooking in git.git (Sep 2016, #08; Tue, 27)

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 9:11 AM, Junio C Hamano wrote: > > The question git_all_attrs() asks is quite different. And as far as I can tell it is only used by builtin/check-attr.c which we do not intend to convert into a threaded beast in the foreseeable future I'd expect. So maybe we can just punt

Re: [musl] Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Rich Felker
On Wed, Oct 05, 2016 at 09:06:25AM +1100, James B wrote: > On Tue, 4 Oct 2016 18:08:33 +0200 (CEST) > Johannes Schindelin wrote: > > > > > No, it is not. You quote POSIX, but the matter of the fact is that we use > > a subset of POSIX in order to be able to keep things running on Windows. > > >

[RFC/PATCH] attr: Document a new possible thread safe API

2016-10-04 Thread Stefan Beller
This is what we want to see at the end of the refactoring session to enable the attr subsystem to be thread safe. Signed-off-by: Stefan Beller --- Junio wrote: >> So how would we go about git_all_attrs then? > > I think you arrived the same conclusion, but ... I think the changes as propose

Re: [musl] Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread James B
On Tue, 4 Oct 2016 18:08:33 +0200 (CEST) Johannes Schindelin wrote: > > No, it is not. You quote POSIX, but the matter of the fact is that we use > a subset of POSIX in order to be able to keep things running on Windows. > > And quite honestly, there are lots of reasons to keep things running o

Re: [PATCH 12/18] alternates: use a separate scratch space

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 02:49:45PM -0700, Junio C Hamano wrote: > >> It is not wrong per-se, but I am a bit surprised to see that the > >> code keeps FLEX_ARRAY _and_ uses a separate malloc'ed area pointed > >> at by the scratch pointer. > > > > Yeah, there's really no reason "path" could not beco

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 2:49 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 02:43:24PM -0700, Jacob Keller wrote: > >> > Hmm. Now I am puzzled, because I _did_ line up them specifically to make >> > this clear. I put the numbers under the ">" of the arrow. Did I screw up >> > the spacing somehow so

Re: [PATCH 12/18] alternates: use a separate scratch space

2016-10-04 Thread Junio C Hamano
Jeff King writes: > On Tue, Oct 04, 2016 at 02:29:46PM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > extern struct alternate_object_database { >> >struct alternate_object_database *next; >> > + >> >char *name; >> > - char base[FLEX_ARRAY]; /* more */ >> > + char *scratc

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 02:43:24PM -0700, Jacob Keller wrote: > > Hmm. Now I am puzzled, because I _did_ line up them specifically to make > > this clear. I put the numbers under the ">" of the arrow. Did I screw up > > the spacing somehow so that isn't how they look to you? Or are you just > > sa

Re: [PATCH 13/18] fill_sha1_file: write "boring" characters

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 2:46 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: >>> This function forms a sha1 as "xx/...", but skips over >>> the slot for the slash rather than writing it, leaving it to >>> the caller to do so. It also does

Re: [PATCH 13/18] fill_sha1_file: write "boring" characters

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 02:46:44PM -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: > >> This function forms a sha1 as "xx/...", but skips over > >> the slot for the slash rather than writing it, leaving it to > >> the caller to do s

Re: [PATCH 13/18] fill_sha1_file: write "boring" characters

2016-10-04 Thread Junio C Hamano
Jacob Keller writes: > On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: >> This function forms a sha1 as "xx/...", but skips over >> the slot for the slash rather than writing it, leaving it to >> the caller to do so. It also does not bother to put in a >> trailing NUL, even though every cal

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 1:55 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 01:52:19PM -0700, Jacob Keller wrote: > >> >> >> > +# Note: These tests depend on the hard-coded value of 5 as "too >> >> >> > deep". We start >> >> >> > +# the depth at 0 and count links, not repositories, so in a chain

Re: [PATCH 18/18] alternates: use fspathcmp to detect duplicates

2016-10-04 Thread Junio C Hamano
Jeff King writes: > ... but until recently we couldn't use it for comparing against > other alternates (because their paths were not > NUL-terminated strings). ;-) I should have expected this when reading the "let's have a separate .path field" conversion. Nice job.

Re: [PATCH v8 11/11] convert: add filter..process option

2016-10-04 Thread Jakub Narębski
[Some of answers and comments may got invalidated by v9] W dniu 01.10.2016 o 17:34, Lars Schneider pisze: >> On 29 Sep 2016, at 01:14, Jakub Narębski wrote: >> >> Part third (and last) of the review of v8 11/11. [...] >>> + >>> +test_expect_success PERL 'required process filter should filter dat

Re: [PATCH 12/18] alternates: use a separate scratch space

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 02:29:46PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > extern struct alternate_object_database { > > struct alternate_object_database *next; > > + > > char *name; > > - char base[FLEX_ARRAY]; /* more */ > > + char *scratch; > > + > > + char path[

Re: [PATCH 12/18] alternates: use a separate scratch space

2016-10-04 Thread Junio C Hamano
Jeff King writes: > extern struct alternate_object_database { > struct alternate_object_database *next; > + > char *name; > - char base[FLEX_ARRAY]; /* more */ > + char *scratch; > + > + char path[FLEX_ARRAY]; > } *alt_odb_list; It is not wrong per-se, but I am a bit su

Re: [PATCH 08/18] link_alt_odb_entry: refactor string handling

2016-10-04 Thread Junio C Hamano
Jeff King writes: > The string handling in link_alt_odb_entry() is mostly an > artifact of the original version, which took the path as a > ptr/len combo, and did not have a NUL-terminated string > until we created one in the alternate_object_database > struct. But since 5bdf0a8 (sha1_file: norm

Re: [PATCH 07/18] link_alt_odb_entry: handle normalize_path errors

2016-10-04 Thread Junio C Hamano
Jeff King writes: > +int strbuf_normalize_path(struct strbuf *src) > +{ > + struct strbuf dst = STRBUF_INIT; > + > + strbuf_grow(&dst, src->len); > + if (normalize_path_copy(dst.buf, src->buf) < 0) { > + strbuf_release(&dst); > + return -1; > + } > + > +

[PATCHv3 1/2] push: change submodule default to check when submodules exist

2016-10-04 Thread Stefan Beller
When working with submodules, it is easy to forget to push the submodules. The setting 'check', which checks if any existing submodule is present on at least one remote of the submodule remotes, is designed to prevent this mistake. Flipping the default to check for submodules is safer than the cur

Re: [PATCH 05/18] t5613: do not chdir in main process

2016-10-04 Thread Junio C Hamano
Jeff King writes: > Our usual style when working with subdirectories is to chdir > inside a subshell or to use "git -C", which means we do not > have to constantly return to the main test directory. Let's > convert this old test, which does not follow that style. > > Signed-off-by: Jeff King > -

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 01:58:54PM -0700, Stefan Beller wrote: > On Tue, Oct 4, 2016 at 1:55 PM, Jeff King wrote: > > On Tue, Oct 04, 2016 at 01:52:19PM -0700, Jacob Keller wrote: > > > >> >> >> > +# Note: These tests depend on the hard-coded value of 5 as "too > >> >> >> > deep". We start > >>

Re: [PATCH v8 11/11] convert: add filter..process option

2016-10-04 Thread Jakub Narębski
[Some of answers and comments may got invalidated by v9] W dniu 30.09.2016 o 21:38, Lars Schneider pisze: >> On 27 Sep 2016, at 17:37, Jakub Narębski wrote: >> >> Part second of the review of 11/11. [...] >>> + >>> + if (start_command(process)) { >>> + error("cannot fork to run extern

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 1:55 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 01:52:19PM -0700, Jacob Keller wrote: > >> >> >> > +# Note: These tests depend on the hard-coded value of 5 as "too >> >> >> > deep". We start >> >> >> > +# the depth at 0 and count links, not repositories, so in a chain

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 01:52:19PM -0700, Jacob Keller wrote: > >> >> > +# Note: These tests depend on the hard-coded value of 5 as "too > >> >> > deep". We start > >> >> > +# the depth at 0 and count links, not repositories, so in a chain > >> >> > like: > >> >> > +# > >> >> > +# A -> B -> C

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 1:49 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 01:44:23PM -0700, Jacob Keller wrote: > >> On Tue, Oct 4, 2016 at 6:48 AM, Jeff King wrote: >> > On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote: >> > >> >> > diff --git a/t/t5613-info-alternate.sh b/t/t5613-i

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:48 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote: > >> > diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh >> > index 7bc1c3c..b393613 100755 >> > --- a/t/t5613-info-alternate.sh >> > +++ b/t/t5613-info-alternate.sh >>

Re: [PATCH v8 11/11] convert: add filter..process option

2016-10-04 Thread Jakub Narębski
[Some of answers may get invalidated by v9] W dniu 30.09.2016 o 20:56, Lars Schneider pisze: >> On 27 Sep 2016, at 00:41, Jakub Narębski wrote: >> >> Part first of the review of 11/11. [...] >>> +to read a welcome response message ("git-filter-server") and exactly >>> +one protocol version numbe

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 01:44:23PM -0700, Jacob Keller wrote: > On Tue, Oct 4, 2016 at 6:48 AM, Jeff King wrote: > > On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote: > > > >> > diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh > >> > index 7bc1c3c..b393613 100755 > >

Re: [PATCH 08/18] link_alt_odb_entry: refactor string handling

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:53 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 11:05:42PM -0700, Jacob Keller wrote: > >> This definitely makes reading the following function much easier, >> though the diff is a bit funky. I think the end result is much >> clearer. > > Yeah, it's really hard to see th

Re: [PATCH 04/18] t5613: whitespace/style cleanups

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:47 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:52:39PM -0700, Jacob Keller wrote: > >> On Mon, Oct 3, 2016 at 1:34 PM, Jeff King wrote: >> > Our normal test style these days puts the opening quote of >> > the body on the description line, and indents the body with >

Re: [PATCH 0/18] alternate object database cleanups

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:41 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:47:31PM -0700, Jacob Keller wrote: > >> > The number of patches is a little intimidating, but I tried hard to >> > break the refactoring down into a sequence of obviously-correct steps. >> > You can be the judge of my su

Re: [PATCH 1/3] add QSORT

2016-10-04 Thread René Scharfe
Am 04.10.2016 um 07:28 schrieb Kevin Bracey: On 04/10/2016 01:00, René Scharfe wrote: Am 03.10.2016 um 19:09 schrieb Kevin Bracey: As such, NULL checks can still be elided even with your change. If you effectively change your example to: if (nmemb > 1) qsort(array, nmemb, size, cmp

Re: [PATCH v9 10/14] pkt-line: add functions to read/write flush terminated packet streams

2016-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > write_packetized_from_fd() and write_packetized_from_buf() write a > stream of packets. All content packets use the maximal packet size > except for the last one. After the last content packet a `flush` control > packet is written. > > r

Re: [PATCH v9 10/14] pkt-line: add functions to read/write flush terminated packet streams

2016-10-04 Thread Junio C Hamano
Junio C Hamano writes: > I must be missing something. Is the other side always supposed to > give a flush packet or something? Perhaps that is what is happening > here. If so, I am OK with that, even though it somehow sounds a bit > wasteful. Ah, scratch that. What I was missing was that thi

Re: [PATCHv2 1/2] push: change submodule default to check when submodules exist

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 12:39 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 12:29:09PM -0700, Stefan Beller wrote: > >> Jeff wrote: >> > Consulting .git/config is fine, I think. It's not like we don't read it >> > (sometimes multiple times!) during the normal course of the program >> > anyway. It'

Re: [PATCHv2 1/2] push: change submodule default to check when submodules exist

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 12:29:09PM -0700, Stefan Beller wrote: > Jeff wrote: > > Consulting .git/config is fine, I think. It's not like we don't read it > > (sometimes multiple times!) during the normal course of the program > > anyway. It's just a question of whether it makes more sense for the >

Re: [PATCH v9 09/14] pkt-line: add packet_write_gently()

2016-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > packet_write_fmt_gently() uses format_packet() which lets the caller > only send string data via "%s". That means it cannot be used for > arbitrary data that may contain NULs. > > Add packet_write_gently() which writes arbitrary data and

Re: [PATCH v9 04/14] run-command: add wait_on_exit

2016-10-04 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > The flag 'clean_on_exit' kills child processes spawned by Git on exit. > A hard kill like this might not be desired in all cases. > > Add 'wait_on_exit' which closes the child's stdin on Git exit and waits > until the child process has t

[PATCHv2 1/2] push: change submodule default to check when submodules exist

2016-10-04 Thread Stefan Beller
When working with submodules, it is easy to forget to push the submodules. The setting 'check', which checks if any existing submodule is present on at least one remote of the submodule remotes, is designed to prevent this mistake. Flipping the default to check for submodules is safer than the cur

[PATCH 2/2] builtin/push: move flags do_push

2016-10-04 Thread Stefan Beller
In do_push we set the flags for other options, so let's make the code more consistent and also apply the flags for recursing into submodules there. Signed-off-by: Stefan Beller --- No functional change intended, just a cleanup while we're at it. Feel free to drop if it's too much churn. built

Re: [PATCH v8 00/11] Git filter protocol

2016-10-04 Thread Jakub Narębski
W dniu 03.10.2016 o 19:13, Lars Schneider pisze: >> On 01 Oct 2016, at 22:48, Jakub Narębski wrote: >> W dniu 01.10.2016 o 20:59, Lars Schneider pisze: >>> On 29 Sep 2016, at 23:27, Junio C Hamano wrote: Lars Schneider writes: If the filter process refuses to die forever when Gi

Re: Reference a submodule branch instead of a commit

2016-10-04 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> I wonder if we could make that convenient for users by not tracking >> the submodule, >> i.e. >> * we have the information in the .gitmodules file >> * the path itself is in the .gitignore >> * no tree entry >> >> Then you can update to the rem

Re: [PATCH v3 0/6] Pull out require_clean_work_tree() functionality from builtin/pull.c

2016-10-04 Thread Junio C Hamano
Johannes Schindelin writes: > This is the 5th last patch series of my work to accelerate interactive > rebases in particular on Windows. Offtopic, but I am always confused by what you might mean by this "nth last patch series". Is this series 5th from the last and we have four more to go? In a

Re: [PATCH v3 4/6] Export also the has_un{staged,committed}_changed() functions

2016-10-04 Thread Junio C Hamano
Johannes Schindelin writes: > They will be used in the upcoming rebase helper. > > Signed-off-by: Johannes Schindelin > --- Makes sense.

Re: [PATCH v3 3/6] Make the require_clean_work_tree() function reusable

2016-10-04 Thread Junio C Hamano
Johannes Schindelin writes: > It is remarkable that libgit.a did not sport this function yet... Let's > move it into a more prominent (and into an actually reusable) spot: > wt-status.[ch]. > > Signed-off-by: Johannes Schindelin > --- Thanks. I'd tweak the message while queuing, though. w

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 11:08:33AM -0700, Stefan Beller wrote: > On Tue, Oct 4, 2016 at 11:04 AM, Junio C Hamano wrote: > > Jeff King writes: > > > >> Actually, I like that a bit better. It would not cover the case where > >> you have not actually checked out any of the submodules (or at least n

Re: [RFC/PATCH 0/2] place cherry pick line below commit title

2016-10-04 Thread Junio C Hamano
Junio C Hamano writes: > A block of lines that appear as the last paragraph in a commit > message is a trailer block if and only if certain number or > percentage of lines are non-garbage lines according to the above > definition. > ... > I wonder if we can share a new helper function to do the d

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 11:04 AM, Junio C Hamano wrote: > Jeff King writes: > >> Actually, I like that a bit better. It would not cover the case where >> you have not actually checked out any of the submodules (or at least not >> called "submodule init", I guess?). But arguably that is a sign that

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 11:00 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static void preset_submodule_default(void) >> +{ >> + if (file_exists(".gitmodules")) > > Don't we need to see if we are in a bare repository? See discussion with Jeff; instead of checking the file, we rathe

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Junio C Hamano
Jeff King writes: > Actually, I like that a bit better. It would not cover the case where > you have not actually checked out any of the submodules (or at least not > called "submodule init", I guess?). But arguably that is a sign that the > auto-recurse behavior should not be kicking in anyway.

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> +static void preset_submodule_default(void) >> +{ >> +if (file_exists(".gitmodules")) > > Don't we need to see if we are in a bare repository? > >> +recurse_submodules = RECURSE_SUBMODULES_CHECK; >> +else >> +rec

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Ray Donnelly
On Tue, Oct 4, 2016 at 6:16 PM, Johannes Schindelin wrote: > Hi Rich, > > On Tue, 4 Oct 2016, Rich Felker wrote: > >> On Tue, Oct 04, 2016 at 06:08:33PM +0200, Johannes Schindelin wrote: >> > Hi Rich, >> > >> > On Tue, 4 Oct 2016, Rich Felker wrote: >> > >> > > On Tue, Oct 04, 2016 at 11:27:22AM -

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Junio C Hamano
Stefan Beller writes: > +static void preset_submodule_default(void) > +{ > + if (file_exists(".gitmodules")) Don't we need to see if we are in a bare repository? > + recurse_submodules = RECURSE_SUBMODULES_CHECK; > + else > + recurse_submodules = RECURSE_SUBMODUL

Re: color.diff.whitespace unused on removed lines

2016-10-04 Thread Junio C Hamano
Jeff King writes: > On Tue, Oct 04, 2016 at 05:35:23PM +0200, Sandro Santilli wrote: > >> > We later did b8767f7 (diff.c: --ws-error-highlight= option, >> > 2015-05-26) to let you see them on other lines, though. I think that >> > would do what you want. >> >> Thanks, it does do what I want. >>

Re: [PATCH v6 4/4] ls-files: add pathspec matching for submodules

2016-10-04 Thread Stefan Beller
On Thu, Sep 29, 2016 at 2:48 PM, Brandon Williams wrote: > Pathspecs can be a bit tricky when trying to apply them to submodules. > The main challenge is that the pathspecs will be with respect to the > superproject and not with respect to paths in the submodule. The > approach this patch takes i

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 10:48:51AM -0700, Stefan Beller wrote: > > This does seem like a reasonable heuristic. I wonder if you want to > > confirm that we actually have a worktree (and are in it) before looking > > at file_exists(). It's unlikely that looking at ".gitmodules" in a bare > > repo wo

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Stefan Beller
On Tue, Oct 4, 2016 at 10:34 AM, Jeff King wrote: > On Tue, Oct 04, 2016 at 09:40:36AM -0700, Stefan Beller wrote: > >> >> Why should we even have a default different from today's? If most >> >> repositories don't have submodules enabled at all, we can just let >> >> those working with submodules

Re: [musl] Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Rich Felker
On Tue, Oct 04, 2016 at 06:08:33PM +0200, Johannes Schindelin wrote: > Hi Rich, > > On Tue, 4 Oct 2016, Rich Felker wrote: > > > On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > > > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > > > > > > > 1. is nonzero mod page size

Re: [PATCH v6 1/4] git: make super-prefix option

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 10:31:51AM -0700, Stefan Beller wrote: > On Thu, Sep 29, 2016 at 2:48 PM, Brandon Williams wrote: > > > > > +const char *get_super_prefix(void) > > +{ > > + if (!super_prefix) > > + super_prefix = getenv(GIT_SUPER_PREFIX_ENVIRONMENT); > > + retur

Re: [PATCH v6 1/4] git: make super-prefix option

2016-10-04 Thread Junio C Hamano
Stefan Beller writes: > On Thu, Sep 29, 2016 at 2:48 PM, Brandon Williams wrote: > >> >> +const char *get_super_prefix(void) >> +{ >> + if (!super_prefix) >> + super_prefix = getenv(GIT_SUPER_PREFIX_ENVIRONMENT); >> + return super_prefix; >> +} >> + > > As said earlier,

Re: [PATCH] push: change submodule default to check

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 09:40:36AM -0700, Stefan Beller wrote: > >> Why should we even have a default different from today's? If most > >> repositories don't have submodules enabled at all, we can just let > >> those working with submodules enabled to toggle their configuration > >> and that is a

Re: [PATCH v6 1/4] git: make super-prefix option

2016-10-04 Thread Stefan Beller
On Thu, Sep 29, 2016 at 2:48 PM, Brandon Williams wrote: > > +const char *get_super_prefix(void) > +{ > + if (!super_prefix) > + super_prefix = getenv(GIT_SUPER_PREFIX_ENVIRONMENT); > + return super_prefix; > +} > + As said earlier, is the following a valid thought: >

Re: Reference a submodule branch instead of a commit

2016-10-04 Thread Junio C Hamano
Stefan Beller writes: >> >> We already have options to support these kinds of workflows. Look at the >> option '--remote' for 'git submodule update'. >> >> You then only have to commit the submodule if you do not want to see it >> as dirty locally, but you will always get the tip of a remote trac

Re: error

2016-10-04 Thread Jeff King
[re-adding git@vger to the cc; please keep conversations on the list so everybody can benefit from the answers] On Tue, Oct 04, 2016 at 01:13:16PM -0300, Luciano Schillagi wrote: > I ran the command > > Luko ~ $ git config --global --unset push.default > > > and it gives me the following > >

Re: [RFC/PATCH 0/2] place cherry pick line below commit title

2016-10-04 Thread Junio C Hamano
Jonathan Tan writes: > One alternative is to postpone this decision by changing sequencer > only (and not trailer) to tolerate other lines in the trailer. This > would make them even more divergent (sequencer supports arbitrary > lines while trailer doesn't), but they were divergent already > (se

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Johannes Schindelin
Hi Rich, On Tue, 4 Oct 2016, Rich Felker wrote: > On Tue, Oct 04, 2016 at 06:08:33PM +0200, Johannes Schindelin wrote: > > Hi Rich, > > > > On Tue, 4 Oct 2016, Rich Felker wrote: > > > > > On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > > > > On Tue, Oct 04, 2016 at 11:08:48AM -040

[ANNOUNCE] Git for Windows 2.10.1

2016-10-04 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.10.1 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.10.0 (September 3rd 2016) New Features • Comes with Git v2.10.1. • Comes with Git Credential Manager v1.7.0. • Comes wi

Re: Reference a submodule branch instead of a commit

2016-10-04 Thread Stefan Beller
> > We already have options to support these kinds of workflows. Look at the > option '--remote' for 'git submodule update'. > > You then only have to commit the submodule if you do not want to see it > as dirty locally, but you will always get the tip of a remote tracking > branch when updating.

Re: [PATCH] l10n: de.po: translate 260 new messages

2016-10-04 Thread Ralf Thielow
Hi Matthias, thanks for review! Your findings and suggestions are very good and I will integrate them in a new version. 2016-10-03 0:23 GMT+02:00 Matthias Rüster : >> #: builtin/merge.c:960 >> #, c-format >> msgid "Bad value '%s' in environment '%s'" >> -msgstr "" >> +msgstr "Fehlerhafter Wer

Re: [PATCH v8 00/11] Git filter protocol

2016-10-04 Thread Junio C Hamano
Jeff King writes: > On Mon, Oct 03, 2016 at 10:02:14AM -0700, Junio C Hamano wrote: > >> The timeout would be good for you to give a message "filter process >> running the script '%s' is not exiting; I am waiting for it". The >> user is still left with a hung Git, and can then see if that proces

[PATCH] push: change submodule default to check

2016-10-04 Thread Stefan Beller
When working with submodules, it is easy to forget to push the submodules. The setting 'check', which checks if any existing submodule is present on at least one remote of the submodule remotes, is designed to prevent this mistake. Flipping the default to check for submodules is safer than the cur

Re: Slow pushes on 'pu' - even when up-to-date..

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 09:19:01AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > As I argued in [1], I think it's not just "this must be cheaper" but > > "this must not be enabled if submodules are not in use at all". Most > > repositories don't have submodules enabled at all, so anyth

Re: Slow pushes on 'pu' - even when up-to-date..

2016-10-04 Thread Junio C Hamano
Jeff King writes: > As I argued in [1], I think it's not just "this must be cheaper" but > "this must not be enabled if submodules are not in use at all". Most > repositories don't have submodules enabled at all, so anything that > cause any extra traversal, even of a portion of the history, is

Re: [PATCH 1/3] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-10-04 Thread Junio C Hamano
Duy Nguyen writes: > We don't use it internally _yet_. I need to go through all the > external diff code and see --shift-ita should be there. The end goal > is still changing the default behavior and getting rid of --shift-ita, I do not agree with that endgame, and quite honestly I do not want t

Re: color.diff.whitespace unused on removed lines

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 05:35:23PM +0200, Sandro Santilli wrote: > > We later did b8767f7 (diff.c: --ws-error-highlight= option, > > 2015-05-26) to let you see them on other lines, though. I think that > > would do what you want. > > Thanks, it does do what I want. > Any chance to specify it in t

Re: What's cooking in git.git (Sep 2016, #08; Tue, 27)

2016-10-04 Thread Junio C Hamano
Stefan Beller writes: > So how would we go about git_all_attrs then? I think you arrived the same conclusion, but the use of git_attr_check_elem[] in the original implementation of git_all_attrs() does not translate to the use of struct git_attr_check in the new world order we have been discussi

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Rich Felker
On Tue, Oct 04, 2016 at 06:08:33PM +0200, Johannes Schindelin wrote: > Hi Rich, > > On Tue, 4 Oct 2016, Rich Felker wrote: > > > On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > > > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > > > > > > > 1. is nonzero mod page size

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Johannes Schindelin
Hi Rich, On Tue, 4 Oct 2016, Rich Felker wrote: > On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > > > > > 1. is nonzero mod page size, it just works; the remainder of the last > > >page reads as zero bytes when mma

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Johannes Schindelin
Hi, On Tue, 4 Oct 2016, Jeff King wrote: > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > > > 1. is nonzero mod page size, it just works; the remainder of the last > >page reads as zero bytes when mmapped. > > Is that a portable assumption? No. Ciao, Dscho

Re: Bug Report: "git submodule deinit" fails right after a clone

2016-10-04 Thread Thomas Bétous
Thank you for your answer and sorry for the delay (I was on vacation...). I am using git 2.9.0.windows.1 (run on Windows 7 via git bash). I tested it on this repo: https://github.com/githubtraining/example-dependency.git The same problem occurs. Here a small script to reproduce the error on my PC

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Rich Felker
On Tue, Oct 04, 2016 at 11:27:22AM -0400, Jeff King wrote: > On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > > > This commit broke support for using git with musl libc: > > > > https://github.com/git/git/commit/2f8952250a84313b74f96abb7b035874854cf202 > > Yep. The idea is that you

Re: color.diff.whitespace unused on removed lines

2016-10-04 Thread Sandro Santilli
On Tue, Oct 04, 2016 at 11:29:55AM -0400, Jeff King wrote: > On Tue, Oct 04, 2016 at 10:14:29AM +0200, Sandro Santilli wrote: > > > The color.diff.whitespace configuration is not used on > > removed lines, but only on added lines. > > Right. The original purpose was to warn you when you were intr

Re: color.diff.whitespace unused on removed lines

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 10:14:29AM +0200, Sandro Santilli wrote: > The color.diff.whitespace configuration is not used on > removed lines, but only on added lines. Right. The original purpose was to warn you when you were introducing whitespace breakages. Getting rid of other people's whitespace

Re: Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Jeff King
On Tue, Oct 04, 2016 at 11:08:48AM -0400, Rich Felker wrote: > This commit broke support for using git with musl libc: > > https://github.com/git/git/commit/2f8952250a84313b74f96abb7b035874854cf202 Yep. The idea is that you would compile git with NO_REGEX=1, and it would use the included compat

Regression: git no longer works with musl libc's regex impl

2016-10-04 Thread Rich Felker
This commit broke support for using git with musl libc: https://github.com/git/git/commit/2f8952250a84313b74f96abb7b035874854cf202 Rather than depending on non-portable GNU regex extensions, there is a simple portable fix for the issue this code was added to work around: When a text file is being

[PATCH v2] http: http.emptyauth should allow empty (not just NULL) usernames

2016-10-04 Thread David Turner
When using Kerberos authentication with newer versions of libcurl, CURLOPT_USERPWD must be set to a value, even if it is an empty value. The value is never sent to the server. Previous versions of libcurl did not require this variable to be set. One way that some users express the empty username/

  1   2   >