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

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 22:36 schrieb 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

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

2018-08-02 Thread Jonathan Nieder
Hi, Han-Wen Nienhuys wrote: > 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

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

2018-08-02 Thread Eric Sunshine
On Thu, Aug 2, 2018 at 8:13 AM Han-Wen Nienhuys wrote: > [PATCH 2/2] sideband: highlight keywords in remote sideband output The -v option of git-format-patch makes it easy to let reviewers know that this is a new version of a previously-submitted patch series. This (I think) is the second

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

2018-08-02 Thread Jonathan Nieder
(cc-ing peff, config whiz) Hi, Han-Wen Nienhuys wrote: > Subject: config: document git config getter return value. micronit: no period at the end of subject line > --- > config.h | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) May we forge your sign-off? See

Re: What's cooking in git.git (Aug 2018, #01; Thu, 2)

2018-08-02 Thread Pratik Karki
Hi Junio, On Fri, Aug 3, 2018 at 4:47 AM Junio C Hamano wrote: > > * pk/rebase-in-c (2018-07-30) 3 commits > - builtin/rebase: support running "git rebase " > - rebase: refactor common shell functions into their own file > - rebase: start implementing it as a builtin > > Rewrite of the

Re: Hash algorithm analysis

2018-08-02 Thread Jonathan Nieder
Hi Dan, Dan Shumow wrote: [replying out of order for convenience] > However, I agree with Adam Langley that basically all of the > finalists for a hash function replacement are about the same for the > security needs of Git. I think that, for this community, other > software engineering

Re: Question regarding quarantine environments

2018-08-02 Thread Jonathan Nieder
Hi, Jeff King wrote: > On Thu, Aug 02, 2018 at 12:58:52PM -0500, Liam Decker wrote: >> The solution that I implemented was to check the objects directory for the >> object, and if it was not there, to look for a quarantine directory and try >> there. However, that feels fairly inefficient. > >

[PATCH 0/3] Reroll of sb/config-write-fix

2018-08-02 Thread Stefan Beller
Only fix was in the commit message of the second patch: 2: c667e555066 ! 1749: 38e5f6f335d config: fix case sensitive subsection names on writing @@ -2,8 +2,8 @@ config: fix case sensitive subsection names on writing -A use reported a submodule issue regarding

[PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax

2018-08-02 Thread Stefan Beller
The bug was noticed when writing the previous patch; a fix for this bug is not easy though: If we choose to ignore the case of the subsection (and revert most of the code of the previous patch, just keeping s/strncasecmp/strcmp/), then we'd introduce new sections using the new syntax, such that

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-02 Thread Stefan Beller
A user reported a submodule issue regarding a section mix-up, but it could be boiled down to the following test case: $ git init test && cd test $ git config foo."Bar".key test $ git config foo."bar".key test $ tail -n 3 .git/config [foo "Bar"] key = test key = test

[PATCH 1/3] t1300: document current behavior of setting options

2018-08-02 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

Re: [PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-02 Thread Stefan Beller
On Wed, Aug 1, 2018 at 3:51 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > A use reported a submodule issue regarding strange case indentation > > issues, but it could be boiled down to the following test case: > > Perhaps > > s/use/user/ > s/case indentation issues/section mix-up/

Re: What's cooking in git.git (Aug 2018, #01; Thu, 2)

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 4:02 PM Junio C Hamano wrote: > * sb/config-write-fix (2018-08-01) 3 commits > - git-config: document accidental multi-line setting in deprecated syntax > - config: fix case sensitive subsection names on writing > - t1300: document current behavior of setting options >

What's cooking in git.git (Aug 2018, #01; Thu, 2)

2018-08-02 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. Many topics have moved to

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-08-02 Thread Stefan Beller
On Wed, Aug 1, 2018 at 11:16 PM Christian Couder wrote: > > From: Christian Couder > > Signed-off-by: Junio C Hamano > --- > Documentation/config.txt | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 43b2de7b5f..2d048d47f2

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

2018-08-02 Thread René Scharfe
Am 02.08.2018 um 22:01 schrieb 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

[PATCH v3] remote: make refspec follow the same disambiguation rule as local refs

2018-08-02 Thread Junio C Hamano
When matching a non-wildcard LHS of a refspec against a list of refs, find_ref_by_name_abbrev() returns the first ref that matches using any DWIM rules used by refname_match() in refs.c, even if a better match occurs later in the list of refs. This causes unexpected behavior when (for example)

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

2018-08-02 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 02 2018, Jeff King wrote: > 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

Re: [PATCH] sha1dc: update from upstream

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 1:51 PM Ævar Arnfjörð Bjarmason wrote: > diff --git a/sha1collisiondetection b/sha1collisiondetection > index 19d97bf5af..232357eb2e 16 > --- a/sha1collisiondetection > +++ b/sha1collisiondetection > @@ -1 +1 @@ > -Subproject commit

Re: [PATCH] sha1dc: update from upstream

2018-08-02 Thread Michael Felt (aixtools)
Sent from my iPhone > On 2 Aug 2018, at 22:50, Ævar Arnfjörð Bjarmason wrote: > > 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

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

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 03:46:08PM -0400, Eric Sunshine wrote: > 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

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

2018-08-02 Thread Jeff King
On Thu, Aug 02, 2018 at 02:14:30PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I also wonder if Windows could return some other file-unique identifier > > that would work in place of an inode here. That would be pretty easy to > > swap in via an #ifdef's helper function. I'd be OK

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

2018-08-02 Thread Junio C Hamano
Ramsay Jones writes: >> OPT_BOOL( 0 , "ignore-missing", _missing, N_("check if - even >> missing - files are ignored in dry run")), >> -OPT_STRING( 0 , "chmod", _arg, N_("(+/-)x"), N_("override the >> executable bit of the listed files")), >> +{ OPTION_STRING, 0, "chmod", _arg,

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

2018-08-02 Thread Junio C Hamano
Andrei Rybak writes: > On 2018-08-02 21:17, René Scharfe wrote: >> Don't translate the argument specification for --chmod; "+x" and "-x" >> are the literal strings that the commands accept. >> > [...] >> >> -OPT_STRING( 0 , "chmod", _arg, N_("(+/-)x"), N_("override the >> executable bit of

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

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > In particular this makes it possible to really clean things up when > removing the last submodule with "git rm". This sentence is a continuation of the subject line, and I had to reread it to follow along. > > The rationale is that if git

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

2018-08-02 Thread Junio C Hamano
Jeff King writes: > I also wonder if Windows could return some other file-unique identifier > that would work in place of an inode here. That would be pretty easy to > swap in via an #ifdef's helper function. I'd be OK shipping without that > and letting Windows folks fill it in later (as long

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

2018-08-02 Thread Andrei Rybak
On 2018-08-02 21:17, René Scharfe wrote: > Don't translate the argument specification for --chmod; "+x" and "-x" > are the literal strings that the commands accept. > > [...] > > - OPT_STRING( 0 , "chmod", _arg, N_("(+/-)x"), N_("override the > executable bit of the listed files")), > +

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

2018-08-02 Thread Ramsay Jones
On 02/08/18 20:17, 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

[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.

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) >

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

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: 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

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: [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

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

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

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: [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

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: [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

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?

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: [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]"); > > + > > +

[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

[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

[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

[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

[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

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

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

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

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 > >>

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

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

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

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

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

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: 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

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 ---

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

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

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

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

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

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: [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

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

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

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

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

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

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

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

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

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

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/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

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] 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

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* [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

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]

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 >>>

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 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 >

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/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,

[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

[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

[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

[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

[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

[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

[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

[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

[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

  1   2   >