Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Han-Wen Nienhuys
On Wed, Aug 1, 2018 at 8:17 PM Junio C Hamano wrote: > >> Hmm, do we actually say things like "Error: blah"? I am not sure if > >> I like this strncasecmp all that much. > > > > this is for the remote end, so what we (git-core) says isn't all that > > relevant. > > It is very relevant, I would th

Re: [PATCH v2 0/4] fix "rebase -i --root" corrupting root commit

2018-08-02 Thread Eric Sunshine
On Wed, Aug 1, 2018 at 7:25 PM brian m. carlson wrote: > On Tue, Jul 31, 2018 at 03:33:27AM -0400, Eric Sunshine wrote: > > This is a re-roll of [1] which fixes sequencer bugs resulting in commit > > object corruption when "rebase -i --root" swaps in a new commit as root. > > Unfortunately, those

[PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Eric Sunshine
want_color_fd() is designed to work only with standard input, output, and error file descriptors, and stores information about each descriptor in an array. However, it doesn't verify that the passed-in descriptor lives within that set, which, with a buggy caller, could lead to access/assignment out

Re: [PATCH] remote: clear string_list after use in mv()

2018-08-02 Thread René Scharfe
Thank you for the review! Am 02.08.2018 um 04:56 schrieb Jonathan Nieder: > René Scharfe wrote: > >> Subject: remote: clear string_list after use in mv() > > This subject line doesn't fully reflect the goodness of this change. > How about something like: > > remote mv: avoid leaking ref n

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Eric Sunshine
On Wed, Aug 1, 2018 at 2:17 PM Junio C Hamano wrote: > Han-Wen Nienhuys writes: > > Sorry for being dense, but do you want me to send an updated patch or > > not based on your and Eric's comments or not? > > It would help to see the comments responded with either "such a > change is not needed fo

[PATCH v3 0/2] Fix author script quoting

2018-08-02 Thread Phillip Wood
From: Phillip Wood Thanks to Eric for his comments on v2. The first patch hasn't changed much, the second one quite a bit. See the individual patches for a list of changes Phillip Wood (2): sequencer: handle errors in read_author_ident() sequencer: fix quoting in write_author_script git-re

[PATCH v3 1/2] sequencer: handle errors in read_author_ident()

2018-08-02 Thread Phillip Wood
From: Phillip Wood The calling code did not treat NULL as an error. Instead NULL caused it to fallback to using the default author when creating the new commit. This changed the date and potentially the author of the commit which corrupted the author data compared to its expected value. Fix this

[PATCH v3 2/2] sequencer: fix quoting in write_author_script

2018-08-02 Thread Phillip Wood
From: Phillip Wood Single quotes should be escaped as \' not \\'. The bad quoting breaks the interactive version of 'rebase --root' (which is used when there is no '--onto' even if the user does not specify --interactive) for authors that contain "'" as sq_dequote() called read_author_ident() err

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Han-Wen Nienhuys
On Tue, Jul 31, 2018 at 10:21 PM Eric Sunshine wrote: > > On Tue, Jul 31, 2018 at 1:37 PM Han-Wen Nienhuys wrote: > > Highlight keywords in remote sideband output. > > Prefix with the module you're touching, don't capitalize, and drop the > period. Perhaps: Done. > sideband: highlight keywo

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Han-Wen Nienhuys
On Thu, Aug 2, 2018 at 12:24 PM Eric Sunshine wrote: > > On Wed, Aug 1, 2018 at 2:17 PM Junio C Hamano wrote: > > Han-Wen Nienhuys writes: > > > Sorry for being dense, but do you want me to send an updated patch or > > > not based on your and Eric's comments or not? > > > > It would help to see

[PATCH 0/2 v4] sideband: highlight keywords in remote sideband output

2018-08-02 Thread Han-Wen Nienhuys
Address Eric Sunshine's comments. Han-Wen Nienhuys (2): config: document git config getter return value. sideband: highlight keywords in remote sideband output Documentation/config.txt| 9 +++ config.h| 10 ++- help.c |

[PATCH 2/2] sideband: highlight keywords in remote sideband output

2018-08-02 Thread Han-Wen Nienhuys
The colorization is controlled with the config setting "color.remote". Supported keywords are "error", "warning", "hint" and "success". They are highlighted if they appear at the start of the line, which is common in error messages, eg. ERROR: commit is missing Change-Id The rationale for thi

[PATCH 1/2] config: document git config getter return value.

2018-08-02 Thread Han-Wen Nienhuys
--- config.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index b95bb7649..41700f40b 100644 --- a/config.h +++ b/config.h @@ -178,10 +178,16 @@ struct config_set { }; extern void git_configset_init(struct config_set *cs); -extern int git_co

[PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread SZEDER Gábor
So, I have this PoC patch below on top of this patch series for some months now; actually this series was all fallout from working on this patch. It makes 'make -j coccicheck' much faster (speedup of over 99% :) in some scenarios that, in my experience, occur rather frequently when working on Co

[PATCH 1/2] config: document git config getter return value.

2018-08-02 Thread Han-Wen Nienhuys
--- config.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index b95bb7649..41700f40b 100644 --- a/config.h +++ b/config.h @@ -178,10 +178,16 @@ struct config_set { }; extern void git_configset_init(struct config_set *cs); -extern int git_co

[PATCH 0/2 v4] sideband: highlight keywords in remote sideband output

2018-08-02 Thread Han-Wen Nienhuys
Address Eric Sunshine's comments. Han-Wen Nienhuys (2): config: document git config getter return value. sideband: highlight keywords in remote sideband output Documentation/config.txt| 9 +++ config.h| 10 ++- help.c |

[PATCH 2/2] sideband: highlight keywords in remote sideband output

2018-08-02 Thread Han-Wen Nienhuys
The colorization is controlled with the config setting "color.remote". Supported keywords are "error", "warning", "hint" and "success". They are highlighted if they appear at the start of the line, which is common in error messages, eg. ERROR: commit is missing Change-Id The rationale for thi

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 00:31 schrieb Ævar Arnfjörð Bjarmason: > But looking at this again it looks like this whole thing should just be > replaced by: > > diff --git a/builtin/push.c b/builtin/push.c > index 9cd8e8cd56..b8fa15c101 100644 > --- a/builtin/push.c > +++ b/builtin/push.c

Adam Milton - advertising 2d animation video

2018-08-02 Thread Adam Milton
Hey! My name is Adam Milton I am a team leader at " Inovit" animation studio. Our company creates professional 2d animation explainer videos that help to tell your business story in an engaging way, increase conversions, maximize your business exposure and boost sales. Researchers have

Re: [PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Johannes Schindelin
Hi Eric, On Thu, 2 Aug 2018, Eric Sunshine wrote: > want_color_fd() is designed to work only with standard input, output, > and error file descriptors, and stores information about each descriptor > in an array. However, it doesn't verify that the passed-in descriptor > lives within that set, whi

Re: What's cooking in git.git (Jul 2018, #03; Wed, 25)

2018-08-02 Thread Christian Couder
On Thu, Jul 26, 2018 at 6:57 PM, Junio C Hamano wrote: > Оля Тележная writes: > >> 2018-07-26 1:13 GMT+03:00 Junio C Hamano : >>> >>> * ot/ref-filter-object-info (2018-07-17) 5 commits >>> - ref-filter: use oid_object_info() to get object >>> - ref-filter: merge get_obj and get_object >>> - r

Re: [PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 13:55 schrieb SZEDER Gábor: > Let's add a bit of Makefile metaprogramming to generate finer-grained > make targets applying one semantic patch to only a single source file, > and specify these as dependencies of the targets applying one semantic > patch to all source files. This w

[GSoC] GSoC with git, week 13

2018-08-02 Thread Alban Gruin
Hi, I am a bit late this week, but here is my blog post: https://blog.pa1ch.fr/posts/2018/08/02/en/gsoc2018-week13.html Cheers, Alban

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 02 2018, René Scharfe wrote: > Am 02.08.2018 um 00:31 schrieb Ævar Arnfjörð Bjarmason: >> But looking at this again it looks like this whole thing should just be >> replaced by: >> >> diff --git a/builtin/push.c b/builtin/push.c >> index 9cd8e8cd56..b8fa15c101 100644 >>

[RFC PATCH v2 09/12] submodule: support reading .gitmodules even when it's not checked out

2018-08-02 Thread Antonio Ospite
When the .gitmodules file is not available in the working tree, try using HEAD:.gitmodules from the current branch. This covers the case when the file is part of the repository but for some reason it is not checked out, for example because of a sparse checkout. This makes it possible to use at lea

[RFC PATCH v2 12/12] submodule: remove the .gitmodules file when it is empty

2018-08-02 Thread Antonio Ospite
In particular this makes it possible to really clean things up when removing the last submodule with "git rm". The rationale is that if git creates .gitmodules when adding the first submodule it should also remove it when removing the last submodule. Signed-off-by: Antonio Ospite --- submodule.

[RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread Antonio Ospite
Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with invalid lines in .gitmodules but then only the second commit is removed. This may affect future subsequent tests if they assume that the .gitmodules file has no errors. Since those commits are not needed anymore remove both of them

[RFC PATCH v2 00/12] Make submodules work if .gitmodules is not checked out

2018-08-02 Thread Antonio Ospite
Hi, this is a second version of the RFC from https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ Please refer to the cover letter of the previous series for the motivation and background of the changes. Patches from 01 to 08 should be rather uncontroversial, as they do not introduce a

[RFC PATCH v2 05/12] submodule: use the 'submodule--helper config' command

2018-08-02 Thread Antonio Ospite
Use the 'submodule--helper config' command in git-submodules.sh to avoid referring explicitly to .gitmodules by the hardcoded file path. This makes it possible to access the submodules configuration in a more controlled way. Signed-off-by: Antonio Ospite --- Note that there are other instances

[RFC PATCH v2 02/12] submodule: factor out a config_set_in_gitmodules_file_gently function

2018-08-02 Thread Antonio Ospite
Introduce a new config_set_in_gitmodules_file_gently() function to write config values to the .gitmodules file. This is in preparation for a future change which will use the function to write to the .gitmodules file in a more controlled way instead of using "git config -f .gitmodules". The purpos

[RFC PATCH v2 11/12] dir: move is_empty_file() from builtin/am.c to dir.c and make it public

2018-08-02 Thread Antonio Ospite
The is_empty_file() function can be generally useful, move it to dir.c and make it public. Signed-off-by: Antonio Ospite --- builtin/am.c | 15 --- dir.c| 16 dir.h| 1 + 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/builtin/am.c b

[RFC PATCH v2 06/12] submodule--helper: add a '--stage' option to the 'config' sub command

2018-08-02 Thread Antonio Ospite
Add a --stage option to the 'submodule--helper config' command so that the .gitmodules file can be staged without referring to it explicitly by its file path. In practice the config will still be written to .gitmodules, there are no plans to change the file path, but having this level of indirecti

[RFC PATCH v2 01/12] submodule: add a print_config_from_gitmodules() helper

2018-08-02 Thread Antonio Ospite
This will be used to print values just like "git config -f .gitmodules" would. Signed-off-by: Antonio Ospite --- submodule-config.c | 25 + submodule-config.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/submodule-config.c b/submodule-config.c index 2a7259ba8b

[RFC PATCH v2 07/12] submodule: use 'submodule--helper config --stage' to stage .gitmodules

2018-08-02 Thread Antonio Ospite
Use 'git submodule--helper config --stage' in git-submodule.sh to remove the last place where the .gitmodules file is mentioned explicitly by its file path. Signed-off-by: Antonio Ospite --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/g

[RFC PATCH v2 04/12] submodule--helper: add a new 'config' subcommand

2018-08-02 Thread Antonio Ospite
Add a new 'config' subcommand to 'submodule--helper', this extra level of indirection makes it possible to add some flexibility to how the submodules configuration is handled. Signed-off-by: Antonio Ospite --- Note that the tests follow the predominant style in the file: subshell and cd right at

[RFC PATCH v2 10/12] t7416: add new test about HEAD:.gitmodules and not existing .gitmodules

2018-08-02 Thread Antonio Ospite
git submodule commands can now access .gitmodules from the current branch even when it's not in the working tree, add some tests for that scenario. Signed-off-by: Antonio Ospite --- For the test files I used the most used style in other tests, Stefan suggested to avoid subshells and use "git -C"

[RFC PATCH v2 08/12] t7506: cleanup .gitmodules properly before setting up new scenario

2018-08-02 Thread Antonio Ospite
In t/t7506-status-submodule.sh at some point a new scenario is set up to test different things, in particular new submodules are added which are meant to completely replace the previous ones. However before calling the "git submodule add" commands for the new layout, the .gitmodules file is remove

Re: [PATCH/RFC] clone: report duplicate entries on case-insensitive filesystems

2018-08-02 Thread Duy Nguyen
On Wed, Aug 1, 2018 at 11:20 PM Junio C Hamano wrote: > > Junio C Hamano writes: > > > Jeff King writes: > > > >>> Presumably we are already in an error codepath, so if it is > >>> absolutely necessary, then we can issue a lstat() to grab the inum > >>> for the path we are about to create, itera

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 16:21 schrieb Ævar Arnfjörð Bjarmason: > > On Thu, Aug 02 2018, René Scharfe wrote: > >> Am 02.08.2018 um 00:31 schrieb Ævar Arnfjörð Bjarmason: >>> But looking at this again it looks like this whole thing should just be >>> replaced by: >>> >>> diff --git a/builtin/push.c

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 17:06 schrieb René Scharfe: > According to its manpage the option should rather be shown like this: > > --force-with-lease[=[:]] > > ... to indicate that all three forms are valid: > > --force-with-lease > --force-with-lease=some_ref > --force-with-lease=

Re: [RFC] push: add documentation on push v2

2018-08-02 Thread Duy Nguyen
On Wed, Jul 25, 2018 at 7:46 PM Brandon Williams wrote: > > Could you send a v2 that covers all the push features in pack version > > 1? I see some are discussed but it's probably good to summarize in > > this document too. > > I can mention the ones we want to implement, but I expect that a push

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Thu, Aug 02 2018, René Scharfe wrote: > >> Am 02.08.2018 um 00:31 schrieb Ævar Arnfjörð Bjarmason: >>> But looking at this again it looks like this whole thing should just be >>> replaced by: >>> >>> diff --git a/builtin/push.c b/builtin/push.c >>> i

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
René Scharfe writes: > We could check if argh comes with its own angle brackets already and > not add a second pair in that case, making PARSE_OPT_LITERAL_ARGHELP > redundant in most cases, including the one above. Any downsides? > Too magical? Hmph. > -- >8 -- > Subject: [PATCH] parse-options

Re* [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
Junio C Hamano writes: > Ævar Arnfjörð Bjarmason writes: > >>> + /* N_() will get "<>" around, resulting in >>> ":" */ >> >> ...but this comment isn't accurate at all, N_() doesn't wrap the string >> with <>'s, as can be seen by applying this patch: > > I know. It is a short-hand f

Re: [PATCHv2 0/8] Add color test for range-diff, simplify diff.c

2018-08-02 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Aug 1, 2018 at 12:13 PM Junio C Hamano wrote: >> >> Stefan Beller writes: >> >> > Stefan Beller (8): >> > test_decode_color: understand FAINT and ITALIC >> > t3206: add color test for range-diff --dual-color >> > diff.c: simplify caller of emit_line_0 >> >

Re: Re* [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 17:44 schrieb Junio C Hamano: > Subject: [PATCH] push: use PARSE_OPT_LITERAL_ARGHELP instead of unbalanced > brackets > From: Ævar Arnfjörð Bjarmason > Date: Thu, 02 Aug 2018 00:31:33 +0200 > > The option help text for the force-with-lease option to "git push" > reads like this:

Re: Re* [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
René Scharfe writes: > Am 02.08.2018 um 17:44 schrieb Junio C Hamano: >> Subject: [PATCH] push: use PARSE_OPT_LITERAL_ARGHELP instead of unbalanced >> brackets >> From: Ævar Arnfjörð Bjarmason >> Date: Thu, 02 Aug 2018 00:31:33 +0200 >> ... >> official escape hatch instead. >> >> Helped-by: Re

Re: [PATCH/RFC] clone: report duplicate entries on case-insensitive filesystems

2018-08-02 Thread Junio C Hamano
Duy Nguyen writes: >> But even if inum is unreliable, we should be able to use other >> clues, perhaps the same set of fields we use for cached stat >> matching optimization we use for "diff" plumbing commands, to >> implement the error report. The more important part of the idea is >> that we a

Re: [PATCH] transport: report refs only if transport does

2018-08-02 Thread Jeff King
On Tue, Jul 31, 2018 at 04:23:43PM -0700, Jonathan Tan wrote: > > > Because transport_fetch_refs() filters the refs sent to the transport, > > > it cannot just report the transport's result directly, but first needs > > > to readd the excluded refs, pretending that they are fetched. However, > > >

Re: [PATCH] fetch-pack: unify ref in and out param

2018-08-02 Thread Jeff King
On Wed, Aug 01, 2018 at 01:13:20PM -0700, Jonathan Tan wrote: > When a user fetches: > - at least one up-to-date ref and at least one non-up-to-date ref, > - using HTTP with protocol v0 (or something else that uses the fetch >command of a remote helper) > some refs might not be updated after

Re: [RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread SZEDER Gábor
> Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with > invalid lines in .gitmodules but then only the second commit is removed. > > This may affect future subsequent tests if they assume that the > .gitmodules file has no errors. > > Since those commits are not needed anymore remov

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 17:31 schrieb Junio C Hamano: > René Scharfe writes: >> diff --git a/parse-options.c b/parse-options.c >> index 7db84227ab..fadfc6a833 100644 >> --- a/parse-options.c >> +++ b/parse-options.c >> @@ -660,7 +660,8 @@ int parse_options(int argc, const char **argv, const >> char *pre

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 08:31:57AM -0700, Junio C Hamano wrote: > > diff --git a/parse-options.c b/parse-options.c > > index 7db84227ab..fadfc6a833 100644 > > --- a/parse-options.c > > +++ b/parse-options.c > > @@ -660,7 +660,8 @@ int parse_options(int argc, const char **argv, const > > char *pre

Re: [PATCH 1/2] config: document git config getter return value.

2018-08-02 Thread Eric Sunshine
On Thu, Aug 2, 2018 at 8:13 AM Han-Wen Nienhuys wrote: > diff --git a/config.h b/config.h > @@ -178,10 +178,16 @@ struct config_set { > extern void git_configset_init(struct config_set *cs); > -extern int git_configset_add_file(struct config_set *cs, const char > *filename); > -extern int git_co

Re: [PATCH v3 2/2] sequencer: fix quoting in write_author_script

2018-08-02 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > Single quotes should be escaped as \' not \\'. The bad quoting breaks > the interactive version of 'rebase --root' (which is used when there is > no '--onto' even if the user does not specify --interactive) for authors > that contain "'" as sq_dequot

Re: [PATCH 1/2] config: document git config getter return value.

2018-08-02 Thread Junio C Hamano
Han-Wen Nienhuys writes: > --- > config.h | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Should I forge your sign-off on this patch? > > diff --git a/config.h b/config.h > index b95bb7649..41700f40b 100644 > --- a/config.h > +++ b/config.h > @@ -178,10 +178,16 @@ struct con

Re: [PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Eric, > > On Thu, 2 Aug 2018, Eric Sunshine wrote: > >> want_color_fd() is designed to work only with standard input, output, >> and error file descriptors, and stores information about each descriptor >> in an array. However, it doesn't verify that the passed-in

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Eric Sunshine
On Thu, Aug 2, 2018 at 7:46 AM Han-Wen Nienhuys wrote: > Sure. My doubt is that it's hard to tell what the state of my patch is > at any given time. Understandable. Junio sends out a periodic "What's cooking" email summarizing the state of patches sent to the list. The most recent one is here [1]

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 10:37 AM Eric Sunshine wrote: > > On Thu, Aug 2, 2018 at 7:46 AM Han-Wen Nienhuys wrote: > > Sure. My doubt is that it's hard to tell what the state of my patch is > > at any given time. > > Understandable. Junio sends out a periodic "What's cooking" email > summarizing the

Re: [PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Eric Sunshine
On Thu, Aug 2, 2018 at 1:37 PM Junio C Hamano wrote: > Johannes Schindelin writes: > > ACK! > > Did you write a buggy caller that would have been caught or helped > with this change? You did not write the callee that is made more > defensive with this patch, so I am being curious as to where tha

Question regarding quarantine environments

2018-08-02 Thread Liam Decker
Hi all, I've been working on a git hook in golang recently. However, the library I was using did not support a possible quarantine directory, which I would use for my hook. I have been trying to find out how git finds this incoming directory in the objects folder, as their code simply assumed it

Re: [PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 01:55:22PM +0200, SZEDER Gábor wrote: > Let's add a bit of Makefile metaprogramming to generate finer-grained > make targets applying one semantic patch to only a single source file, > and specify these as dependencies of the targets applying one semantic > patch to all sou

Re: [PATCH v2] checkout: optimize "git checkout -b "

2018-08-02 Thread Ben Peart
On 8/1/2018 11:10 AM, Duy Nguyen wrote: On Tue, Jul 31, 2018 at 7:03 PM Ben Peart wrote: From: Ben Peart Skip merging the commit, updating the index and working directory if and only if we are creating a new branch via "git checkout -b ." Any other checkout options will still go through t

Re: [RFC PATCH v2 01/12] submodule: add a print_config_from_gitmodules() helper

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > This will be used to print values just like "git config -f .gitmodules" > would. > > Signed-off-by: Antonio Ospite > --- > submodule-config.c | 25 + > submodule-config.h | 2 ++ > 2 files changed, 27 insertions(+)

Re: [RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 9:41 AM SZEDER Gábor wrote: > > > Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with > > invalid lines in .gitmodules but then only the second commit is removed. > > > > This may affect future subsequent tests if they assume that the > > .gitmodules file has n

Re: [PATCH 2/2] sideband: highlight keywords in remote sideband output

2018-08-02 Thread Junio C Hamano
Han-Wen Nienhuys writes: > The colorization is controlled with the config setting "color.remote". > ... > Finally, this solution is backwards compatible: many servers already > prefix their messages with "error", and they will benefit from this > change without requiring a server update. By contr

Re: [PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 02:01:55PM -0400, Jeff King wrote: > I suspect if we go with the one-spatch-per-source route, though, that we > could do this just with regular make rules. Yeah, it's pretty straightforward: diff --git a/Makefile b/Makefile index d616c0412..86fdcf567 100644 --- a/Makefile

Re: Question regarding quarantine environments

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 12:58:52PM -0500, Liam Decker wrote: > I've been working on a git hook in golang recently. However, the library I > was using did not support a possible quarantine directory, which I would > use for my hook. > > I have been trying to find out how git finds this incoming di

Re: What's cooking in git.git (Jul 2018, #03; Wed, 25)

2018-08-02 Thread Junio C Hamano
Christian Couder writes: > Looking at the code of the patches again, I can't see any simple way > to improve on the way it is done. Thanks.

Re: [RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread Junio C Hamano
SZEDER Gábor writes: >> Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with >> invalid lines in .gitmodules but then only the second commit is removed. >> >> This may affect future subsequent tests if they assume that the >> .gitmodules file has no errors. >> >> Since those commit

Re: git merge -s subtree seems to be broken.

2018-08-02 Thread Jeff King
On Tue, Jul 31, 2018 at 02:06:12PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Tue, Jul 31, 2018 at 01:23:04PM -0400, Jeff King wrote: > > ... > > So here it is fixed, and with a commit message. I'm not happy to omit a > > regression test, but I actually couldn't come up with a min

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 18:54 schrieb Jeff King: > PS I actually would have made the rule simply "does it begin with a > '<'", which seems simpler still. If people accidentally write " forgetting to close their brackets, that is a bug under both the > old and new behavior (just with slightly d

Re: [RFC PATCH v2 04/12] submodule--helper: add a new 'config' subcommand

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > Add a new 'config' subcommand to 'submodule--helper', this extra level > of indirection makes it possible to add some flexibility to how the > submodules configuration is handled. > > Signed-off-by: Antonio Ospite > --- > > Note that the te

Re: [RFC PATCH v2 06/12] submodule--helper: add a '--stage' option to the 'config' sub command

2018-08-02 Thread Junio C Hamano
Antonio Ospite writes: > Add a --stage option to the 'submodule--helper config' command so that > the .gitmodules file can be staged without referring to it explicitly by > its file path. Sorry, but I have no clue what the above is trying to say. The original 's--h config []' is quite understa

Re: git merge -s subtree seems to be broken.

2018-08-02 Thread Jeff King
On Wed, Aug 01, 2018 at 02:58:50AM +0200, René Scharfe wrote: > Am 31.07.2018 um 23:06 schrieb Junio C Hamano: > > Jeff King writes: > > > >> On Tue, Jul 31, 2018 at 01:23:04PM -0400, Jeff King wrote: > >> ... > >> So here it is fixed, and with a commit message. I'm not happy to omit a > >> regr

Re: [RFC PATCH v2 05/12] submodule: use the 'submodule--helper config' command

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > Use the 'submodule--helper config' command in git-submodules.sh to avoid > referring explicitly to .gitmodules by the hardcoded file path. ccol! This is the corner stone to the work of the previous patches. Nicely done! > This makes it pos

Re: [PATCH/RFC] clone: report duplicate entries on case-insensitive filesystems

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 09:27:31AM -0700, Junio C Hamano wrote: > > OK so we're going back to the original way of checking that we check > > out the different files on the same place (because fs is icase) and > > try to collect all paths for reporting, yes? I can give it another go > > (but of cou

Re: [RFC PATCH v2 08/12] t7506: cleanup .gitmodules properly before setting up new scenario

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > In t/t7506-status-submodule.sh at some point a new scenario is set up to > test different things, in particular new submodules are added which are > meant to completely replace the previous ones. > > However before calling the "git submodule

[PATCH 1/6] add, update-index: fix --chmod argument help

2018-08-02 Thread René Scharfe
Don't translate the argument specification for --chmod; "+x" and "-x" are the literal strings that the commands accept. Separate alternatives using a pipe character instead of a slash, for consistency. Use the flag PARSE_OPT_LITERAL_ARGHELP to prevent parseopt from adding a pair of angular bracke

[PATCH 3/6] pack-objects: specify --index-version argument help explicitly

2018-08-02 Thread René Scharfe
Wrap both placeholders in the argument help string in angular brackets to signal that users needs replace them with some actual value. Use the flag PARSE_OPT_LITERAL_ARGHELP to prevent parseopt from adding another pair. Signed-off-by: Rene Scharfe --- builtin/pack-objects.c | 4 ++-- 1 file cha

[PATCH 2/6] difftool: remove angular brackets from argument help

2018-08-02 Thread René Scharfe
Parseopt wraps arguments in a pair of angular brackets by default, signifying that the user needs to replace it with a value of the documented type. Remove the pairs from the option definitions to duplication and confusion. Signed-off-by: Rene Scharfe --- builtin/difftool.c | 4 ++-- 1 file cha

[PATCH 4/6] send-pack: specify --force-with-lease argument help explicitly

2018-08-02 Thread René Scharfe
Wrap each part of the argument help string in angular brackets to show that users need to replace them with actual values. Do that explicitly to balance the pairs nicely in the code and avoid confusing casual readers. Add the flag PARSE_OPT_LITERAL_ARGHELP to keep parseopt from adding another pai

[PATCH 6/6] parse-options: automatically infer PARSE_OPT_LITERAL_ARGHELP

2018-08-02 Thread René Scharfe
Parseopt wraps argument help strings in a pair of angular brackets by default, to tell users that they need to replace it with an actual value. This is useful in most cases, because most option arguments are indeed single values of a certain type. The option PARSE_OPT_LITERAL_ARGHELP needs to be

[PATCH 5/6] shortlog: correct option help for -w

2018-08-02 Thread René Scharfe
Wrap the placeholders in the option help string for -w in pairs of angular brackets to document that users need to replace them with actual numbers. Use the flag PARSE_OPT_LITERAL_ARGHELP to prevent parseopt from adding another pair. Signed-off-by: Rene Scharfe --- builtin/shortlog.c | 6 --

Re: [RFC PATCH v2 04/12] submodule--helper: add a new 'config' subcommand

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 11:47:30AM -0700, Stefan Beller wrote: > > +static int module_config(int argc, const char **argv, const char *prefix) > > +{ > > + if (argc < 2 || argc > 3) > > + die("submodule--helper config takes 1 or 2 arguments: name > > [value]"); > > + > > +

Re: [PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Aug 2, 2018 at 1:37 PM Junio C Hamano wrote: >> Johannes Schindelin writes: >> > ACK! >> >> Did you write a buggy caller that would have been caught or helped >> with this change? You did not write the callee that is made more >> defensive with this patch, so I

Re: [PATCH] color: protect against out-of-bounds array access/assignment

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 12:24:54PM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > > On Thu, Aug 2, 2018 at 1:37 PM Junio C Hamano wrote: > >> Johannes Schindelin writes: > >> > ACK! > >> > >> Did you write a buggy caller that would have been caught or helped > >> with this change? Y

Re: [PATCH] pack-objects: document about thread synchronization

2018-08-02 Thread Jeff King
On Sun, Jul 29, 2018 at 05:36:05PM +0200, Nguyễn Thái Ngọc Duy wrote: > These extra comments should be make it easier to understand how to use > locks in pack-objects delta search code. For reference, see > > 8ecce684a3 (basic threaded delta search - 2007-09-06) > 384b32c09b (pack-objects: fix th

Re: [PATCH] pack-objects: document about thread synchronization

2018-08-02 Thread Jeff King
On Sun, Jul 29, 2018 at 05:46:17PM +0200, Duy Nguyen wrote: > tOn Sun, Jul 29, 2018 at 5:36 PM Nguyễn Thái Ngọc Duy > wrote: > > > > These extra comments should be make it easier to understand how to use > > locks in pack-objects delta search code. For reference, see > > Side note. I wonder if

Re: [PoC] coccinelle: make Coccinelle-related make targets more fine-grained

2018-08-02 Thread Eric Sunshine
On Thu, Aug 2, 2018 at 2:02 PM Jeff King wrote: > On Thu, Aug 02, 2018 at 01:55:22PM +0200, SZEDER Gábor wrote: > > This approach uses $(eval), which we haven't used in any of our > > Makefiles yet. I wonder whether it's portable enough. And it's > > ugly and complicated. > > I looke

Re: [PATCH 0/3] sb/config-write-fix done without robbing Peter

2018-08-02 Thread Junio C Hamano
Stefan Beller writes: >> Am I correct to understand that this patch is a "FIX" for breakage >> introduced by that commit? The phrasing is not helping me to pick >> a good base to queue these patches on. > > Please pick 4f4d0b42bae (Merge branch 'js/empty-config-section-fix', > 2018-05-08) > as

Re: [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
René Scharfe writes: > Am 02.08.2018 um 18:54 schrieb Jeff King: >> PS I actually would have made the rule simply "does it begin with a >> '<'", which seems simpler still. If people accidentally write "> forgetting to close their brackets, that is a bug under both the >> old and new b

Re: [PATCH 6/6] parse-options: automatically infer PARSE_OPT_LITERAL_ARGHELP

2018-08-02 Thread Junio C Hamano
René Scharfe writes: > diff --git a/parse-options.c b/parse-options.c > index 7db84227ab..3b874a83a0 100644 > --- a/parse-options.c > +++ b/parse-options.c > @@ -660,7 +660,8 @@ int parse_options(int argc, const char **argv, const char > *prefix, > static int usage_argh(const struct option *opt

Re: [RFC PATCH v2 09/12] submodule: support reading .gitmodules even when it's not checked out

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > When the .gitmodules file is not available in the working tree, try > using HEAD:.gitmodules from the current branch. This covers the case > when the file is part of the repository but for some reason it is not > checked out, for example bec

Re: Re* [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 02 2018, Junio C Hamano wrote: > René Scharfe writes: > >> Am 02.08.2018 um 17:44 schrieb Junio C Hamano: >>> Subject: [PATCH] push: use PARSE_OPT_LITERAL_ARGHELP instead of unbalanced >>> brackets >>> From: Ævar Arnfjörð Bjarmason >>> Date: Thu, 02 Aug 2018 00:31:33 +0200 >>> ...

Re: Re* [PATCH] push: comment on a funny unbalanced option help

2018-08-02 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Thanks, FWIW that's fine by me, and also if you want to drop this "fake" > patch of mine and replace it with something René came up with (I have > not yet read his 1-6 patches submitted on this topic, so maybe they're > not mutually exclusive). I think the 6-pat

Re: [PATCH 1/6] add, update-index: fix --chmod argument help

2018-08-02 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 02 2018, René Scharfe wrote: > Don't translate the argument specification for --chmod; "+x" and "-x" > are the literal strings that the commands accept. > > Separate alternatives using a pipe character instead of a slash, for > consistency. > > Use the flag PARSE_OPT_LITERAL_ARGHELP

Re: [RFC PATCH v2 10/12] t7416: add new test about HEAD:.gitmodules and not existing .gitmodules

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > git submodule commands can now access .gitmodules from the current > branch even when it's not in the working tree, add some tests for that > scenario. > > Signed-off-by: Antonio Ospite > --- > > For the test files I used the most used styl

[PATCH] sha1dc: update from upstream

2018-08-02 Thread Ævar Arnfjörð Bjarmason
Update sha1dc from the latest version by the upstream maintainer[1]. See 2db87328ef ("Merge branch 'ab/sha1dc'", 2017-07-10) for the last update. This fixes an issue where AIX was wrongly detected as a Little-endian instead of a Big-endian system. See [2][3][4]. 1. https://github.com/cr-marcstev

Re: [RFC PATCH v2 11/12] dir: move is_empty_file() from builtin/am.c to dir.c and make it public

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > The is_empty_file() function can be generally useful, move it to dir.c > and make it public. > > Signed-off-by: Antonio Ospite Makes sense, Thanks, Stefan > +++ b/dir.c > @@ -2412,6 +2412,22 @@ int is_empty_dir(const char *path) >

  1   2   >