Fwd: git clone does not respect command line options

2016-02-25 Thread Guilherme
Hi! I'm trying to use git in an integration test and i'm having trouble with configuration options. On windows developer machines we use wincred as our credenital helper and thus have it set in ~/.gitconfig For the integration test that is no use as it will make testing unauthorized logging in

Re: [PATCH/RFC] git-commit: add a commit.verbose config variable

2016-02-25 Thread Pranit Bauva
Matthieu Moy: > Using "git send-email" normally does the right thing. You may want to > look at https://submitgit.herokuapp.com/ too. git send-email does not work as my institute proxy does not allow IMAP/SMTP connections. But I will take care of this from hence forward. > The commit message

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 10:07 PM, Jeff King wrote: > Of the two you suggested, I think I like the here-doc better, as it does > not leave any question to a reader that there is other interpolation > going on. > > -Peff Agreed. Since I forgot the parts about argc checking, I will

Re: [PATCH 02/16] bisect: add test for the bisect algorithm

2016-02-25 Thread Christian Couder
On Fri, Feb 26, 2016 at 3:04 AM, Stephan Beyer wrote: > Signed-off-by: Stephan Beyer > --- > > To be honest: the test could be better, it could be more "targeted", > i.e. the example commit history could be smaller and just consider > all the cases and corner

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jeff King
On Thu, Feb 25, 2016 at 09:26:14PM -0500, Eric Sunshine wrote: > On Thu, Feb 25, 2016 at 9:19 PM, Jacob Keller wrote: > > On Thu, Feb 25, 2016 at 5:55 PM, Eric Sunshine > > wrote: > >> Not worth a re-roll, but these quote sequences are

[PATCH] SubmittingPatches : WIP tag in patches

2016-02-25 Thread Pranit Bauva
--- Documentation/SubmittingPatches | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 98fc4cc..b2c7664 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -168,7 +168,9

Re: Fwd: git clone does not respect command line options

2016-02-25 Thread Jeff King
On Fri, Feb 26, 2016 at 12:17:49PM +0530, Guilherme wrote: > I'm trying to use git in an integration test and i'm having trouble > with configuration options. > > On windows developer machines we use wincred as our credenital helper > and thus have it set in ~/.gitconfig > > For the integration

Re: [PATCH v2] add DEVELOPER makefile knob to check for acknowledged warnings

2016-02-25 Thread Junio C Hamano
Perhaps squash these two while queuing to address comments from you two? Thanks. Documentation/CodingGuidelines | 3 ++- Makefile | 18 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Documentation/CodingGuidelines

Re: Rebase performance

2016-02-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Feb 24, 2016 at 11:09 PM, Christian Couder wrote: [Resent because I was accidentally in GMail's HTML mode and the ML rejected it] > If there was a config option called maybe "rebase.taskset" or > "rebase.setcpuaffinity" that could be set to ask the OS for all

Re: Rebase performance

2016-02-25 Thread Matthieu Moy
Ævar Arnfjörð Bjarmason writes: > At the risk of derailing this thread, a thing that would make rebase > even faster I think would be to change it so that instead of applying > a patch at a time to the working tree the whole operation takes place > on temporary trees & commits

git submodule add --single-branch

2016-02-25 Thread Alter Depp
I would like to do a shallow clone of a submodule like this: $ git submodule add --branch master --single-branch --depth 5 repo dir but it doesn't work. I think '--single-branch' is not yet implemented for submodules. With the clone command it works: $ git clone --branch master --single-branch

Re: [PATCH v2.1] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Junio C Hamano
Matthieu Moy writes: > The description was misleading, since "set to any boolean value" include > "set to false", and diff.renames=false does not enable basic detection, > but actually disables it. Also, document that diff.renames only affects > Porcelain. > >

Re: Some strange behavior of git

2016-02-25 Thread Olga Pshenichnikova
Thanx ) On 02/25/2016 07:14 PM, Thomas Gummerer wrote: [Please keep everyone cc'd in the conversation, especially the mailing list. I added it back for now. Also please don't top post on the list] On 02/25, Olga Pshenichnikova wrote: No, it isn't empty, but I found the problem. Problem was

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-25 Thread Dmitry Vilkov
Hi, guys! > I sent in a patch (and I believe I CC'd you) that adds an option > http.emptyAuth that can be used in this case. It should make its way to > a future release. Somehow I've missed your letter... > The patch has been queued as 121061f6 (http: add option to try > authentication

Re: [PATCH 1/5] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Felipe Gonçalves Assis
Matthieu Moy imag.fr> writes: > diff.renames:: > - Tells Git to detect renames. If set to any boolean value, it > - will enable basic rename detection. If set to "copies" or > - "copy", it will detect copies, as well. > + Whether and how Git detects renames. If set to

[PATCH v2.1] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Matthieu Moy
The description was misleading, since "set to any boolean value" include "set to false", and diff.renames=false does not enable basic detection, but actually disables it. Also, document that diff.renames only affects Porcelain. Signed-off-by: Matthieu Moy --- Oops, trivial

Re: [PATCH v2 5/5] diff: activate diff.renames by default

2016-02-25 Thread Junio C Hamano
Matthieu Moy writes: > diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt > index 40e5de9..69389ae 100644 > --- a/Documentation/diff-config.txt > +++ b/Documentation/diff-config.txt > @@ -111,7 +111,7 @@ diff.renames:: > Whether and how Git

Re: [PATCH v2 1/5] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Junio C Hamano
Matthieu Moy writes: > The description was misleading, since "set to any boolean value" include > "set to false", and diff.renames=false does not enable basic detection, > but actually disables it. Also, document that diff.renames only affects > Porcelain. > >

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: > On Thu, Feb 25, 2016 at 02:00:36AM -0500, Jeff King wrote: > >> I think something like this would work: >> [...] >> but it does not seem to pass with your patch (even after I fixed up the >> weird "local" thing). I think the

Re: [PATCHv17 01/11] submodule-config: keep update strategy around

2016-02-25 Thread Junio C Hamano
Stefan Beller writes: > +int parse_submodule_update_strategy(const char *value, > + struct submodule_update_strategy *dst) > +{ > + free((void*)dst->command); free((void *)dst->command); "git tbdiff" is quite handy; it didn't spot any other lossage

Re: [PATCHv17 05/11] run_processes_parallel: treat output of children as byte array

2016-02-25 Thread Junio C Hamano
Stefan Beller writes: > @@ -1135,11 +1135,11 @@ static int pp_collect_finished(struct > parallel_processes *pp) > strbuf_addbuf(>buffered_output, > >children[i].err); > strbuf_reset(>children[i].err); > } else { > -

Re: [PATCH 1/5] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Matthieu Moy
Felipe Gonçalves Assis writes: > Matthieu Moy imag.fr> writes: > >> diff.renames:: >> -Tells Git to detect renames. If set to any boolean value, it >> -will enable basic rename detection. If set to "copies" or >> -"copy", it will detect copies, as well.

Re: [PATCHv17 01/11] submodule-config: keep update strategy around

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 10:06 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> +int parse_submodule_update_strategy(const char *value, >> + struct submodule_update_strategy *dst) >> +{ >> + free((void*)dst->command); > >

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: > static int clone_submodule(const char *path, const char *gitdir, const char > *url, >const char *depth, const char *reference, int > quiet) > { > @@ -145,7 +166,7 @@ static int

Re: [PATCH 1/3] t5313: test bounds-checks of corrupted/malicious pack/idx files

2016-02-25 Thread Johannes Sixt
Am 25.02.2016 um 15:21 schrieb Jeff King: > +munge () { > + printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2 > +} Instead of adding another call of dd, would it be an option to insert the following patch at the front of this series and then use test_overwrite_bytes? 8< From:

[PATCH] refs: mark a file-local symbol as static

2016-02-25 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi David, No, you are not having flashbacks - you forgot to make the register_ref_storage_backend() function static. ;-) BTW, I still have two symbols showing as exported but not used, namely: $ diff nsc psc1 ...

Re: [PATCH v6 00/32] refs backend

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 11:27 AM, David Turner wrote: > On Thu, 2016-02-25 at 19:57 +0700, Duy Nguyen wrote: >> A couple of build warnings I found, haven't really read the code yet. >> These two can easily be fixed >> >> refs/lmdb-backend.c: In function

[PATCH] run-command: fix an 'different modifiers' sparse warning

2016-02-25 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Jeff, If you need to re-roll your 'jk/epipe-in-async' branch, could you please squash this into the relevant patch. (ie. "write_or_die: handle EPIPE in async threads", 24-02-2016). Thanks! ATB, Ramsay Jones run-command.c | 4

Re: [PATCH] refs: document transaction semantics

2016-02-25 Thread David Turner
I thought it would be better in the api docs, since it's a design decision that all backends should follow. On Thu, 2016-02-25 at 15:05 -0500, David Turner wrote: > Add some comments on ref transaction semantics to refs.h > > Signed-off-by: David Turner > --- > refs.h

[PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4

2016-02-25 Thread Jacob Keller
From: Jacob Keller Since 2.4, apache will fail to load unless mod_unixd is loaded in order to drop privileges. Signed-off-by: Jacob Keller --- I am not sure why this wasn't there already, but I am unable to run httpd 2.4.18 without it, on Fedora

[PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the

[PATCH] refs: document transaction semantics

2016-02-25 Thread David Turner
Add some comments on ref transaction semantics to refs.h Signed-off-by: David Turner --- refs.h | 12 1 file changed, 12 insertions(+) diff --git a/refs.h b/refs.h index c0964f5..9b3eaf3 100644 --- a/refs.h +++ b/refs.h @@ -112,6 +112,11 @@ extern int

Re: [PATCH v6 03/32] files-backend: break out ref reading

2016-02-25 Thread David Turner
On Wed, 2016-02-24 at 16:51 -0800, Junio C Hamano wrote: > Junio C Hamano writes: > > > ... > > You can of course standardize on signed int, but because this is a > > collection of flag bits, there is no reason not to choose unsigned. > > > > I _think_ I can fix everything up

[PATCH] submodule--helper: fix 'dubious bitfield' sparse warnings

2016-02-25 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Stefan, If you need to re-roll (err, one of your) 'sb/submodule-parallel-update' branches, could you please squash this into the relevant patch. (ie. "git submodule update: have a dedicated helper for cloning", 23-02-2016).

Re: [PATCH] refs: mark a file-local symbol as static

2016-02-25 Thread David Turner
On Thu, 2016-02-25 at 19:28 +, Ramsay Jones wrote: > Signed-off-by: Ramsay Jones > --- > > Hi David, > > No, you are not having flashbacks - you forgot to make the > register_ref_storage_backend() function static. ;-) Oops! Must have lost that in all of the

Re: [PATCH v2 4/5] log: introduce init_log_defaults()

2016-02-25 Thread Junio C Hamano
Matthieu Moy writes: > This is currently a wrapper around init_grep_defaults(), but will allow > adding more initialization in further patches. > > Signed-off-by: Matthieu Moy > --- > builtin/log.c | 15 ++- > 1 file changed, 10

Re: [PATCH v6 00/32] refs backend

2016-02-25 Thread David Turner
On Thu, 2016-02-25 at 00:08 +, Ramsay Jones wrote: > > Ramsay Jones (1): > > refs: reduce the visibility of do_for_each_ref() > > Ah, sorry if it wasn't clear, but there is no need to keep this > as a separate patch - it should simply be squashed into the relevant > patch in your series. >

Re: [PATCH] run-command: fix an 'different modifiers' sparse warning

2016-02-25 Thread Junio C Hamano
Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > > Hi Jeff, > > If you need to re-roll your 'jk/epipe-in-async' branch, could you > please squash this into the relevant patch. (ie. "write_or_die: > handle EPIPE in async

Re: git submodule add --single-branch

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 9:54 AM, Alter Depp wrote: > I would like to do a shallow clone of a submodule like this: > $ git submodule add --branch master --single-branch --depth 5 repo dir > but it doesn't work. I think '--single-branch' is not yet implemented for > submodules. >

Re: [PATCH v6 00/32] refs backend

2016-02-25 Thread David Turner
On Thu, 2016-02-25 at 19:57 +0700, Duy Nguyen wrote: > A couple of build warnings I found, haven't really read the code yet. > These two can easily be fixed > > refs/lmdb-backend.c: In function 'lmdb_read_raw_ref': > refs/lmdb-backend.c:554:16: warning: unused variable 'err' [-Wunused >

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Junio C Hamano
Jacob Keller writes: > On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: >> static int clone_submodule(const char *path, const char *gitdir, const char >> *url, >>const char *depth, const char *reference, int >> quiet) >> {

Re: [PATCH/RFC] git-commit: add a commit.verbose config variable

2016-02-25 Thread Matthieu Moy
Pranit Bauva writes: > From c273a02fc9cab9305cedf6e37422e257a1cc3b1e Mon Sep 17 00:00:00 2001 > From: Pranit Bauva > Date: Fri, 26 Feb 2016 07:14:18 +0530 > Subject: [PATCH/RFC] git-commit: add a commit.verbose config variable These should not

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 12:32 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: >>> static int clone_submodule(const char *path, const char *gitdir, const >>> char *url, >>>

Re: [PATCH v6 03/32] files-backend: break out ref reading

2016-02-25 Thread Junio C Hamano
David Turner writes: > Is there some standard workflow here? I just rebased your version of > my series (bd412fa) on top of the prior commit in pu (9db66d9), fixing > the few conflicts. (I think there is in general something I'm missing > about how to maintain a patch

[PATCH/RFC] git-commit: add a commit.verbose config variable

2016-02-25 Thread Pranit Bauva
>From c273a02fc9cab9305cedf6e37422e257a1cc3b1e Mon Sep 17 00:00:00 2001 From: Pranit Bauva Date: Fri, 26 Feb 2016 07:14:18 +0530 Subject: [PATCH/RFC] git-commit: add a commit.verbose config variable Since many people always run the command with this option, and would

Re: [PATCH/RFC] git-commit: add a commit.verbose config variable

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 1:27 PM, Matthieu Moy wrote: > >> +commit.verbose:: >> + A boolean to specify whether to always include the verbose option > > Boolean is usually written with a capital letter. I disagree here, ("grep -riI boolean" suggestes to only

Re: [PATCH 1/3] t5313: test bounds-checks of corrupted/malicious pack/idx files

2016-02-25 Thread Jeff King
On Thu, Feb 25, 2016 at 12:31:12PM -0800, Junio C Hamano wrote: > Johannes Sixt writes: > > > Am 25.02.2016 um 15:21 schrieb Jeff King: > >> +munge () { > >> + printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2 > >> +} > > > > Instead of adding another call of dd, would it be an

Re: [PATCH] run-command: fix an 'different modifiers' sparse warning

2016-02-25 Thread Jeff King
On Thu, Feb 25, 2016 at 12:20:12PM -0800, Junio C Hamano wrote: > Ramsay Jones writes: > > > Signed-off-by: Ramsay Jones > > --- > > > > Hi Jeff, > > > > If you need to re-roll your 'jk/epipe-in-async' branch, could you > > please

Re: [PATCH] refs: document transaction semantics

2016-02-25 Thread Junio C Hamano
David Turner writes: > I thought it would be better in the api docs, since it's a design > decision that all backends should follow. Makes sense; as this describes an already available API, it shouldn't have to wait for the remainder of your series and can just go to

Re: [PATCHv17 05/11] run_processes_parallel: treat output of children as byte array

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 10:16 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -1135,11 +1135,11 @@ static int pp_collect_finished(struct >> parallel_processes *pp) >> strbuf_addbuf(>buffered_output, >> >children[i].err); >>

Re: [PATCH] submodule--helper: fix 'dubious bitfield' sparse warnings

2016-02-25 Thread Stefan Beller
On Thu, Feb 25, 2016 at 11:42 AM, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones > --- > > Hi Stefan, > > If you need to re-roll (err, one of your) 'sb/submodule-parallel-update' > branches, could you please squash this into the

Re: [PATCH v6 00/32] refs backend

2016-02-25 Thread Duy Nguyen
On Fri, Feb 26, 2016 at 2:27 AM, David Turner wrote: > but -Wshadow produces a ton of complaints on the rest of git's > code. We should probably fix those. I know, but what I wrote was meant for new code only (e.g. make refs/lmdb-backend.o CFLAGS=-Wshadow is clean). I

Re: [PATCH 1/3] t5313: test bounds-checks of corrupted/malicious pack/idx files

2016-02-25 Thread Junio C Hamano
Johannes Sixt writes: > Am 25.02.2016 um 15:21 schrieb Jeff King: >> +munge () { >> +printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2 >> +} > > Instead of adding another call of dd, would it be an option to insert > the following patch at the front of this series and then

Re: [PATCH] refs: document transaction semantics

2016-02-25 Thread David Turner
On Thu, 2016-02-25 at 12:34 -0800, Junio C Hamano wrote: > David Turner writes: > > > I thought it would be better in the api docs, since it's a design > > decision that all backends should follow. > > Makes sense; as this describes an already available API, it >

Re: [PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4

2016-02-25 Thread Jeff King
On Thu, Feb 25, 2016 at 10:57:11AM -0800, Jacob Keller wrote: > From: Jacob Keller > > Since 2.4, apache will fail to load unless mod_unixd is loaded in order > to drop privileges. > > Signed-off-by: Jacob Keller > --- > > I am not sure why

[PATCH v2 0/5] activate diff.renames by default

2016-02-25 Thread Matthieu Moy
Remarks on v1 applied: * document that diff.renames applies only to porcelain * use <<- instead of << in tests * rename git_diff_ui_default_config to init_diff_ui_defaults * f() -> f(void) Interdiff follows: diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index

[PATCH v2 1/5] Documentation/diff-config: fix description of diff.renames

2016-02-25 Thread Matthieu Moy
The description was misleading, since "set to any boolean value" include "set to false", and diff.renames=false does not enable basic detection, but actually disables it. Also, document that diff.renames only affects Porcelain. Signed-off-by: Matthieu Moy ---

[PATCH v2 3/5] t: add tests for diff.renames (true/false/unset)

2016-02-25 Thread Matthieu Moy
The underlying machinery is well-tested, but the configuration option itself was tested only in t3400-rebase.sh. Signed-off-by: Matthieu Moy --- t/t4001-diff-rename.sh | 61 +- 1 file changed, 60 insertions(+), 1 deletion(-)

[PATCH] Fix minor typo in hook documentation

2016-02-25 Thread Martin Amdisen
Signed-off-by: Martin Mosegaard Amdisen --- templates/hooks--update.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample index d847583..80ba941 100755 ---

[PATCH v2] add DEVELOPER makefile knob to check for acknowledged warnings

2016-02-25 Thread larsxschneider
From: Lars Schneider We assume Git developers have a reasonably modern compiler and recommend them to enable the DEVELOPER makefile knob to ensure their patches are clear of all compiler warnings the Git core project cares about. Enable the DEVELOPER makefile knob in

[PATCH v2 4/5] README.md: don't call git stupid in the title

2016-02-25 Thread Matthieu Moy
"the stupid content tracker" was true in the early days of Git, but hardly applicable these days. "fast, scalable, distributed" describes Git more accuralety. Also, "stupid" can be seen as offensive by some people. Let's not use it in the very first words of the README. The new formulation is

[PATCH v2 1/5] README: use markdown syntax

2016-02-25 Thread Matthieu Moy
This allows repository browsers like GitHub to display the content of the file nicely formatted. Signed-off-by: Matthieu Moy --- README => README.md | 7 ++- t/t7001-mv.sh | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) rename README => README.md (93%)

[PATCH v2 0/5] Make README more pleasant to read

2016-02-25 Thread Matthieu Moy
Minor tweaks after discussion on v1 (for those who missed it, this series makes README render nicely on GitHub and tries to present important information early). The result is here: https://github.com/moy/git/tree/git-readme#readme Changes since v1: * Visible on the rendered page: resurect

[PATCH v2 3/5] README.md: move the link to git-scm.com up

2016-02-25 Thread Matthieu Moy
The documentation available on git-scm.com is nicely formatted. It's better to point users to it than to the source code of the documentation. Signed-off-by: Matthieu Moy --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md

[PATCH v2 5/5] README.md: move down historical explanation about the name

2016-02-25 Thread Matthieu Moy
The explanations about why the name was chosen are secondary compared to the description and link to the documentation. Some consider these explanations as good computer scientists joke, but other see it as needlessly offensive vocabulary. This patch preserves the historical joke, but gives it

[PATCH v2 2/5] README.md: add hyperlinks on filenames

2016-02-25 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- README.md | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 600779c..e54f9e7 100644 --- a/README.md +++ b/README.md @@ -21,17 +21,17 @@ License version 2 (some parts of it are

Re: [PATCH 5/5] diff: activate diff.renames by default

2016-02-25 Thread Matthieu Moy
Jeff King writes: > On Tue, Feb 23, 2016 at 06:44:58PM +0100, Matthieu Moy wrote: > >> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt >> index 1acd203..fdf5a79 100644 >> --- a/Documentation/diff-config.txt >> +++ b/Documentation/diff-config.txt >> @@

[PATCH v2 5/5] diff: activate diff.renames by default

2016-02-25 Thread Matthieu Moy
Rename detection is a very convenient feature, and new users shouldn't have to dig in the documentation to benefit from it. Potential objections to activating rename detection are that it sometimes fail, and it is sometimes slow. But rename detection is already activated by default in several

[PATCH v2 2/5] t4001-diff-rename: wrap file creations in a test

2016-02-25 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- t/t4001-diff-rename.sh | 66 ++ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh index 2f327b7..06b8828 100755 ---

[PATCH v2 4/5] log: introduce init_log_defaults()

2016-02-25 Thread Matthieu Moy
This is currently a wrapper around init_grep_defaults(), but will allow adding more initialization in further patches. Signed-off-by: Matthieu Moy --- builtin/log.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/builtin/log.c

[PATCH v2 1/2] push: remove "push.default is unset" warning message

2016-02-25 Thread Matthieu Moy
The warning was important before the 2.0 transition, and remained important for a while after, so that new users get push.default explicitly in their configuration and do not experience inconsistent behavior if they ever used an older version of Git. The warning has been there since version 1.8.0

[PATCH v2 0/2] Remove "push.default unset" warning

2016-02-25 Thread Matthieu Moy
Junio and Peff both lean towards removing the message completely, and I think I'm convinced. We would have to do this in the future anyway. While we're there, improve the manual for git push as suggested by Philip Oakley. Matthieu Moy (2): push: remove "push.default is unset" warning message

[PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default

2016-02-25 Thread Matthieu Moy
The default behavior is well documented already in git-config(1), but git-push(1) itself did not mention it at all. For users willing to learn how "git push" works but not how to configure it, this makes the documentation cumbersome to read. Make the git-push(1) page self-contained by adding a

Re: Some strange behavior of git

2016-02-25 Thread Thomas Gummerer
On 02/25, Olga Pshenichnikova wrote: > Hello, > we use git in our project. > What can be cause for further confusing behavior? > > git@ip5server:~$ git status > On branch master > Untracked files: > (use "git add ..." to include in what will be committed) > >

Re: [PATCH v2] add DEVELOPER makefile knob to check for acknowledged warnings

2016-02-25 Thread Michael Haggerty
On 02/25/2016 09:42 AM, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > We assume Git developers have a reasonably modern compiler and recommend > them to enable the DEVELOPER makefile knob to ensure their patches are > clear of all compiler warnings the Git

[PATCH] upload-pack: use argv_array for pack_objects

2016-02-25 Thread Michael Procter
Use the argv_array in the child_process structure, to avoid having to manually maintain an array size. Signed-off-by: Michael Procter --- upload-pack.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/upload-pack.c

Re: git mv messed up file mapping if folders contain identical files

2016-02-25 Thread Kevin Daudt
On Wed, Feb 24, 2016 at 04:38:11PM -0700, Bill Okara wrote: > Hi, > > I noticed the following 'git mv' issue with: > git version 2.6.4 > > > If there are identical files in different subfolders, 'git mv' the > root folder (and/or each file individually) will mess up the file path > mapping.

Re: [PATCH v6 00/32] refs backend

2016-02-25 Thread Duy Nguyen
A couple of build warnings I found, haven't really read the code yet. These two can easily be fixed refs/lmdb-backend.c: In function 'lmdb_read_raw_ref': refs/lmdb-backend.c:554:16: warning: unused variable 'err' [-Wunused-variable] struct strbuf err = STRBUF_INIT; ^

[PATCH v2 06/20] rename_tmp_log(): improve error reporting

2016-02-25 Thread Michael Haggerty
* Don't capitalize error strings * Report true paths of affected files Signed-off-by: Michael Haggerty --- refs/files-backend.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 2cb402d..ed29b3b

[PATCH v2 13/20] try_remove_empty_parents(): rename parameter "name" -> "refname"

2016-02-25 Thread Michael Haggerty
This is the standard nomenclature. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index bd25ae2..543fd8e 100644 --- a/refs/files-backend.c +++

[PATCH v2 20/20] ref_transaction_commit(): clean up empty directories

2016-02-25 Thread Michael Haggerty
When deleting/pruning references, remove any directories that are made empty by the deletion of loose references or of reflogs. Otherwise such empty directories can survive forever and accumulate over time. (Even 'pack-refs', which is smart enough to remove the parent directories of loose

[PATCH v2 05/20] rename_tmp_log(): use raceproof_create_file()

2016-02-25 Thread Michael Haggerty
Besides shortening the code, this saves an unnecessary call to safe_create_leading_directories_const() in almost all cases. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 76 ++-- 1 file changed, 32 insertions(+),

[PATCH v2 19/20] try_remove_empty_parents(): teach to remove parents of reflogs, too

2016-02-25 Thread Michael Haggerty
Add a new "flags" parameter that tells the function whether to remove empty parent directories of the loose reference file, of the reflog file, or both. The new functionality is not yet used. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 24

[PATCH v2 12/20] log_ref_write_1(): inline function

2016-02-25 Thread Michael Haggerty
Now log_ref_write_1() doesn't do anything, so inline it. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index

[PATCH v2 17/20] delete_ref_loose(): derive loose reference path from lock

2016-02-25 Thread Michael Haggerty
It is simpler to derive the path to the file that must be deleted from "lock->ref_name" than from the lock_file object. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/refs/files-backend.c

[PATCH v2 00/20] Delete directories left empty after ref deletion

2016-02-25 Thread Michael Haggerty
This re-roll addresses a few minor points that were brought up about v1 [1]: * "safe_create_leading_directories(): set errno on SCLD_EXISTS": * Set errno to ENOTDIR rather than EEXIST. * "raceproof_create_file(): new function": * Improve comments. * "rename_tmp_log(): use

[PATCH v2 04/20] lock_ref_sha1_basic(): use raceproof_create_file()

2016-02-25 Thread Michael Haggerty
Instead of coding the retry loop inline, use raceproof_create_file() to make lock acquisition safe against directory creation/deletion races. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 47 +++ 1 file changed, 19

[PATCH v2 11/20] log_ref_setup(): manage the name of the reflog file internally

2016-02-25 Thread Michael Haggerty
Instead of writing the name of the reflog file into a strbuf that is supplied by the caller but not needed there, write it into a local temporary buffer and remove the strbuf parameter entirely. And while we're adjusting the function signature, reorder the arguments to move the input parameters

[PATCH v2 16/20] t5505: use "for-each-ref" to test for the non-existence of references

2016-02-25 Thread Michael Haggerty
Instead of looking on the filesystem inside ".git/refs/remotes/origin", use "git for-each-ref" to check for leftover references under the remote's old name. Signed-off-by: Michael Haggerty --- t/t5505-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 18/20] delete_ref_loose(): inline function

2016-02-25 Thread Michael Haggerty
It was hardly doing anything anymore. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 7e825bd..b137171 100644 ---

[PATCH v2 03/20] raceproof_create_file(): new function

2016-02-25 Thread Michael Haggerty
Add a function that tries to create a file and any containing directories in a way that is robust against races with other processes that might be cleaning up empty directories at the same time. The actual file creation is done by a callback function, which, if it fails, should set errno to

[PATCH v2 08/20] log_ref_setup(): improve robustness against races

2016-02-25 Thread Michael Haggerty
Change log_ref_setup() to use raceproof_create_file() to create the new logfile. This makes it more robust against a race against another process that might be trying to clean up empty directories while we are trying to create a new logfile. This also means that it will only call

[PATCH v2 10/20] log_ref_write_1(): don't depend on logfile

2016-02-25 Thread Michael Haggerty
It's unnecessary to pass a strbuf holding the reflog path up and down the call stack now that it is hardly needed by the callers. Remove the places where log_ref_write_1() uses it, in preparation for making it internal to log_ref_setup(). Signed-off-by: Michael Haggerty ---

[PATCH v2 07/20] log_ref_setup(): separate code for create vs non-create

2016-02-25 Thread Michael Haggerty
The behavior of this function (especially how it handles errors) is quite different depending on whether we are willing to create the reflog vs. whether we are only trying to open an existing reflog. So separate the code paths. This also simplifies the next steps. Signed-off-by: Michael Haggerty

[PATCH v2 01/20] safe_create_leading_directories_const(): preserve errno

2016-02-25 Thread Michael Haggerty
Theoretically, free() is allowed to change errno. So preserve the errno from safe_create_leading_directories() across the call to free(). Signed-off-by: Michael Haggerty --- sha1_file.c | 4 1 file changed, 4 insertions(+) diff --git a/sha1_file.c b/sha1_file.c index

[PATCH] Change type of signed int flags to unsigned

2016-02-25 Thread Saurav Sachidanand
“pattern” and “exclude” are two structs defined in attr.c and dir.h respectively. Each contains a field named “flags” of type int, that takes on values from the set of positive integers {1, 4, 8, 16} enumerated through the macro EXC_FLAG_*. That the most significant bit (used to store the sign)

Re: Segmentation fault found while fuzzing .pack file under 2.7.0.rc3

2016-02-25 Thread Jeff King
On Wed, Feb 24, 2016 at 10:48:27AM -0800, Junio C Hamano wrote: > >> We do not check if the offset of individual objects are within the > >> corresponding .pack file, either, and nth_packed_object_offset() > >> does return the data read from .idx file that is not checked for > >> sanity.

[PATCH 0/3] out-of-bounds access from corrupted .idx files

2016-02-25 Thread Jeff King
This series teaches Git to detect a few problems with corrupted .idx files, and adds tests for some more cases. There's conceptually some overlap with t5300, but I don't think it was covering any of these cases explicitly. There are two real bugs that could cause segfaults or bus errors via

[PATCH 3/3] use_pack: handle signed off_t overflow

2016-02-25 Thread Jeff King
A v2 pack index file can specify an offset within a packfile of up to 2^64-1 bytes. On a system with a signed 64-bit off_t, we can represent only up to 2^63-1. This means that a corrupted .idx file can end up with a negative offset in the pack code. Our bounds-checking use_pack function looks for

[PATCH v2 15/20] try_remove_empty_parents(): don't accommodate consecutive slashes

2016-02-25 Thread Michael Haggerty
"refname" has already been checked by check_refname_format(), so it cannot have consecutive slashes. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c

  1   2   3   >