[PATCH 1/1] config.txt: Fix formatting of submodule.alternateErrorStrategy section

2017-02-15 Thread David Pursehouse
From: David Pursehouse Add missing `::` after the title. Signed-off-by: David Pursehouse --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index

[PATCH 0/1] config.txt: Fix formatting of submodule.alternateErrorStrategy section

2017-02-15 Thread David Pursehouse
From: David Pursehouse Fixes a minor glitch in the formatting of the documentation. David Pursehouse (1): config.txt: Fix formatting of submodule.alternateErrorStrategy section Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.1

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Junio C Hamano
"Philip Oakley" writes: > For an integrator, or especially a CI tool, simply checking the second > parents of each topic merge (post fail) should at least indicate if > the basics of the feature actually passed the tests, though it doesn't > check for interaction issues.

[PATCH 01/15] lib-submodule-update.sh: reorder create_lib_submodule_repo

2017-02-15 Thread Stefan Beller
Redraw the ASCII art describing the setup using more space, such that it is easier to understand. The leaf commits are now ordered the same way the actual code is ordered. Add empty lines to the setup code separating each of the leaf commits, each starting with a "checkout -b". Signed-off-by:

[PATCH 15/15] builtin/checkout: add --recurse-submodules switch

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/git-checkout.txt | 7 +++ builtin/checkout.c | 28 t/lib-submodule-update.sh | 33 - t/t2013-checkout-submodule.sh | 5 + 4 files changed,

[PATCH 11/15] unpack-trees: pass old oid to verify_clean_submodule

2017-02-15 Thread Stefan Beller
The check (which uses the old oid) is yet to be implemented, but this part is just a refactor, so it can go separately first. Signed-off-by: Stefan Beller --- unpack-trees.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/unpack-trees.c

[PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- unpack-trees.c | 98 -- unpack-trees.h | 1 + 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 616a0ae4b2..40af8e9b5f 100644 ---

[PATCH 13/15] read-cache: remove_marked_cache_entries to wipe selected submodules.

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- read-cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/read-cache.c b/read-cache.c index 9054369dd0..b78a7f02e3 100644 --- a/read-cache.c +++ b/read-cache.c @@ -18,6 +18,7 @@ #include "varint.h" #include "split-index.h"

[PATCH 14/15] entry.c: update submodules when interesting

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- entry.c | 28 1 file changed, 28 insertions(+) diff --git a/entry.c b/entry.c index c6eea240b6..ae40611c97 100644 --- a/entry.c +++ b/entry.c @@ -2,6 +2,7 @@ #include "blob.h" #include "dir.h" #include

[PATCH 10/15] update submodules: add submodule_go_from_to

2017-02-15 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. This piece of code will be used universally for all these working tree modifications as it * supports dry run to answer the question: "Is it safe to change the submodule to this

[PATCH 06/15] update submodules: add submodule config parsing

2017-02-15 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 09/15] update submodules: move up prepare_submodule_repo_env

2017-02-15 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

[PATCH 04/15] make is_submodule_populated gently

2017-02-15 Thread Stefan Beller
We need the gentle version in a later patch. As we have just one caller, migrate the caller. Signed-off-by: Stefan Beller --- builtin/grep.c | 2 +- submodule.c| 7 ++- submodule.h| 8 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH 07/15] update submodules: add a config option to determine if submodules are updated

2017-02-15 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller --- submodule.c | 6 ++ submodule.h | 1

[PATCH 03/15] lib-submodule-update.sh: define tests for recursing into submodules

2017-02-15 Thread Stefan Beller
Currently lib-submodule-update.sh provides 2 functions test_submodule_switch and test_submodule_forced_switch that are used by a variety of tests to ensure that submodules behave as expected. The current expected behavior is that submodules are not touched at all (see 42639d2317a for the exact

[PATCH 08/15] submodules: introduce check to see whether to touch a submodule

2017-02-15 Thread Stefan Beller
In later patches we introduce the --recurse-submodule flag for commands that modify the working directory, e.g. git-checkout. It is potentially expensive to check if a submodule needs an update, because a common theme to interact with submodules is to spawn a child process for each interaction.

[PATCH 05/15] connect_work_tree_and_git_dir: safely create leading directories

2017-02-15 Thread Stefan Beller
In a later patch we'll use connect_work_tree_and_git_dir when the directory for the gitlink file doesn't exist yet. Safely create the directory first. One of the two users of 'connect_work_tree_and_git_dir' already checked for the directory being there, so we can loose that check. Signed-off-by:

[RFCv4 PATCH 00/14] Checkout aware of Submodules!

2017-02-15 Thread Stefan Beller
previous work: https://public-inbox.org/git/20161203003022.29797-1-sbel...@google.com/ v4: * addressed all comments of Brian, Junio and Brandon. Thanks! * one major point of change is the introduction of another patch "lib-submodule-update.sh: do not use ./. as submodule remote", as that

[PATCH 02/15] lib-submodule-update.sh: do not use ./. as submodule remote

2017-02-15 Thread Stefan Beller
Adding the repository itself as a submodule does not make sense in the real world. In our test suite we used to do that out of convenience in some tests as the current repository has easiest access for setting up 'just a submodule'. However this doesn't quite test the real world, so let's do not

Re: [PATCH 14/14] builtin/checkout: add --recurse-submodules switch

2017-02-15 Thread Stefan Beller
On Tue, Feb 14, 2017 at 6:08 PM, brian m. carlson wrote: > On Tue, Feb 14, 2017 at 04:34:23PM -0800, Stefan Beller wrote: >> +--[no-]recurse-submodules:: >> + Using --recurse-submodules will update the content of all initialized >> + submodules according to

[PATCH v3] reset: add an example of how to split a commit into two

2017-02-15 Thread Jacob Keller
From: Jacob Keller It is often useful to break a commit into multiple parts that are more logical separations. This can be tricky to learn how to do without the brute-force method if re-writing code or commit messages from scratch. Add a section to the git-reset

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Junio C Hamano
"Philip Oakley" writes: > It may even be worth 'splitting' the pu branch sequence into the > existing pu (with merges from series that are selected as reasonable), > and then a pr branch (public review?) on top of that holding the rest > of the series that have been

Re: Confusing git messages when disk is full.

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 02:50:19PM -0800, Junio C Hamano wrote: > > That works, but the fact that we need a comment is a good sign that it's > > kind of gross. It's too bad stdio does not specify the return of fclose > > to report an error in the close _or_ any previous error. I guess we > >

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Philip Oakley
From: "Johannes Schindelin" Hi Philip, On Tue, 14 Feb 2017, Philip Oakley wrote: From: "Christian Couder" > On Tue, Feb 14, 2017 at 10:08 PM, Junio C Hamano > wrote: > > Johannes Schindelin

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Junio C Hamano
Ahh, that would work, too. On Wed, Feb 15, 2017 at 3:43 PM, Stefan Beller wrote: > On Wed, Feb 15, 2017 at 3:37 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> Yes; though I'd place it in strbuf.{c,h} as it is operating >>>

[PATCH] config: preserve case for one-shot config on the command line

2017-02-15 Thread Junio C Hamano
The "git -c = cmd" mechanism is to pretend that a configuration variable is set to while the cmd is running. The code to do so however downcased in its entirety, which is wrong for a three-level ... The part needs to stay as-is. Reported-by: Lars Schneider

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 3:37 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Yes; though I'd place it in strbuf.{c,h} as it is operating >> on the internals of the strbuf. (Do we make any promises outside of >> strbuf about the internals? I mean we

Re: how are "untracked working tree files" even possible in this case?

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies wrote: > Hi, > > I have a script that runs the following sequence of commands within a clone: > > - > /usr/bin/git rebase --abort (took 148ms) > /usr/bin/git cherry-pick --abort (took 103ms) Is there more happening

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > Yes; though I'd place it in strbuf.{c,h} as it is operating > on the internals of the strbuf. (Do we make any promises outside of > strbuf about the internals? I mean we use .buf all the time, so maybe > I am overly cautious here) I'd rather have it

Re: [PATCH] mingw: make stderr unbuffered again

2017-02-15 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> FWIW I wish it were different, that git.git's `master` reflected more >> closely what the current Git for Windows version has. > > Well, we two wishing the same thing together without doing

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Philip Oakley
[sorry for the repeated emails - I'd prepared it off line, and then suffered a number of auto send actions] From: "Junio C Hamano" "Philip Oakley" writes: In the next..pu case the abstraction is in the other direction, we have potentially multiple

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Jonathan Tan
On 02/15/2017 03:11 PM, Junio C Hamano wrote: Junio C Hamano writes: Perhaps something like this? This looks good. I was hoping to unify the processing logic between this CLI parsing and the usual stream parsing, but this approach is probably simpler. config.c | 16

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 3:11 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Jonathan Tan writes: >> >>> I had some time to look into this, and yes, command-line parameters >>> are too aggressively downcased

Re: [PATCH 04/14] connect_work_tree_and_git_dir: safely create leading directories

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Feb 15, 2017 at 10:22 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> In a later patch we'll use connect_work_tree_and_git_dir when the >>> directory for the gitlink file doesn't exist yet.

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Tan writes: > >> I had some time to look into this, and yes, command-line parameters >> are too aggressively downcased ("git_config_parse_parameter" calls >> "strbuf_tolower" on the entire key part in config.c). > >

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Junio C Hamano
Jonathan Tan writes: > I had some time to look into this, and yes, command-line parameters > are too aggressively downcased ("git_config_parse_parameter" calls > "strbuf_tolower" on the entire key part in config.c). Ahh, thanks. So this is not about submodules at all;

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Jonathan Tan
On 02/15/2017 10:53 AM, Junio C Hamano wrote: Lars Schneider writes: It looks like as if submodule configs ("submodule.*") for submodules with upper case names are ignored. This observation is surprising, as the second level in three-level names like ".." is

Re: [PATCH 04/14] connect_work_tree_and_git_dir: safely create leading directories

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 10:22 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> In a later patch we'll use connect_work_tree_and_git_dir when the >> directory for the gitlink file doesn't exist yet. Safely create >> the directory first. >> >>

Re: Confusing git messages when disk is full.

2017-02-15 Thread Junio C Hamano
Jeff King writes: > Good catch. I think we use a nasty bitwise-OR elsewhere to do that. > Ah, here it is, in tempfile.c: > > /* > * Note: no short-circuiting here; we want to fclose() > * in any case! > */ >

Re: [PATCH v2 2/2] completion: checkout: complete paths when ref given

2017-02-15 Thread Cornelius Weig
On 02/15/2017 03:26 PM, SZEDER Gábor wrote: > On Tue, Feb 14, 2017 at 10:24 PM, wrote: > >> + *) >> + __git_complete_tree_file "$ref" "$cur" >> + ;; > > There is one more caveat here. > > Both our

Re: [PATCH 03/14] make is_submodule_populated gently

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 10:10 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> We need the gentle version in a later patch. As we have just one caller, >> migrate the caller. > > Ordinarily, we keep the original helper implemented as a thin > wrapper

Re: Confusing git messages when disk is full.

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 02:28:10PM -0800, Junio C Hamano wrote: > Jeff King writes: > > >> abort: > >>strbuf_release(); > >>free(url); > >> - fclose(fp); > >> + if (ferror(fp)) > >> + rc = -1; > >> + if (fclose(fp)) > >> + rc = -1; > >>return

Re: Confusing git messages when disk is full.

2017-02-15 Thread Junio C Hamano
Jeff King writes: >> abort: >> strbuf_release(); >> free(url); >> -fclose(fp); >> +if (ferror(fp)) >> +rc = -1; >> +if (fclose(fp)) >> +rc = -1; >> return rc; > > Yeah, I think this works. Normally you'd want to flush before

Re: [PATCH] mingw: make stderr unbuffered again

2017-02-15 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > ... > The hat of a person who sees how patches are reviewed before they enter > pu/next/master/maint of git.git. > ... > make sense. This makes my life harder, but I believe that the alternative > would be *not* to have those

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: There are also a few ideas at the SO answers: http://stackoverflow.com/a/5652323/717355 I vaguely recall that I saw somebody said the same "mark tips of topics as good" on the list and answered with why

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: There are also a few ideas at the SO answers: http://stackoverflow.com/a/5652323/717355 I vaguely recall that I saw somebody said the same "mark tips of topics as good" on the list and answered with why

Re: Back quote typo in error messages (?)

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 09:51:30PM +, Fabrizio Cucci wrote: > > Some people use the matched backtick/single-quote to emulate the > > non-symmetric start/end quotes used in traditional typography (and in > > fact, ``foo'' in languages like asciidoc are typically rendered using > >

Re: [PATCH] show-branch: fix crash with long ref name

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 01:50:07PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > I see the patches are marked for 'next' in the latest What's Cooking. > > If it is not too late in today's integration cycle, here is a re-roll of > > patch 3 that squashes in Pranit's

Re: Confusing git messages when disk is full.

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 01:47:23PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote: > > If FETCH_HEAD failed to write because of a full disk (or any other > > reason), then the right thing is for "git fetch"

Re: Back quote typo in error messages (?)

2017-02-15 Thread Fabrizio Cucci
On 15 February 2017 at 21:21, Jeff King wrote: > On Wed, Feb 15, 2017 at 09:06:46PM +, Fabrizio Cucci wrote: >> Shouldn't the wrong flag be surrounded by two single quotes instead of >> a back quote and a single quote? > > Some people use the matched backtick/single-quote to

Re: [PATCH] show-branch: fix crash with long ref name

2017-02-15 Thread Junio C Hamano
Jeff King writes: > I see the patches are marked for 'next' in the latest What's Cooking. > If it is not too late in today's integration cycle, here is a re-roll of > patch 3 that squashes in Pranit's suggestion (if it is too late, then > Pranit, you may want to re-send it as a

Re: Confusing git messages when disk is full.

2017-02-15 Thread Junio C Hamano
Jeff King writes: > On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote: > If FETCH_HEAD failed to write because of a full disk (or any other > reason), then the right thing is for "git fetch" to write an error to > stderr, and git-pull should not continue the

Re: [PATCH] show-branch: fix crash with long ref name

2017-02-15 Thread Jeff King
On Tue, Feb 14, 2017 at 10:29:46PM +0100, Christian Couder wrote: > > I notice Christian's patch added a few tests. I don't know if we'd want > > to squash them in (I didn't mean to override his patch at all; I was > > about to send mine out when I noticed his, and I wondered if we wanted > > to

Re: Confusing git messages when disk is full.

2017-02-15 Thread Jeff King
On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote: > Hello, I would like to report what I consider a bug in git, I hope I'm > doing it the right way. > I was trying to run `git pull` in my repository and got the following > error: "git pull > Your configuration specifies to merge

Re: Back quote typo in error messages (?)

2017-02-15 Thread Junio C Hamano
Jeff King writes: > So I think what you are seeing is not wrong in the sense of being > unintended by the author of the message. But I do think that git mostly > uses matched double or single quotes in its error messages, and the > non-symmetric quotes are relatively rare.

Re: Non-zero exit code without error

2017-02-15 Thread Jeff King
On Tue, Feb 14, 2017 at 10:56:02AM +0300, Serdar Sahin wrote: > Just to see, if GIT server causes some issues, I’ve pushed to repo to > github public as a private repo, and can reproduce the issue there as > well. FWIW, that server will be running roughly the same version of Git that is on your

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Junio C Hamano
"Philip Oakley" writes: > In the next..pu case the abstraction is in the other direction, we > have potentially multiple points of infection (from feature branches), > and a broad test (the whole test suite). In this case I believe we > would like to investigate initially

Re: enhance git-add to avoid password being staged or committed?

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 10:36:32PM +0800, ryenus wrote: > This can be an optional feature, once enabled, git-add would check the > hunk(s) to stage for sensitive information, such as passwords, secret > tokens, then ask the user for confirmation. > > The implementation for secret detection could

Re: Back quote typo in error messages (?)

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 09:06:46PM +, Fabrizio Cucci wrote: > it's been a couple of days that I keep noticing something (very minor) > that my OCD for symmetric things can't really stand. > > If you run the following command: > > $ git branch --i-dont-exists > > you should get: > > error:

Back quote typo in error messages (?)

2017-02-15 Thread Fabrizio Cucci
Hello everyone, it's been a couple of days that I keep noticing something (very minor) that my OCD for symmetric things can't really stand. If you run the following command: $ git branch --i-dont-exists you should get: error: unknown option `i-dont-exists' Shouldn't the wrong flag be

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: There are also a few ideas at the SO answers: http://stackoverflow.com/a/5652323/717355 I vaguely recall that I saw somebody said the same "mark tips of topics as good" on the list and answered with why

Re: [PATCH] mingw: make stderr unbuffered again

2017-02-15 Thread Johannes Sixt
Am 15.02.2017 um 13:32 schrieb Johannes Schindelin: On Tue, 14 Feb 2017, Johannes Sixt wrote: Am 14.02.2017 um 15:47 schrieb Johannes Schindelin: On Mon, 13 Feb 2017, Junio C Hamano wrote: Johannes Schindelin writes: What we forgot was to mark stderr as

Re: how are "untracked working tree files" even possible in this case?

2017-02-15 Thread G. Sylvie Davies
On Wed, Feb 15, 2017 at 12:38 PM, G. Sylvie Davies wrote: > On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies > wrote: >> Hi, >> >> I have a script that runs the following sequence of commands within a clone: >> >> - >> /usr/bin/git rebase

Re: how are "untracked working tree files" even possible in this case?

2017-02-15 Thread G. Sylvie Davies
On Wed, Feb 15, 2017 at 12:36 PM, G. Sylvie Davies wrote: > Hi, > > I have a script that runs the following sequence of commands within a clone: > > - > /usr/bin/git rebase --abort (took 148ms) > /usr/bin/git cherry-pick --abort (took 103ms) > /usr/bin/git clean -d -f

how are "untracked working tree files" even possible in this case?

2017-02-15 Thread G. Sylvie Davies
Hi, I have a script that runs the following sequence of commands within a clone: - /usr/bin/git rebase --abort (took 148ms) /usr/bin/git cherry-pick --abort (took 103ms) /usr/bin/git clean -d -f -x (took 2007ms) /usr/bin/git reflog expire --expire=now --all (took 106ms) /usr/bin/git reset

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Junio C Hamano
Lars Schneider writes: > It looks like as if submodule configs ("submodule.*") for submodules > with upper case names are ignored. This observation is surprising, as the second level in three-level names like ".." is designed to be case sensitive. A code that uses the

Re: [PATCH 02/14] lib-submodule-update.sh: define tests for recursing into submodules

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 8:51 AM, Brandon Williams wrote: > On 02/14, Stefan Beller wrote: >> diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh >> index 61c54f2098..7c8c557572 100755 >> --- a/t/lib-submodule-update.sh >> +++ b/t/lib-submodule-update.sh >> @@

Re: [PATCH 07/14] update submodules: introduce is_interesting_submodule

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 9:04 AM, Brandon Williams wrote: > On 02/14, Stefan Beller wrote: >> In later patches we introduce the --recurse-submodule flag for commands >> that modify the working directory, e.g. git-checkout. >> >> It is potentially expensive to check if a

Re: [PATCH v1] t7400: cleanup "submodule add clone shallow submodule" test

2017-02-15 Thread Junio C Hamano
Lars Schneider writes: > The test creates a "super" directory that is not removed after the > test finished. This directory is not used in any subsequent tests and > should therefore be removed. > > Signed-off-by: Lars Schneider > --- > > I

Re: [RFCv3 PATCH 00/14] Checkout aware of Submodules!

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > Integrate updating the submodules into git checkout, with the same > safety promises that git-checkout has, i.e. not throw away data unless > asked to. This is done by first checking if the submodule is at the same > sha1 as it is recorded in the

Re: [PATCH v1] t7400: cleanup "submodule add clone shallow submodule" test

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 3:33 AM, Lars Schneider wrote: > @Junio: I think this patch should be applied regardless of the bug. Sounds good; thanks! Stefan

Re: [PATCH 05/14] update submodules: add submodule config parsing

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > Similar to b33a15b08 (push: add recurseSubmodules config option, > 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the > fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code > that is later used to parse whether we

Re: [PATCH 04/14] connect_work_tree_and_git_dir: safely create leading directories

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > In a later patch we'll use connect_work_tree_and_git_dir when the > directory for the gitlink file doesn't exist yet. Safely create > the directory first. > > Signed-off-by: Stefan Beller Among the existing two callers, the

Re: [BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Stefan Beller
On Wed, Feb 15, 2017 at 3:17 AM, Lars Schneider wrote: > It looks like as if submodule configs ("submodule.*") for submodules > with upper case names are ignored. The test cases shows that skipping > a submodule during a recursive clone seems not to work. > >

Re: [PATCH 03/14] make is_submodule_populated gently

2017-02-15 Thread Junio C Hamano
Stefan Beller writes: > We need the gentle version in a later patch. As we have just one caller, > migrate the caller. Ordinarily, we keep the original helper implemented as a thin wrapper that passes NULL as retun_error_code, which causes it to die() on error for existing

Re: [PATCH 07/14] update submodules: introduce is_interesting_submodule

2017-02-15 Thread Brandon Williams
On 02/14, Stefan Beller wrote: > In later patches we introduce the --recurse-submodule flag for commands > that modify the working directory, e.g. git-checkout. > > It is potentially expensive to check if a submodule needs an update, > because a common theme to interact with submodules is to

Re: [PATCH 02/14] lib-submodule-update.sh: define tests for recursing into submodules

2017-02-15 Thread Brandon Williams
On 02/14, Stefan Beller wrote: > diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh > index 61c54f2098..7c8c557572 100755 > --- a/t/lib-submodule-update.sh > +++ b/t/lib-submodule-update.sh > @@ -4,6 +4,7 @@ > # - New submodule (no_submodule => add_sub1) > # - Removed submodule

Re: [PATCH 0/5] A series of performance enhancements in the memihash and name-cache area

2017-02-15 Thread Jeff King
On Wed, Feb 15, 2017 at 09:27:53AM -0500, Jeff Hostetler wrote: > I have some informal numbers in a spreadsheet. I was seeing > a 8-9% speed up on a status on my gigantic repo. > > I'll try to put together a before/after perf-test to better > demonstrate this. Thanks. What I'm mostly curious

Re: What's cooking in git.git (Feb 2017, #04; Tue, 14)

2017-02-15 Thread René Scharfe
Am 14.02.2017 um 23:59 schrieb Junio C Hamano: * rs/ls-files-partial-optim (2017-02-13) 2 commits - ls-files: move only kept cache entries in prune_cache() - ls-files: pass prefix length explicitly to prune_cache() "ls-files" run with pathspec has been micro-optimized to avoid one extra

enhance git-add to avoid password being staged or committed?

2017-02-15 Thread ryenus
This can be an optional feature, once enabled, git-add would check the hunk(s) to stage for sensitive information, such as passwords, secret tokens, then ask the user for confirmation. The implementation for secret detection could be regexp pattern(s), and/or (trusted?) commands Alternative

Re: [PATCH 0/5] A series of performance enhancements in the memihash and name-cache area

2017-02-15 Thread Jeff Hostetler
On 2/14/2017 5:03 PM, Jeff King wrote: On Tue, Feb 14, 2017 at 12:31:46PM +0100, Johannes Schindelin wrote: On Windows, calls to memihash() and maintaining the istate.name_hash and istate.dir_hash HashMaps take significant time on very large repositories. This series of changes reduces the

Re: [PATCH v2 2/2] completion: checkout: complete paths when ref given

2017-02-15 Thread SZEDER Gábor
On Tue, Feb 14, 2017 at 10:24 PM, wrote: > + *) > + __git_complete_tree_file "$ref" "$cur" > + ;; There is one more caveat here. Both our __git_complete_index_file() and Bash's builtin filename completion

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Johannes Schindelin
Hi Philip, On Tue, 14 Feb 2017, Philip Oakley wrote: > From: "Christian Couder" > > On Tue, Feb 14, 2017 at 10:08 PM, Junio C Hamano > > wrote: > > > Johannes Schindelin writes: > > > > > > > On Mon, 13 Feb 2017, Junio

Re: [git-for-windows] Re: Continuous Testing of Git on Windows

2017-02-15 Thread Johannes Schindelin
Hi Christian, On Wed, 15 Feb 2017, Christian Couder wrote: > On Tue, Feb 14, 2017 at 10:08 PM, Junio C Hamano > wrote: > > > Probably a less resource intensive approach is to find the tips of the > > topics not in 'next' but in 'pu' and test them. That would give you > >

Re: git-p4.py caching

2017-02-15 Thread Lars Schneider
> On 14 Feb 2017, at 19:16, Martin-Louis Bright wrote: [CC'ing Luke and George] > hi! > > I am using git-p4.py to migrate a lot of medium and large Perforce > depots into git. I almost exclusively go one way: from Perforce to > git. I also frequently re-clone/re-migrate

Re: [PATCH] completion: restore removed line continuating backslash

2017-02-15 Thread SZEDER Gábor
On Wed, Feb 15, 2017 at 3:41 AM, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> If you feel uncomfortable and want these to cook longer, please tell >>> me so. >> >> Well, it was mainly my surprise that a 20+ patch series arriving so >> late that it

Re: [PATCH] mingw: make stderr unbuffered again

2017-02-15 Thread Johannes Schindelin
Hi Junio, On Tue, 14 Feb 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> OK. Should this go directly to 'master', as the isatty thing is > >> already in? > > > > From my point of view, it is not crucial. The next Git for Windows > > version will

Re: [PATCH] mingw: make stderr unbuffered again

2017-02-15 Thread Johannes Schindelin
Hi Hannes, On Tue, 14 Feb 2017, Johannes Sixt wrote: > Am 14.02.2017 um 15:47 schrieb Johannes Schindelin: > > On Mon, 13 Feb 2017, Junio C Hamano wrote: > > > Johannes Schindelin writes: > > > > When removing the hack for isatty(), we actually removed more than > >

Clarification about "Better tooling for reviews", was Re: Google Doc about the Contributors' Summit

2017-02-15 Thread Johannes Schindelin
Hi Junio, On Fri, 10 Feb 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Technically, it is not a write-up, and I never meant it to be that. I > > intended this document to help me remember what had been discussed, > > and I doubt it is useful at all

Re: missing handling of "No newline at end of file" in git am

2017-02-15 Thread Olaf Hering
On Tue, Feb 14, Olaf Hering wrote: > How would I debug it? One line is supposed to be longer than 998 chars, but something along the way truncated it and corrupted the patch. No idea why the error today is different from the error yesterday. 'git pull' has to be used in this case. Olaf

[PATCH v1] t7400: cleanup "submodule add clone shallow submodule" test

2017-02-15 Thread Lars Schneider
The test creates a "super" directory that is not removed after the test finished. This directory is not used in any subsequent tests and should therefore be removed. Signed-off-by: Lars Schneider --- I just noticed that my bug report test does not run properly without

[BUG] submodule config does not apply to upper case submodules?

2017-02-15 Thread Lars Schneider
It looks like as if submodule configs ("submodule.*") for submodules with upper case names are ignored. The test cases shows that skipping a submodule during a recursive clone seems not to work. Signed-off-by: Lars Schneider --- I observed the bug on Windows, macOS,

Re: [PATCH v2 2/2] completion: checkout: complete paths when ref given

2017-02-15 Thread Cornelius Weig
Although I'm not convinced that completion of modified files is unnecessary, I'm at least persuaded that not all users would welcome such a change. Given the hint from Gabor that Alt-/ forces filesystem completion, there is even no big win in stopping to offer further refnames after one has