Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Johannes Sixt
Am 26.04.2016 um 23:37 schrieb Junio C Hamano: * The necessary update to avoid end-user mistake would look like this. I am not queuing this or further working on it myself, as I am not sure if it is all that useful. Whoever picks up this patch, be warned that the i18n coding should

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 08:59:22PM -0700, Stefan Beller wrote: > > Maybe we can do a mix of 2 and 4: > > > >1) HTTP grows more extensions; other protocols stagnate for now. > >2) Come up with a backwards-incompatible protocol v2, foccussed on > >capabilities negotiation phase,

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-26 Thread Stefan Beller
On Mon, Apr 25, 2016 at 3:10 PM, Stefan Beller wrote: > On Mon, Apr 25, 2016 at 9:44 AM, David Turner > wrote: >> On Wed, 2016-04-20 at 16:57 -0400, Jeff King wrote: >>> On Wed, Apr 20, 2016 at 04:46:55PM -0400, David Turner wrote: >>> >>> > As you

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Jacob Keller
On Tue, Apr 26, 2016 at 4:19 PM, Stefan Beller wrote: > On Tue, Apr 26, 2016 at 3:50 PM, Jacob Keller wrote: >> On Tue, Apr 26, 2016 at 1:50 PM, Stefan Beller wrote: >>> When adding new submodules, you can specify the >>> label(s)

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Eric Sunshine
On Tue, Apr 26, 2016 at 5:37 PM, Junio C Hamano wrote: > A user who uses "--no-commit" does so with the intention to record a > resulting merge after amending the merge result in the working tree. > But there is nothing to amend and record, if the same "git merge" > without

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-26 Thread Duy Nguyen
On Wed, Apr 27, 2016 at 5:07 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> This keeps top dir a bit less crowded. And because these programs are >> for testing purposes, it makes sense that they stay somewhere in t/ >> >> Signed-off-by:

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 3:50 PM, Jacob Keller wrote: > On Tue, Apr 26, 2016 at 1:50 PM, Stefan Beller wrote: >> When adding new submodules, you can specify the >> label(s) the submodule belongs to by giving one or more >> --label arguments. This will

Re: [PATCH 05/15] submodule-config: check if submodule a submodule is in a group

2016-04-26 Thread Junio C Hamano
Junio C Hamano writes: > I see room for bikeshedding here, but the material to bikeshed > around is not even documented yet ;-) > > * a token prefixed with '*' is a label. > * a token prefixed with './' is a path. > * a token prefixed with ':' is a name. > > Hopefully I

Re: [PATCH 05/15] submodule-config: check if submodule a submodule is in a group

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > index b6d4f27..23d7224 100644 > --- a/builtin/submodule--helper.c > +++ b/builtin/submodule--helper.c > @@ -814,6 +814,46 @@ static int update_clone(int argc, const char **argv,

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 11:20 AM, Stefan Beller wrote: > On Tue, Apr 26, 2016 at 11:05 AM, Junio C Hamano wrote: >> I think the way for you to indicate that desire expected by this >> series is to use "git branch" to set upstream of new-shiny-feature >>

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Jacob Keller
On Tue, Apr 26, 2016 at 1:50 PM, Stefan Beller wrote: > When adding new submodules, you can specify the > label(s) the submodule belongs to by giving one or more > --label arguments. This will record each label in the > .gitmodules file as a value of the key >

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > When adding new submodules, you can specify the > label(s) the submodule belongs to by giving one or more > --label arguments. This will record each label in the > .gitmodules file as a value of the key > "submodule.$NAME.label". > > Signed-off-by:

Re: [PATCH 02/15] submodule doc: write down what we want to achieve in this series

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > +When operating on submodules you can either give paths to specify the > +desired submodules or give no paths at all to apply the command to the > +default group of submodules. So, "git submodule foo path1 path2" would act on path1 and path2 but would

Re: [PATCH 01/15] string_list: add string_list_duplicate

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > The result of git_config_get_value_multi do not seem to be stable and > may get overwritten. Have an easy way to preserve the results of that > query. > > Signed-off-by: Stefan Beller > --- This morning I reviewed a patch that

Re: [PATCH 00/15] submodule groups (once again)

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > What is this series about? > == > > If you have lots of submodules, you probably don't need all of them at once, > but you have functional units. Some submodules are absolutely required, > some are optional and only for very

Re: [PATCH 00/15] submodule groups (once again)

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > git diff is supposed to view the differences between "what would I > get after checkout" (i.e. what is in the index run through smudge filters) > compared to the actual worktree. I do not think it affects your conclusion, but the above is wrong. "git

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-26 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This keeps top dir a bit less crowded. And because these programs are > for testing purposes, it makes sense that they stay somewhere in t/ > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > This patch will break any patches

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > and later > > if (!option_commit) > no_commit_impossible(_("Already up-to-date")); It would be more legible, but because there are so few callsites in an already shallow callchain, I do not think it makes that much of a difference in this

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 2:37 PM, Junio C Hamano wrote: > +static void no_commit_impossible(const char *message) > +{ > + if (!option_commit) { > + warning("%s\n%s", _(message), > + _("--no-commit is impossible")); > +

Re: RFC: Supporting .git/hooks/$NAME.d/* && /etc/git/hooks/$NAME.d/*

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I think it's fair enough to say that if we had this facility this > would be good enough: > > * Your hooks are executed in glob() order, local .git first, then > /etc/git/... > > * If it's a hook like pre-commit that can reject something the

[PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Junio C Hamano
A user who uses "--no-commit" does so with the intention to record a resulting merge after amending the merge result in the working tree. But there is nothing to amend and record, if the same "git merge" without "--no-commit" wouldn't have created a merge commit (there are two cases: (1) the other

[PATCH 1/2] merge: do not contaminate option_commit with --squash

2016-04-26 Thread Junio C Hamano
It is true that we do not make a commit when we are asked to do "merge --squash", and the code does so by setting option_commit variable to zero when seeing the squash option. But this made it impossible to see from the value of option_commit if --no-commit was given from the command line, or

Re: RFC: Supporting .git/hooks/$NAME.d/* && /etc/git/hooks/$NAME.d/*

2016-04-26 Thread Marc Branchaud
On 2016-04-26 12:09 PM, Ævar Arnfjörð Bjarmason wrote: Basically you can look at patches to a project on a spectrum of: 1. You hacked something up locally 2. It's in someone's *.git repo as a POC 3. It's a third-party patch series used by a bunch of people 4. In an official release but

[PATCH 09/15] submodule--helper init: respect submodule groups

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 19 +-- t/t7413-submodule--helper.sh | 15 +++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index

[PATCH 15/15] clone: allow specification of submodules to be cloned

2016-04-26 Thread Stefan Beller
This is in line with clone being the contraction of mkdir && cd git init git config git fetch git submodule update Signed-off-by: Stefan Beller --- Documentation/git-clone.txt | 6 +++ builtin/clone.c | 40 +--

[PATCH 12/15] git submodule summary respects groups

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 5 + t/t7413-submodule--helper.sh | 26 ++ 2 files changed, 31 insertions(+) diff --git a/git-submodule.sh b/git-submodule.sh index 253ad07..f065b1f 100755 --- a/git-submodule.sh +++

[PATCH 13/15] cmd_status: respect submodule groups

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/commit.c | 3 +++ t/t7413-submodule--helper.sh | 15 +++ wt-status.c | 2 ++ wt-status.h | 1 + 4 files changed, 21 insertions(+) diff --git a/builtin/commit.c

[PATCH 14/15] cmd_diff: respect submodule groups

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/diff.c | 2 ++ t/t7413-submodule--helper.sh | 15 +++ 2 files changed, 17 insertions(+) diff --git a/builtin/diff.c b/builtin/diff.c index 52c98a9..1c6abd5 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@

[PATCH 08/15] submodule--helper list: respect submodule groups

2016-04-26 Thread Stefan Beller
As submodule--helper list is the building block for some submodule commands (foreach, deinit, status, sync), also add tests for those. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 13 ++ t/t7413-submodule--helper.sh | 97

[PATCH 04/15] submodule-config: keep labels around

2016-04-26 Thread Stefan Beller
We need the submodule labels in a later patch. Signed-off-by: Stefan Beller --- submodule-config.c | 16 submodule-config.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/submodule-config.c b/submodule-config.c index b82d1fb..0cdb47e 100644 ---

[PATCH 10/15] submodule--helper update_clone: respect submodule groups

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 16 t/t7413-submodule--helper.sh | 36 2 files changed, 52 insertions(+) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index

[PATCH 11/15] diff: ignore submodules excluded by groups

2016-04-26 Thread Stefan Beller
We do not need to do anything special to initialize the `submodule_groups` pointer as the diff options setup will fill in 0 by default. Signed-off-by: Stefan Beller --- diff.c | 3 +++ diff.h | 1 + 2 files changed, 4 insertions(+) diff --git a/diff.c b/diff.c index

[PATCH 05/15] submodule-config: check if submodule a submodule is in a group

2016-04-26 Thread Stefan Beller
In later patches we need to tell if a submodule is in a group, which is defined by name, path or labels. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 43 ++- submodule-config.c | 50 +++

[PATCH 07/15] submodule deinit: loose requirement for giving '.'

2016-04-26 Thread Stefan Beller
This is needed later to make a distinction between 'all specified' and the default group of submodules. Signed-off-by: Stefan Beller --- git-submodule.sh | 5 - t/t7400-submodule-basic.sh | 1 - 2 files changed, 6 deletions(-) diff --git a/git-submodule.sh

[PATCH 01/15] string_list: add string_list_duplicate

2016-04-26 Thread Stefan Beller
The result of git_config_get_value_multi do not seem to be stable and may get overwritten. Have an easy way to preserve the results of that query. Signed-off-by: Stefan Beller --- string-list.c | 18 ++ string-list.h | 2 ++ 2 files changed, 20 insertions(+)

[PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Stefan Beller
When adding new submodules, you can specify the label(s) the submodule belongs to by giving one or more --label arguments. This will record each label in the .gitmodules file as a value of the key "submodule.$NAME.label". Signed-off-by: Stefan Beller ---

[PATCH 02/15] submodule doc: write down what we want to achieve in this series

2016-04-26 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/config.txt| 4 Documentation/git-submodule.txt | 8 2 files changed, 12 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 59d7046..c5b6a4e 100644 ---

[PATCH 06/15] submodule init: redirect stdout to stderr

2016-04-26 Thread Stefan Beller
Reroute the output of stdout to stderr as it is just informative messages, not to be consumed by machines. We want to init submodules from the helper for `submodule update` in a later patch and the stdout output of said helper is consumed by the parts of `submodule update` which are still written

[PATCH 00/15] submodule groups (once again)

2016-04-26 Thread Stefan Beller
New in this series: git status, git diff and all remaining git submodule subcommands. One pain point I am still aware of: `git diff` and `git status` completely ignore submodules which are not in the default group. I am not sure if that is a reasonable default. A poor analogy could be the

Re: [PATCH 10/83] builtin/apply: move 'check_index' global into 'struct apply_state'

2016-04-26 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 69 > + > 1 file changed, 40 insertions(+), 29 deletions(-) > > diff --git a/builtin/apply.c

Re: [PATCH 39/83] builtin/apply: move 'ws_error_action' into 'struct apply_state'

2016-04-26 Thread Junio C Hamano
Junio C Hamano writes: > As I do not expect that cmd_apply() which is a moral equivalent of > main() will stay to be the only one who wants to see a reasonably > initialized apply_state(), I think the patch that introduced the > very first version of "struct apply_state"

Re: [PATCH 39/83] builtin/apply: move 'ws_error_action' into 'struct apply_state'

2016-04-26 Thread Junio C Hamano
Christian Couder writes: > +enum ws_error_action { > + nowarn_ws_error, > + warn_on_ws_error, > + die_on_ws_error, > + correct_ws_error > +}; > + > struct apply_state { > const char *prefix; > int prefix_length; > @@ -80,6 +87,8 @@ struct

Re: [PATCH 22/83] builtin/apply: move 'unsafe_paths' global into 'struct apply_state'

2016-04-26 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c > index 506357c..c45e481 100644 > ---

Re: [PATCH 27/83] builtin/apply: move 'read_stdin' global into cmd_apply()

2016-04-26 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Makes sense but do so immediately next to 06/83, "options" thing? > diff --git a/builtin/apply.c

Re: [PATCH] remote.c: spell __attribute__ correctly

2016-04-26 Thread Philip Oakley
Thnx, From: "Ramsay Jones" On 25/04/16 22:50, Philip Oakley wrote: From: "Jeff King" On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote: It should be handled in git-compat-util.h, which is included by cache.h, which is included by

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-26 Thread Junio C Hamano
Christian Couder writes: >> It's not clear why we need to declare buf here? Oh wait it is. It's just >> moved from the start of the function. But why do it in this patch? >> It seems unrelated to the general intent of the patch. No need to reroll >> for this nit

Re: [PATCH 33/83] builtin/apply: move 'root' global into 'struct apply_state'

2016-04-26 Thread Christian Couder
On Mon, Apr 25, 2016 at 11:50 PM, Stefan Beller wrote: > On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder > wrote: > >> @@ -4630,9 +4644,10 @@ static int option_parse_whitespace(const struct >> option *opt, >> static int

Re: [PATCHv2 2/3] git-p4 tests: work with python3 as well as python2

2016-04-26 Thread Luke Diamand
On 26 April 2016 at 18:48, Junio C Hamano wrote: > Luke Diamand writes: > >> Update the git-p4 tests so that they work with both >> Python2 and Python3. >> >> We have to be explicit about the difference between >> Unicode text strings (Python3 default) and

Re: [PATCH v4 4/4] hooks: Add ability to specify where the hook directory is

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > +core.hooksPath:: > + By default Git will look for your hooks in the > + '$GIT_DIR/hooks' directory. Set this to different path, > + e.g. '/etc/git/hooks', and Git will try to find your hooks in > + that directory, e.g.

Re: [PATCH v4 2/4] githooks.txt: Amend dangerous advice about 'update' hook ACL

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Any ACL you implement via an 'update' hook isn't actual access control > if the user has login access to the machine running git, because they > can trivially just built their own git version which doesn't run the s/built their own git

Re: [PATCH v4 1/4] githooks.txt: Improve the intro section

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > * We note what happens with chdir() before a hook is called, nothing >documented this explicitly, but the current behavior is >predictable. It helps a lot to know what directory these hooks will >be executed from. I _think_ this

Re: [PATCH] config doc: improve exit code listing

2016-04-26 Thread Ramsay Jones
On 26/04/16 20:18, Stefan Beller wrote: > On Tue, Apr 26, 2016 at 12:11 PM, Ramsay Jones > wrote: >> >> >> On 26/04/16 19:10, Stefan Beller wrote: >>> The possible reasons for exiting are now ordered by the exit code value. >>> While at it, rewrite the `can not

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 26, 2016 at 9:16 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > +The path can either be absolute or relative. In the latter case see +the discussion in the "DESCRIPTION" section of linkgit:githooks[5] +about what the

Re: [PATCH] config doc: improve exit code listing

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 12:11 PM, Ramsay Jones wrote: > > > On 26/04/16 19:10, Stefan Beller wrote: >> The possible reasons for exiting are now ordered by the exit code value. >> While at it, rewrite the `can not write to the config file` to >> `the config file cannot

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >>> +The path can either be absolute or relative. In the latter case see >>> +the discussion in the "DESCRIPTION" section of linkgit:githooks[5] >>> +about what the relative path will be relative to. >> >> ... which does not seem to appear there,

Re: [PATCH] config doc: improve exit code listing

2016-04-26 Thread Ramsay Jones
On 26/04/16 19:10, Stefan Beller wrote: > The possible reasons for exiting are now ordered by the exit code value. > While at it, rewrite the `can not write to the config file` to > `the config file cannot be written` to be grammatically correct and a > proper sentence. > > Signed-off-by:

Re: [PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Junio C Hamano
Johannes Schindelin writes: > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 42d2b50..37b9af7 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1655,6 +1655,12 @@ http.emptyAuth:: > a username in the

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: >> So from where are you proposing Git to grab that information if you >> do not tell it? "If the HEAD is detached, assume that the base is >> where it was detached from" or something? > > That would also work for me. In my first mail I was proposing to

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-26 Thread Johannes Sixt
Am 22.04.2016 um 16:31 schrieb Johannes Schindelin: Often we are mmap()ing read-only. In those cases, it is wasteful to map in copy-on-write mode. Even worse: it can cause errors where we run out of space in the page file. So let's be extra careful to map files in read-only mode whenever

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 11:30 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> I can totally do that for longer series which require some back and forth. >> >> But one-offs, such as typo fixes or other small things[1], for which I do >> even have a

Re: [PATCH] config doc: improve exit code listing

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > The possible reasons for exiting are now ordered by the exit code value. Which makes sense. Will queue. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > I can totally do that for longer series which require some back and forth. > > But one-offs, such as typo fixes or other small things[1], for which I do > even have a local branch (i.e. checkout origin/master && fix && > commit && send-email) this is

Re: [PATCH v2 19/21] bisect: use a bottom-up traversal to find relevant weights

2016-04-26 Thread Junio C Hamano
Stephan Beyer writes: > struct commit_list *find_bisection(struct commit_list *list, > @@ -470,8 +541,11 @@ struct commit_list *find_bisection(struct commit_list > *list, > compute_all_weights(list, weights); > best = best_bisection_sorted(list); >

Re: [PATCH v5b 00/17] port branch.c to use ref-filter's printing options

2016-04-26 Thread Karthik Nayak
On Tue, Apr 26, 2016 at 3:17 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> This is part of unification of the commands 'git tag -l, git branch -l >> and git for-each-ref'. This ports over branch.c to use ref-filter's >> printing options. >> >>

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 11:05 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> git checkout origin/master >> # toy around, do stuff >> git checkout -b new-shiny-feature >> git format-patch origin-master.. >> >> Now I have set the

[PATCH v4 0/4] githooks.txt improvements + core.hooksDirectory

2016-04-26 Thread Ævar Arnfjörð Bjarmason
In this version of the series I've hopefully addressed all the comments that came up on the list after the last one, and a few fixes I noticed myself, e.g. a couple of grammar errors and a broken asciidoc syntax. I've combined both the githooks.txt documentation improvements and the

[PATCH v4 4/4] hooks: Add ability to specify where the hook directory is

2016-04-26 Thread Ævar Arnfjörð Bjarmason
Change the hardcoded lookup for .git/hooks/* to optionally lookup in $(git config core.hooksPath)/* instead. This is essentially a more intrusive version of the git-init ability to specify hooks on init time via init templates. The difference between that facility and this feature is that this

[PATCH v4 3/4] githooks.txt: Minor improvements to the grammar & phrasing

2016-04-26 Thread Ævar Arnfjörð Bjarmason
Change: * Sentences that needed "the" or "a" to either add those or change them so they don't need them. * The little tangent about "You can use this to do X (if your project wants to do X)" can just be shortened to "e.g. if you want to do X". * s/parameter/parameters/ when the plural

[PATCH v4 1/4] githooks.txt: Improve the intro section

2016-04-26 Thread Ævar Arnfjörð Bjarmason
Change the documentation so that: * We don't talk about "little scripts". Hooks can be as big as you want, and don't have to be scripts, just call them "programs". * We note what happens with chdir() before a hook is called, nothing documented this explicitly, but the current behavior is

[PATCH v4 2/4] githooks.txt: Amend dangerous advice about 'update' hook ACL

2016-04-26 Thread Ævar Arnfjörð Bjarmason
Any ACL you implement via an 'update' hook isn't actual access control if the user has login access to the machine running git, because they can trivially just built their own git version which doesn't run the hook. Change the documentation to take this dangerous edge case into account, and

[PATCH] config doc: improve exit code listing

2016-04-26 Thread Stefan Beller
The possible reasons for exiting are now ordered by the exit code value. While at it, rewrite the `can not write to the config file` to `the config file cannot be written` to be grammatically correct and a proper sentence. Signed-off-by: Stefan Beller ---

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > git checkout origin/master > # toy around, do stuff > git checkout -b new-shiny-feature > git format-patch origin-master.. > > Now I have set the format.useautobase option and then the `git format-patch` > fails with > > fatal:

Re: "gitk --author=foo" shows also parent

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 06:12:48PM +0200, Nikolai Kosjar wrote: > >I believe that this is intentional. Notice that the parent commit's > >circle is just outlined > >compared to the selected authored commits are filled. I consider this > >the context > >of the commits you are looking at. > >

Re: [PATCH 1/3] githooks.txt: Improve the intro section

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 25, 2016 at 8:23 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Change the documentation so that: >> >> * We don't talk about "little scripts". Hooks can be as big as you >>want, and don't have to be scripts, just call them

Re: RFC: Supporting .git/hooks/$NAME.d/* && /etc/git/hooks/$NAME.d/*

2016-04-26 Thread Christian Couder
On Tue, Apr 26, 2016 at 6:09 PM, Ævar Arnfjörð Bjarmason wrote: > On Tue, Apr 26, 2016 at 3:40 PM, Marc Branchaud wrote: >> On 2016-04-26 06:58 AM, Ævar Arnfjörð Bjarmason wrote: >>> >>> Makes sense to have an experimental.* config tree for git for stuff

Re: [PATCHv2] clone: add `--shallow-submodules` flag

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 10:46 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> I did not rebase this on 85705cfb (Merge branch 'ss/clone-depth-single-doc', >> 2016-01-20) or later, but worked on it with the base unchanged. > > Thanks, will replace.

Re: [PATCHv2 2/3] git-p4 tests: work with python3 as well as python2

2016-04-26 Thread Junio C Hamano
Luke Diamand writes: > Update the git-p4 tests so that they work with both > Python2 and Python3. > > We have to be explicit about the difference between > Unicode text strings (Python3 default) and raw binary > strings which will be exchanged with Perforce. > > Additionally,

Re: [PATCHv2] clone: add `--shallow-submodules` flag

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > I did not rebase this on 85705cfb (Merge branch 'ss/clone-depth-single-doc', > 2016-01-20) or later, but worked on it with the base unchanged. Thanks, will replace. > diff --git a/t/t5614-clone-submodules.sh b/t/t5614-clone-submodules.sh > new file

Re: [PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 10:20:19AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > But I think this block (even before my patch) also needs to handle the > > case where "value" is NULL (presumably by complaining with > > config_error_nonbool). > > OK, so squashes found to

Re: [PATCH v7 07/10] convert: unify the "auto" handling of CRLF

2016-04-26 Thread Junio C Hamano
Torsten Bögershausen writes: >>> diff --git a/convert.c b/convert.c >>> index 24ab095..3782172 100644 >>> --- a/convert.c >>> +++ b/convert.c >>> @@ -227,7 +227,9 @@ static enum eol output_eol(enum crlf_action crlf_action) >>> return EOL_LF; >>> case

Re: [PATCH 2/3] githooks.txt: Amend dangerous advice about 'update' hook ACL

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 25, 2016 at 8:29 PM, Junio C Hamano wrote: > Jacob Keller writes: > >>> -Another use suggested on the mailing list is to use this hook to >>> -implement access control which is finer grained than the one >>> -based on filesystem group. >>>

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 05:33:33PM +0200, Johannes Schindelin wrote: > Testing the headers? I dunno, do we have tests for that already? I thought > we did not: it requires an HTTP server (so that the headers are actually > sent) that we can force to check the header... > > So I see we have some

Re: [PATCH v6 0/4] Add --base option to git-format-patch to record base tree info

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 12:51 AM, Xiaolong Ye wrote: > Thanks for Junio's reviews and suggestions. > > This version contains the following changes since v5: > > - Fix a decl-after-statement in patch 3/4. > > - Improve testcases to cover more scenarios and make them more

Re: [PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Junio C Hamano
Jeff King writes: > But I think this block (even before my patch) also needs to handle the > case where "value" is NULL (presumably by complaining with > config_error_nonbool). OK, so squashes found to be necessary so far amounts to the attached patch. I still haven't figured

Re: [PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 10:03:14AM -0700, Junio C Hamano wrote: > > +http.extraHeader:: > > + Pass an additional HTTP header when communicating with a server. If > > + more than one such entry exists, all of them are added as extra headers. > > + This feature is useful e.g. to increase

Re: [PATCH v6 4/4] format-patch: introduce format.useAutoBase configuration

2016-04-26 Thread Stefan Beller
> +format.useAutoBase:: > + A boolean value which lets you enable the `--base=auto` option of > + format-patch by default. > + > + In case you resend, please use just one empty line here? (No need to resend because of this alone) -- To unsubscribe from this list: send the line

Re: [PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Junio C Hamano
Johannes Schindelin writes: > We introduce a way to send custom HTTP headers with all requests. > > This allows us, for example, to send an extra token from build agents > for temporary access to private repositories. (This is the use case that > triggered this

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-26 Thread Jeff King
On Tue, Apr 26, 2016 at 05:37:32PM +0200, Johannes Schindelin wrote: > > I think that's really the only sane way to do it because of curl's > > interfaces. But maybe it is worth a comment either here, or along with > > http_get_default_headers(), or both. > > I chose to rename it to

Re: [PATCH 3/3] githooks.txt: Minor improvements to the grammar & phrasing

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 25, 2016 at 8:33 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> -This hook is invoked by 'git am' script. It takes a single >> +This hook is invoked by 'git am'. It takes a single > > Good, as it does not matter to the readers

Re: [PATCH 18/83] builtin/apply: move 'numstat' global into 'struct apply_state'

2016-04-26 Thread Christian Couder
On Mon, Apr 25, 2016 at 11:40 PM, Stefan Beller wrote: > On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder > wrote: >> Signed-off-by: Christian Couder >> --- >> builtin/apply.c | 11 ++- >> 1 file changed, 6

Re: [PATCH v7 07/10] convert: unify the "auto" handling of CRLF

2016-04-26 Thread Torsten Bögershausen
On 25.04.16 21:37, Junio C Hamano wrote: > tbo...@web.de writes: Thanks for review. Some comments are inline, and a suggestion to a new commit message at the end. [] >> diff --git a/Documentation/config.txt b/Documentation/config.txt >> index 4a27ad4..9caf6ae 100644 >> ---

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 25, 2016 at 10:33 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> +core.hooksPath:: >> + By default Git will look for your hooks in the >> + '$GIT_DIR/hooks' directory. Set this to different path, >> + e.g.

Re: [PATCH 09/83] builtin/apply: move 'check' global into 'struct apply_state'

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 9:26 AM, Christian Couder wrote: >> >>> /* >>> - * --check turns on checking that the working tree matches the >>> - *files that are being modified, but doesn't apply the patch >> >> Oh I see it was moved from here. Not sure if we want to

Re: [PATCH 09/83] builtin/apply: move 'check' global into 'struct apply_state'

2016-04-26 Thread Christian Couder
On Mon, Apr 25, 2016 at 8:57 PM, Stefan Beller wrote: > On Sun, Apr 24, 2016 at 6:33 AM, Christian Couder > wrote: >> Signed-off-by: Christian Couder >> --- >> builtin/apply.c | 16 +--- >> 1 file changed, 9

Re: [PATCH] http: Support sending custom HTTP headers

2016-04-26 Thread Junio C Hamano
Johannes Schindelin writes: > Testing the headers? I dunno, do we have tests for that already? I thought > we did not: it requires an HTTP server (so that the headers are actually > sent) that we can force to check the header... > > So I see we have some tests that

Re: [PATCH 05/83] builtin/apply: extract line_by_line_fuzzy_match() from match_fragment()

2016-04-26 Thread Christian Couder
On Mon, Apr 25, 2016 at 8:50 PM, Stefan Beller wrote: >> @@ -2251,7 +2319,7 @@ static int match_fragment(struct image *img, >> int match_beginning, int match_end) >> { >> int i; >> - char *fixed_buf, *buf, *orig, *target; >> +

Re: "gitk --author=foo" shows also parent

2016-04-26 Thread Nikolai Kosjar
On 04/26/2016 04:06 PM, Mike Rappazzo wrote: On Tue, Apr 26, 2016 at 9:08 AM, Nikolai Kosjar wrote: Hi! $ gitk --author=foo ...seems to show also the parent of each author-matched commit, whereas $ git log --author=foo does not. Is this intended or a

Re: RFC: Supporting .git/hooks/$NAME.d/* && /etc/git/hooks/$NAME.d/*

2016-04-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 26, 2016 at 3:40 PM, Marc Branchaud wrote: > On 2016-04-26 06:58 AM, Ævar Arnfjörð Bjarmason wrote: >> >> Makes sense to have an experimental.* config tree for git for stuff like >> this. > > I disagree. > > * If the point is to express some kind of warning to

Re: [PATCH v2] string_list: use string-list API in unsorted_string_list_lookup()

2016-04-26 Thread Johannes Schindelin
Hi Ralf, On Mon, 25 Apr 2016, Ralf Thielow wrote: > Using the string-list API in function unsorted_string_list_lookup() > makes the code more readable. > > Signed-off-by: Ralf Thielow > --- > Changes since v1: > - remove extra curly braces ACK! Dscho -- To unsubscribe

[PATCH v2] http: support sending custom HTTP headers

2016-04-26 Thread Johannes Schindelin
We introduce a way to send custom HTTP headers with all requests. This allows us, for example, to send an extra token from build agents for temporary access to private repositories. (This is the use case that triggered this patch.) This feature can be used like this: git -c

  1   2   >