Bug: Segfault when doing "git diff"

2015-10-28 Thread Mathias L. Baumann
Hello dear git devs, I just stumbled upon a segfault when doing just "git diff" in my repo. I managed to create a minimal repo setup where the bug is reproducable. The problem seems to be a mix of having an untracked submodule and having set an alternates file for one submodule. Attached

Re: [PATCH/RFC] receive-pack: allow for hiding refs outside the namespace

2015-10-28 Thread Jeff King
On Wed, Oct 28, 2015 at 08:00:45AM +0100, Lukas Fleischer wrote: > My original question remains: Do we want to continue supporting things > like transfer.hideRefs=.have (which currently magically hides all refs > outside the current namespace)? For 100% backwards compatibility, we > would have

[PATCH] git-p4: Handle p4 submit failure

2015-10-28 Thread Etienne Girard
Clean the workspace if p4_write_pipe raised SystemExit, so that the user don't have to do it themselves. Signed-off-by: GIRARD Etienne --- git-p4.py | 71 +-- 1 file changed, 37 insertions(+), 34 deletions(-) The p4

Re: Bug: Segfault when doing "git diff"

2015-10-28 Thread Victor Leschuk
On 10/28/2015 02:58 PM, Mathias L. Baumann wrote: Hello dear git devs, I just stumbled upon a segfault when doing just "git diff" in my repo. I managed to create a minimal repo setup where the bug is reproducable. The problem seems to be a mix of having an untracked submodule and having

Re: Bug: Segfault when doing "git diff"

2015-10-28 Thread Mathias L. Baumann
I was using the latest git version 2.6.2 already. I suspect it is due to a .gitconfig. This is what is probably required: ➜ ~ cat .gitconfig [diff] submodule = log On 28/10/15 13:24, Victor Leschuk wrote: On 10/28/2015 02:58 PM, Mathias L. Baumann wrote: Hello dear git devs, I just

Re: [PATCH v3 2/2] rebase-i: work around Windows CRLF line endings

2015-10-28 Thread Johannes Schindelin
Hi Junio, On Tue, 27 Oct 2015, Junio C Hamano wrote: > Johannes Schindelin writes: > > > My apologies: I forgot to spell out explicitly that this passes in Git > > for Windows 2.x' SDK: It does. > > Can you add that to the log message? Your cover letter may also

[PATCH v4 1/2] Demonstrate rebase fails when the editor saves with CR/LF

2015-10-28 Thread Johannes Schindelin
Based on a bug report by Chad Boles. Signed-off-by: Johannes Schindelin --- t/t3404-rebase-interactive.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 3de0b1d..5dfa16a 100755 ---

[PATCH] add_submodule_odb: initialize alt_odb list earlier

2015-10-28 Thread Jeff King
On Wed, Oct 28, 2015 at 02:35:23PM +0100, Mathias L. Baumann wrote: > I was using the latest git version 2.6.2 already. > I suspect it is due to a .gitconfig. This is what is probably required: > > ➜ ~ cat .gitconfig > [diff] > submodule = log Yeah, I can reproduce it easily with that.

Re: Bug: Segfault when doing "git diff"

2015-10-28 Thread Victor Leschuk
On 10/28/2015 04:35 PM, Mathias L. Baumann wrote: I was using the latest git version 2.6.2 already. I suspect it is due to a .gitconfig. This is what is probably required: ➜ ~ cat .gitconfig [diff] submodule = log Yep, that did the trick. The segfault is from sha1_file.c: /* add the

[PATCH v4 0/2] Fix interactive rebase when the editor saves with CR/LF

2015-10-28 Thread Johannes Schindelin
Chad Boles reported that `git rebase -i` recently started producing errors when the editor saves files with DOS line endings. The symptom is: Warning: the command isn't recognized in the following line: - You can fix this with 'git rebase --edit-todo'. Or you can

[PATCH v4 2/2] rebase-i: work around Windows CRLF line endings

2015-10-28 Thread Johannes Schindelin
From: Junio C Hamano Editors on Windows can and do save text files with CRLF line endings, which is the convention on the platform. We are seeing reports that the "read" command in a port of bash to the environment however does not strip the CRLF at the end, not adjusting for

Re: [PATCH] add_submodule_odb: initialize alt_odb list earlier

2015-10-28 Thread Junio C Hamano
Jeff King writes: > Yeah, I can reproduce it easily with that. Thanks for providing the > repository. It takes a rather convoluted set of conditions to trigger > the bug. :) > > Here's the fix: > > -- >8 -- > Subject: add_submodule_odb: initialize alt_odb list earlier > > The

Re: git repack command on larger pack file

2015-10-28 Thread Junio C Hamano
Jeff King writes: > Git tries to take some shortcuts when repacking: if two objects are in > the same pack but not deltas, it will not consider making deltas out of > them. The logic is we would already have tried that while making the > original pack. But of course when you are

Re: Why are submodules not automatically handled by default or at least configurable to do so?

2015-10-28 Thread Nazri Ramliy
On Tue, Oct 27, 2015 at 12:56 AM, Jens Lehmann wrote: > Which seems a bit error prone as you could forget to update the submodules > and build incorrect rpms from them, or am I missing something? For my case I'm not building the rpms directly after merging in the fixes done

Re: git repack command on larger pack file

2015-10-28 Thread Junio C Hamano
Junio C Hamano writes: >> [1] This is all theory, and I don't know how well git actually finds >> such deltas, but it is probably better to have a dense tree of >> deltas rather than long chains. If you have a chain of N objects >> and would to add object N+1 to

Re: [PATCH/RFC] receive-pack: allow for hiding refs outside the namespace

2015-10-28 Thread Lukas Fleischer
On Tue, 27 Oct 2015 at 19:18:26, Junio C Hamano wrote: > [...] > When I asked 'Is transfer.hiderefs insufficient?', I wasn't > expecting it to be usable out of box. It was a suggestion to build > on top of it, instead of adding a parallel support for something > specific to namespaces. >

[PATCH 1/2] http: allow selection of proxy authentication method

2015-10-28 Thread Knut Franke
CURLAUTH_ANY does not work with proxies which answer unauthenticated requests with a 307 redirect to an error page instead of a 407 listing supported authentication methods. Therefore, allow the authentication method to be set using the environment variable GIT_HTTP_PROXY_AUTHMETHOD or

[PATCH 2/2] http: use credential API to handle proxy authentication

2015-10-28 Thread Knut Franke
Currently, the only way to pass proxy credentials to curl is by including them in the proxy URL. Usually, this means they will end up on disk unencrypted, one way or another (by inclusion in ~/.gitconfig, shell profile or history). Since proxy authentication often uses a domain user, credentials

[PATCH v2] http proxy authentication improvements

2015-10-28 Thread Knut Franke
Fixes in the second iteration: * rename http.proxy-authmethod to http.proxyAuthmethod for consistency with other core git variables * issue warning() instead of error() for unsupported authentication method, for consistency with http.sslVersion * fix some code formatting / style issues

Re: [PATCH/RFC] receive-pack: allow for hiding refs outside the namespace

2015-10-28 Thread Junio C Hamano
Lukas Fleischer writes: > Another patch I have in my patch queue adds support for a whitelist mode > to hideRefs. There are several ways to implement that: > > 1. Make transfer.hideRefs='' hide all refs (it currently does not). The Hmph, that even sounds like a bug.

Re: What's the ".git/gitdir" file?

2015-10-28 Thread Junio C Hamano
Mike Rappazzo writes: > On Tue, Oct 27, 2015 at 6:54 PM, Junio C Hamano wrote: >> Kyle Meyer writes: >> >>> When a ".git" file points to another repo, a ".git/gitdir" file is >>> created in that repo. >>> >>> For example, running >>> >>>

[PATCH] Allow hideRefs to match refs outside the namespace

2015-10-28 Thread Lukas Fleischer
Right now, refs with a path outside the current namespace are replaced by ".have" before passing them to show_ref() which in turn checks whether the ref matches the hideRefs pattern. Move the check before the path substitution in show_ref_cb() such that the hideRefs feature can be used to hide

Re: [PATCH] Allow hideRefs to match refs outside the namespace

2015-10-28 Thread Junio C Hamano
Lukas Fleischer writes: > Right now, refs with a path outside the current namespace are replaced > by ".have" before passing them to show_ref() which in turn checks > whether the ref matches the hideRefs pattern. Move the check before the > path substitution in show_ref_cb()

Re: [PATCH 1/2] http: allow selection of proxy authentication method

2015-10-28 Thread Junio C Hamano
Knut Franke writes: > CURLAUTH_ANY does not work with proxies which answer unauthenticated requests > with a 307 redirect to an error page instead of a 407 listing supported > authentication methods. Therefore, allow the authentication method to be set > using the

Re: [PATCH v2] format-patch: introduce format.outputDirectory configuration

2015-10-28 Thread Junio C Hamano
Junio C Hamano writes: > Looks like there were mostly editorial niggles and no fundamental > flaws in the design of the patch; it is somewhat a shame to make all > the efforts go to waste. Will we be seeing an update soon? Second ping as I am going through the what's cooking

A call for Charity

2015-10-28 Thread Mrs
My Name is Mrs Jessica Peterside from United Kingdom who is suffering from cancer of the lungs I wish to use my fund to serve the poor in your country contact me via email ( mrsjessicapeters...@gmail.com ) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message

Re: [PATCH 1/2] http: allow selection of proxy authentication method

2015-10-28 Thread Eric Sunshine
In addition to Junio's review comments... On Wednesday, October 28, 2015, Knut Franke wrote: > CURLAUTH_ANY does not work with proxies which answer unauthenticated requests > with a 307 redirect to an error page instead of a 407 listing supported > authentication

Re: [PATCH v2 2/2] object name: introduce '^{/!-}' notation

2015-10-28 Thread Junio C Hamano
Will Palmer writes: > In summary: it looks like I'll be sending another one. Has anything happened to this topic since then? I am asking primarily because I want to decide if I should discard wp/sha1-name-negative-match topic from my tree [*1*]. I think what it attempts to

Re: [PATCH] add_submodule_odb: initialize alt_odb list earlier

2015-10-28 Thread Jeff King
On Wed, Oct 28, 2015 at 08:24:17AM -0700, Junio C Hamano wrote: > > Note that we can remove the prepare_alt_odb call from the > > end. It is guaranteed to be a noop, since we will have > > called it earlier. > > Thanks for a quick and detailed diagnosis and a fix. > > The removal is correct,

[PATCH 0/3] bash-completion fixes for global git options handling

2015-10-28 Thread Peter Wu
Hi, These patches improve bash-completion when global git options are present. Consider this problem: bash-4.3$ git -C ../linux staerror: invalid key: alias.../linux This happens because the current script is unaware of the -C option. In general, global options are not handled well (patch

Re: [PATCH 1/2] prepare_packed_git(): refactor garbage reporting in pack directory

2015-10-28 Thread Junio C Hamano
Junio C Hamano writes: > Eric Sunshine writes: > >>> -static void real_report_garbage(const char *desc, const char *path) >>> +const char *bits_to_msg(unsigned seen_bits) >> >> If you don't expect other callers outside this file, then this should >>

Re: [PATCH v4 0/2] Fix interactive rebase when the editor saves with CR/LF

2015-10-28 Thread Junio C Hamano
Johannes Schindelin writes: > Turns out that we now check whether a single Carriage Return is a valid > command. This new check was introduced recently (1db168ee9, ironically > named "rebase-i: loosen over-eager check_bad_cmd check"). Will queue. The root cause is

[PATCH 3/3] completion: handle git -C option

2015-10-28 Thread Peter Wu
Avoid the "fatal: bad config file line 5 in config" message and properly complete git commands having the "-C" option. Besides the trivial command parsing, __gitdir is rewritten to apply any directory changes requested via `git -C otherdir ...`. Signed-off-by: Peter Wu ---

[PATCH 2/3] completion: pass --git-dir to more commands

2015-10-28 Thread Peter Wu
The --git-dir option influences more commands, but was not applied during completions. For example: # previously empty because --git-dir was not passed to ls-remote git --git-dir=git/.git config merge.o Add --git-dir to more git commands (but not for repo-independent commands such as git

[PATCH 1/3] completion: ignore git options for subcommand completion

2015-10-28 Thread Peter Wu
Do not assume that the first option after "git" is a subcommand. This fixes completion such as: # do not detect "push" as remote name git --git-dir=git/.git push origin # do not overwrite "--git-dir=..." with the alias expansion git --git-dir=git/.git gerrit-diff Signed-off-by:

Re: [PATCH 2/2] http: use credential API to handle proxy authentication

2015-10-28 Thread Eric Sunshine
On Wednesday, October 28, 2015, Knut Franke wrote: > Currently, the only way to pass proxy credentials to curl is by including them > in the proxy URL. Usually, this means they will end up on disk unencrypted, > one > way or another (by inclusion in ~/.gitconfig,

Bug: dcommit fails when a file with '@' in the name is renamed

2015-10-28 Thread Dimitar Dobrev
When a file with '@' in the name is renamed - for example moved - dcommit fails with: Assertion failed: (svn_uri_is_canonical(child_uri, NULL)), function uri_skip_ancestor, file subversion/libsvn_subr/dirent_uri.c, line 1520. error: git-svn died of signal 6 I have sent a fix

Re: [PATCH v3] ref-filter: fallback on alphabetical comparison

2015-10-28 Thread Karthik Nayak
On Wed, Oct 28, 2015 at 1:20 AM, Junio C Hamano wrote: >> Hence, fallback to alphabetical comparison based on the refname >> whenever the other criterion is equal. Fix the test in t3203 in this >> regard. > > It is unclear what "in this regard" is. Do you mean this (I am not >

Re: [PATCHv1 2/2] git-p4: work with a detached head

2015-10-28 Thread Luke Diamand
On 28/10/15 17:44, Junio C Hamano wrote: Luke Diamand writes: On 9 September 2015 at 22:52, Junio C Hamano wrote: Luke Diamand writes: ... def currentGitBranch(): return read_pipe("git name-rev HEAD").split("

Re: [PATCH] difftool: avoid symlinks when reusing worktree files

2015-10-28 Thread David Aguilar
On Tue, Oct 27, 2015 at 03:24:49PM -0700, Junio C Hamano wrote: > David Aguilar writes: > > > difftool's dir-diff should never reuse a symlink, regardless of > > what it points to. Tighten use_wt_file() so that it rejects all > > symlinks. > > > > Helped-by: Junio C Hamano

Re: [PATCH 3/6] Facilitate debugging Git executables in tests with gdb

2015-10-28 Thread Victor Leschuk
+if test -n "$TEST_GDB_GIT" +then + exec gdb -args "${GIT_EXEC_PATH}/@@PROG@@" "$@" Maybe we could make $TEST_GDB_GIT not just a boolean flag? It would be useful to contain "gdb" executable name. It would allow to set path to GDB when it is not in $PATH, set different debuggers (for

Re: [PATCH 6/9] clone: allow an explicit argument for parallel submodule clones

2015-10-28 Thread Stefan Beller
On Tue, Oct 27, 2015 at 1:57 PM, Junio C Hamano wrote: >> + The number of submodules fetched at the same time. > > Do we want to say "Defaults to submodule.jobs" somewhere? Yes. :) > I am tempted to suggest that you should not pay attention to > "submodule.jobs" in this

Re: [PATCH 5/9] submodule update: expose parallelism to the user

2015-10-28 Thread Stefan Beller
On Tue, Oct 27, 2015 at 1:59 PM, Junio C Hamano wrote: > And when 0 starts to meaning something special, we would need to > describe that here (and/or submodule.jobs entry in config.txt). > As I already said, I do not think "0 means num_cpus" is a useful > default, and I would

Re: [PATCH 3/3] clone: Allow an explicit argument for parallel submodule clones

2015-10-28 Thread Sebastian Schuberth
On 23.10.2015 20:44, Stefan Beller wrote: [...] which may pick reasonable defaults if you don't specify an explicit number. IMO the above should also be mentioned ini the docs: +-j:: +--jobs:: + The number of submodules fetched at the same time. Otherwise, from reading the docs, my

Re: fatal: Unable to read current working directory: No error

2015-10-28 Thread Jeff King
On Tue, Oct 27, 2015 at 07:29:39PM -0400, Sean Krauth wrote: > This seemed like about as good of an excuse as any to update Git. I > was running v. 2.5.1-32-bit and so I downloaded v. 2.6.2-32-bit, > installed it. And it ran, kinda. I no longer seem to have access to > any of my old commits and

[PATCH 13/17] cat-file: read batch stream with strbuf_gets()

2015-10-28 Thread Junio C Hamano
It is possible to prepare a text file with a DOS editor and feed it as a batch command stream to the command. Signed-off-by: Junio C Hamano --- builtin/cat-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index

[PATCH 03/17] update-index: read --index-info with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Signed-off-by: Junio C Hamano --- builtin/update-index.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index 7431938..dfc65a8 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -473,7

Re: [PATCH v1] git-p4: Add option to ignore empty commits

2015-10-28 Thread Lars Schneider
On 26 Oct 2015, at 21:40, Luke Diamand wrote: > On 24/10/15 19:08, Lars Schneider wrote: >> >> On 21 Oct 2015, at 08:32, Luke Diamand wrote: >> >>> On 19/10/15 19:43, larsxschnei...@gmail.com wrote: From: Lars Schneider

Re: [PATCH v3] ref-filter: fallback on alphabetical comparison

2015-10-28 Thread Junio C Hamano
Karthik Nayak writes: > On Wed, Oct 28, 2015 at 1:20 AM, Junio C Hamano wrote: >>> Hence, fallback to alphabetical comparison based on the refname >>> whenever the other criterion is equal. Fix the test in t3203 in this >>> regard. >> >> It is unclear

[PATCH 11/17] clone/sha1_file: read info/alternates with strbuf_gets()

2015-10-28 Thread Junio C Hamano
$GIT_OBJECT_DIRECTORY/info/alternates is a text file that can be edited with a DOS editor. We do not want to use the real path with CR appeneded at the end. Signed-off-by: Junio C Hamano --- builtin/clone.c | 2 +- sha1_file.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 07/17] revision: read --stdin with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Reading with getwholeline() and manually stripping the terminating '\n' would leave CR at the end of the line if the input comes from a DOS editor. Constrasting this with the previous few changes, one may realize that the way "log" family of commands read the paths with --stdin looks inconsistent

[PATCH 09/17] ident.c: read /etc/mailname with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Just in case /etc/mailname file was edited with a DOS editor, read it with strbuf_gets() so that a stray CR is not included as the last character of the mail hostname. We _might_ want to more aggressively discard whitespace characters around the line with strbuf_trim(), but that is a bit outside

[PATCH 16/17] grep: read -f file with strbuf_gets()

2015-10-28 Thread Junio C Hamano
List of patterns file could come from a DOS editor. This is iffy; you may actually be trying to find a line with ^M in it on a system whose line ending is LF. You can of course work it around by having a line that has "^M^M^J", let the strbuf_gets() eat the last "^M^J", leaving just the single

[PATCH 00/17] Peace with CRLF

2015-10-28 Thread Junio C Hamano
We have too many topics titled "War on something"; let's try to make peace for a change. This is a continuation to $gmane/275735, which is filed in the archive under another mailing list: http://thread.gmane.org/gmane.comp.version-control.msysgit/21773 We read "text" files from filesystem (or

[PATCH 01/17] strbuf: add strbuf_gets()

2015-10-28 Thread Junio C Hamano
Often we read "text" files that are supplied by the end user (e.g. commit log message that was edited with $GIT_EDITOR upon 'git commit -e'), and in some environments lines in a text file are terminated with CRLF. Existing strbuf_getline() knows to read a single line and then strip the

[PATCH 06/17] hash-object: read --stdin-paths with strbuf_gets()

2015-10-28 Thread Junio C Hamano
The list of paths could have been written with a DOS editor. Signed-off-by: Junio C Hamano --- builtin/hash-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 43b098b..46d55e5 100644 ---

[PATCH 15/17] send-pack: read list of refs with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Signed-off-by: Junio C Hamano --- builtin/send-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index f6e5d64..ba318c9 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -212,7 +212,7 @@ int

[PATCH 08/17] rev-parse: read parseopt spec with strbuf_gets()

2015-10-28 Thread Junio C Hamano
"rev-parse --parseopt" specification is clearly text and we should anticipate that we may be fed CRLF lines. Signed-off-by: Junio C Hamano --- builtin/rev-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c

[PATCH 04/17] update-index: read list of paths with strbuf_gets() under --stdin

2015-10-28 Thread Junio C Hamano
Signed-off-by: Junio C Hamano --- builtin/update-index.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index dfc65a8..004871b 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -1075,7

Re: [PATCH 1/2] prepare_packed_git(): refactor garbage reporting in pack directory

2015-10-28 Thread Doug Kelly
On Wed, Oct 28, 2015 at 12:48 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Eric Sunshine writes: >> -static void real_report_garbage(const char *desc, const char *path) +const char *bits_to_msg(unsigned

[PATCH] merge-file: clamp exit code to maximum 127

2015-10-28 Thread Jeff King
Git-merge-file is documented to return one of three exit codes: - zero means the merge was successful - a negative number means an error occurred - a positive number indicates the number of conflicts Unfortunately, this all gets stuffed into an 8-bit return code. Which means that if you

Re: [PATCH 5/9] submodule update: expose parallelism to the user

2015-10-28 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Oct 27, 2015 at 1:59 PM, Junio C Hamano wrote: >> And when 0 starts to meaning something special, we would need to >> describe that here (and/or submodule.jobs entry in config.txt). >> As I already said, I do not think "0

[PATCH 17/17] test-sha1-array: read command stream with strbuf_gets()

2015-10-28 Thread Junio C Hamano
The input to this command comes from a pipeline in t0064, whose upstream has bunch of "echo"s. It is not unreasonable to expect that it may be fed CRLF lines on DOSsy systems. Signed-off-by: Junio C Hamano --- test-sha1-array.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 02/17] check-attr, check-ignore, checkout-index: read paths with strbuf_gets()

2015-10-28 Thread Junio C Hamano
These commands read list of paths from their standard input under the --stdin option (in order to avoid busting limit on the length of the command line). When they are using text input mode (i.e. line_termination is set to '\n'), we should try to be more friendly to our DOSsy friends and accept

[PATCH 05/17] mktree: read textual tree representation with strbuf_gets()

2015-10-28 Thread Junio C Hamano
The input can come from a DOS editor. Signed-off-by: Junio C Hamano --- builtin/mktree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/mktree.c b/builtin/mktree.c index a964d6b..a55f067 100644 --- a/builtin/mktree.c +++ b/builtin/mktree.c @@

[PATCH 12/17] transport-helper: read helper response with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Our implementation of helpers never use CRLF line endings, and they do not depend on the ability to place a CR as payload at the end of the line, so this is essentially a no-op for in-tree users. However, this allows third-party implementation of helpers to give us their line with CRLF line

[PATCH 10/17] remote.c: read $GIT_DIR/remotes/* with strbuf_gets()

2015-10-28 Thread Junio C Hamano
These files can be edited with a DOS editor, leaving CR at the end of the line if read with strbuf_getline(). Signed-off-by: Junio C Hamano --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote.c b/remote.c index 1101f82..90eef22 100644 ---

[PATCH 14/17] column: read lines with strbuf_gets()

2015-10-28 Thread Junio C Hamano
Multiple lines read here are concatenated on a single line to form a multi-column output line. We do not want to have a CR at the end, even if the input file consists of CRLF terminated lines. Signed-off-by: Junio C Hamano --- builtin/column.c | 2 +- 1 file changed, 1

git fsck failure on OS X with files >= 4 GiB

2015-10-28 Thread Rafael Espíndola
I first noticed this with "2.4.9 (Apple Git-60)", but it reproduces with git built from 37023ba381b6d251d7140a997b39b566dbc63c42. Create two files with just 0s: -rw-r--r-- 1 espindola staff 4294967296 28 Oct 11:09 exactly-4gib -rw-r--r-- 1 espindola staff 4294967295 28 Oct 11:09

[PATCHv2 8/8] clone: allow an explicit argument for parallel submodule clones

2015-10-28 Thread Stefan Beller
Just pass it along to "git submodule update", which may pick reasonable defaults if you don't specify an explicit number. Signed-off-by: Stefan Beller --- Documentation/git-clone.txt | 6 +- builtin/clone.c | 23 +--

[PATCHv2 2/8] submodule config: keep update strategy around

2015-10-28 Thread Stefan Beller
We need the submodule update strategies in a later patch. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule-config.c | 11 +++ submodule-config.h | 1 + 2 files changed, 12 insertions(+) diff --git a/submodule-config.c

[PATCHv2 4/8] submodule-config: parse_config

2015-10-28 Thread Stefan Beller
This rewrites parse_config to distinguish between configs specific to one submodule and configs which apply generically to all submodules. We do not have generic submodule configs yet, but the next patch will introduce "submodule.jobs". Signed-off-by: Stefan Beller #

[PATCHv2 7/8] submodule update: expose parallelism to the user

2015-10-28 Thread Stefan Beller
Expose possible parallelism either via the "--jobs" CLI parameter or the "submodule.jobs" setting. By having the variable initialized to -1, we make sure 0 can be passed into the parallel processing machine, which will then pick as many parallel workers as there are CPUs. Signed-off-by: Stefan

[PATCHv2 6/8] git submodule update: have a dedicated helper for cloning

2015-10-28 Thread Stefan Beller
This introduces a new helper function in git submodule--helper which takes care of cloning all submodules, which we want to parallelize eventually. Some tests (such as empty URL, update_mode=none) are required in the helper to make the decision for cloning. These checks have been moved into the C

git-fetch pulls already-pulled objects?

2015-10-28 Thread Matt Glazar
On a remote, I have two Git commit objects which point to the same tree object (created with git commit-tree). If I fetch one of the commits, the commit object (including the tree object) is fetched. If I then fetch the other commit, the tree object (and its dependencies) is fetched *again* (I

[PATCHv2 1/8] run_processes_parallel: Add output to tracing messages

2015-10-28 Thread Stefan Beller
This commit serves 2 purposes. First this may help the user who tries to diagnose intermixed process calls. Second this may be used in a later patch for testing. As the output of a command should not change visibly except for going faster, grepping for the trace output seems like a viable testing

[PATCHv2 5/8] fetching submodules: Respect `submodule.jobs` config option

2015-10-28 Thread Stefan Beller
This allows to configure fetching and updating in parallel without having the command line option. This moved the responsibility to determine how many parallel processes to start from builtin/fetch to submodule.c as we need a way to communicate "The user did not specify the number of parallel

[PATCHv2 0/8] Expose the submodule parallelism to the user

2015-10-28 Thread Stefan Beller
This replaces origin/sb/submodule-parallel-update (anchoring at 74367d8938, Merge branch 'sb/submodule-parallel-fetch' into sb/submodule-parallel-update) What does it do? --- This series should finish the on going efforts of parallelizing submodule network traffic. The patches contain tests for

[PATCHv2 3/8] submodule config: remove name_and_item_from_var

2015-10-28 Thread Stefan Beller
By inlining `name_and_item_from_var` it is easy to add later options which are not required to have a submodule name. Signed-off-by: Stefan Beller --- submodule-config.c | 46 +- 1 file changed, 17 insertions(+), 29 deletions(-)