Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Jeff King
On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Schindelin wrote: > It is a pilot error to call `git config section.key value` outside of > any Git worktree. > > Let's report that error instead of creating the .git/ directory and > writing a fresh config into it. Hmm. I get (on my Linux mach

Re: [PATCH] push: shorten "push.default is unset" warning message

2016-02-24 Thread Jeff King
On Tue, Feb 23, 2016 at 11:05:08AM -0800, Junio C Hamano wrote: > If most people are happy with "simple" (and certainly that was the > assumption and hope behind the transtion we made at 2.0), we may be > better off removing the warning altogether. Keeping "and adopt the > new behaviour" part pre

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread John Keeping
On Wed, Feb 24, 2016 at 03:26:57AM -0500, Jeff King wrote: > On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Schindelin wrote: > > > I cannot think of a way how to test this: all of the regression > > tests run inside Git's own worktree, and we cannot even assume > > that /tmp/ is o

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

2016-02-24 Thread Jeff King
On Wed, Feb 24, 2016 at 08:08:52AM +0100, Johannes Schindelin wrote: > > Markdown when rendered may be easier to read, but plain text is even > > easier, and it somehow feels backward to cater to those who browse > > at GitHub sacrificing those who use "less" in the source tree. > > That assumes

Re: [RFC/PATCH 0/5] Make README more pleasant to read

2016-02-24 Thread Jeff King
On Tue, Feb 23, 2016 at 06:40:24PM +0100, Matthieu Moy wrote: > This patch series was inspired by a discussion I had with Emma Jane > after Git Merge last year. It tries both to make the README file less > agressive and generally more pleasant to read. > > To get a quick overview, compare the old

Re: [PATCH 1/2] t8005: avoid grep on non-ASCII data

2016-02-24 Thread John Keeping
On Tue, Feb 23, 2016 at 03:01:43PM -0800, Junio C Hamano wrote: > John Keeping writes: > > > My original sed version was: > > > > sed -ne "/^author /p" -e "/^summary /p" > > > > which I think will work on all platforms (we already use it in > > t-basic.sh) but then I decided to be too cle

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

2016-02-24 Thread Jeff King
On Tue, Feb 23, 2016 at 06:44:55PM +0100, Matthieu Moy wrote: > Signed-off-by: Matthieu Moy > --- > t/t4001-diff-rename.sh | 38 +- > 1 file changed, 21 insertions(+), 17 deletions(-) > > diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh > index 2f

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

2016-02-24 Thread Jeff King
On Tue, Feb 23, 2016 at 06:44:54PM +0100, Matthieu Moy wrote: > 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. > > Signed-off-by: Matthieu Moy > --- > Documentation/di

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Jeff King
On Wed, Feb 24, 2016 at 10:14:03AM +, John Keeping wrote: > On Wed, Feb 24, 2016 at 03:26:57AM -0500, Jeff King wrote: > > On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Schindelin wrote: > > > > > I cannot think of a way how to test this: all of the regression > > > tests run inside

Re: [RFC/PATCH 1/1] format-patch: add an option to record base tree info

2016-02-24 Thread Michael J Gruber
Stefan Beller venit, vidit, dixit 23.02.2016 23:21: > On Tue, Feb 23, 2016 at 12:46 PM, H. Peter Anvin wrote: >> On February 23, 2016 12:35:12 PM PST, Junio C Hamano >> wrote: >>> ebied...@xmission.com (Eric W. Biederman) writes: >>> Junio C Hamano writes: > It is valuable for a t

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

2016-02-24 Thread Jeff King
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 > @@ -111,7 +111,7 @@ diff.renames:: > Whethe

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-24 Thread Jeff King
On Tue, Feb 23, 2016 at 02:13:34PM +0100, Matthieu Moy wrote: > > So I think a little back and forth is good; almost everybody does > > something a little wrong in their first patch submission. But I'd worry > > about a topic that is going to involve a lot of bikeshedding or subtle > > nuances to

Hello ! Hello !!

2016-02-24 Thread Mr. Abel Mudda
Hello. What kept you waiting to claim your inheritance award fund $930,000,00.that was issued out to you as a compensation ?. Your email and name is here in the list that was given to us to program your fund into CREDIT VISA CARD which has been done since a week ago, you are urgently expected

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Duy Nguyen
On Wed, Feb 24, 2016 at 3:26 PM, Jeff King wrote: > On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Schindelin wrote: > >> It is a pilot error to call `git config section.key value` outside of >> any Git worktree. >> >> Let's report that error instead of creating the .git/ directory and >> writ

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

2016-02-24 Thread Jeff King
On Thu, Jan 07, 2016 at 02:54:50PM -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. use_pack(), which is

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Johannes Schindelin
Hi Peff, John & Junio (who recommended GIT_CEILING_DIRECTORIES first, On Wed, 24 Feb 2016, Jeff King wrote: > On Wed, Feb 24, 2016 at 10:14:03AM +, John Keeping wrote: > > > On Wed, Feb 24, 2016 at 03:26:57AM -0500, Jeff King wrote: > > > On Wed, Feb 24, 2016 at 08:47:00AM +0100, Johannes Sc

[PATCH] unpack-trees: do not delete i-t-a entries in worktree even when forced

2016-02-24 Thread Nguyễn Thái Ngọc Duy
Intent-to-add entries are basically "I may want to commit these files later, but for now they are untracked". As such, when the user does "git reset --hard ", which removes i-t-a entries from the index, i-t-a entries in worktree should be kept as untracked. Signed-off-by: Nguyễn Thái Ngọc Duy ---

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Johannes Schindelin
Hi, On Wed, 24 Feb 2016, Johannes Schindelin wrote: > I created a test and essentially duplicated Peff's finding: this is a > Windows-only issue. Indeed it is in our patches: https://github.com/git-for-windows/git/commit/3a4c37b22 (short version: we carry some patches that simplify loc

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Jeff King
On Wed, Feb 24, 2016 at 01:13:39PM +0100, Johannes Schindelin wrote: > > I created a test and essentially duplicated Peff's finding: this is a > > Windows-only issue. > > Indeed it is in our patches: > > https://github.com/git-for-windows/git/commit/3a4c37b22 > > (short version: we carry

[PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Johannes Schindelin
It is a pilot error to call `git config section.key value` outside of any Git worktree. The message error: could not lock config file .git/config: No such file or directory is not very helpful in that situation, though. Let's print a helpful message instead. Signed-off-by: Johann

[PATCH] Fix minor typo in hook documentation

2016-02-24 Thread Martin Amdisen
>From 3f8fd9e5771791a18e89fdb1f1a681eb6fc66ad1 Mon Sep 17 00:00:00 2001 From: Martin Mosegaard Amdisen Date: Wed, 24 Feb 2016 08:43:07 +0100 Subject: [PATCH] Fix minor typo in hook documentation --- templates/hooks--update.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Duy Nguyen
On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: > + die("not in a git directory"); Maybe wrap this string with _() for translation? Then we can pile this patch on top to fix the rest in builtin/config.c. -- 8< -- Subject: [PATCH] builtin/config.c: mark strings for

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

2016-02-24 Thread Matthieu Moy
Jeff King writes: > On Tue, Feb 23, 2016 at 06:44:55PM +0100, Matthieu Moy wrote: > >> Signed-off-by: Matthieu Moy >> --- >> t/t4001-diff-rename.sh | 38 +- >> 1 file changed, 21 insertions(+), 17 deletions(-) >> >> diff --git a/t/t4001-diff-rename.sh b/t/t4

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Johannes Schindelin
Hi Duy, On Wed, 24 Feb 2016, Duy Nguyen wrote: > On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: > > + die("not in a git directory"); > > Maybe wrap this string with _() for translation? Then we can pile this > patch on top to fix the rest in builtin/config.c. Giv

Re: [RFC/PATCH 0/5] Make README more pleasant to read

2016-02-24 Thread Matthieu Moy
Jeff King writes: > On Tue, Feb 23, 2016 at 06:40:24PM +0100, Matthieu Moy wrote: > >> README => README.md | 54 >> - >> t/t7001-mv.sh | 2 +- > > I do not overly care, but I wonder if it would be nice to keep README as > a symlink. I c

Re: [PATCH v3 0/3] Tests for merge-recursive rename-options

2016-02-24 Thread Felipe Gonçalves Assis
On 23 February 2016 at 22:41, Felipe Gonçalves Assis wrote: > Just a quick update incorporating Eric's latest comments. > > Still based on > c443d39 (merge-recursive: find-renames resets threshold, 2016-02-21). > One thing I just noticed is that the description of c443d39 still has a line saying

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Duy Nguyen
On Wed, Feb 24, 2016 at 8:26 PM, Johannes Schindelin wrote: > Hi Duy, > > On Wed, 24 Feb 2016, Duy Nguyen wrote: > >> On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: >> > + die("not in a git directory"); >> >> Maybe wrap this string with _() for translation? Then we

Ref :Investors

2016-02-24 Thread Consultant Firm
Subject : Ref :Investors !! Hello Sir, We are a group of private investors. We support all major project in the form of repayable loan with 3% interest for a period ranging from 1 to 25 years. We fund from € 400.000 to € 50,000,000 or more; You will be required to visit our management for a m

Re: [PATCH] Fix minor typo in hook documentation

2016-02-24 Thread Eric Sunshine
Thanks for the submission. See review comments below... On Wed, Feb 24, 2016 at 7:51 AM, Martin Amdisen wrote: > From 3f8fd9e5771791a18e89fdb1f1a681eb6fc66ad1 Mon Sep 17 00:00:00 2001 > From: Martin Mosegaard Amdisen > Date: Wed, 24 Feb 2016 08:43:07 +0100 > Subject: [PATCH] Fix minor typo in ho

Re: [RFC/PATCH 1/1] format-patch: add an option to record base tree info

2016-02-24 Thread Junio C Hamano
Fengguang Wu writes: >> This starts to sound more like something you would want to write in >> the cover letter, or the trailer block next to Signed-off-by: at the >> end of the first patch in the series. > > Yes, that's roughly what the current patch does, except in the latter > case we add new

Re: [PATCH v3 0/3] Tests for merge-recursive rename-options

2016-02-24 Thread Junio C Hamano
Felipe Gonçalves Assis writes: > On 23 February 2016 at 22:41, Felipe Gonçalves Assis > wrote: >> Just a quick update incorporating Eric's latest comments. >> >> Still based on >> c443d39 (merge-recursive: find-renames resets threshold, 2016-02-21). >> > > One thing I just noticed is that the de

Re: [PATCH] git config: do not create .git/ if it does not exist yet

2016-02-24 Thread Junio C Hamano
Johannes Schindelin writes: > Hi, > > On Wed, 24 Feb 2016, Johannes Schindelin wrote: > >> I created a test and essentially duplicated Peff's finding: this is a >> Windows-only issue. > > Indeed it is in our patches: > > https://github.com/git-for-windows/git/commit/3a4c37b22 > > (short ver

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

2016-02-24 Thread Junio C Hamano
Jeff King writes: > On Thu, Jan 07, 2016 at 02:54:50PM -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 >> sa

Re: [PATCH] refs: reduce the visibility of do_for_each_ref()

2016-02-24 Thread David Turner
Got it, thanks. On Tue, 2016-02-23 at 00:39 +, Ramsay Jones wrote: > Signed-off-by: Ramsay Jones > --- > > Hi David, > > Again, If you need to re-roll your 'dt/refs-backend-lmdb' branch ... > > Thanks! > > ATB, > Ramsay Jones > > refs.c | 16 > refs/refs-i

Git submodule regression in 2.7.0+

2016-02-24 Thread Caleb Jorden
Git community, I have hit a rather significant regression in recent versions of Git, when using submodules. I have narrowed it down to a simple set of commands that demonstrates the problem (commands for a unix-style OS): Start list of commands to reproduce issue mkdir -p test/a/b cd t

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > @@ -1095,9 +1098,11 @@ static void pp_buffer_stderr(struct parallel_processes > *pp, int output_timeout) > static void pp_output(struct parallel_processes *pp) > { > int i = pp->output_owner; > - if (pp->children[i].state == GIT_CP_WORKING && > - pp->c

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

2016-02-24 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 operation of submodule comma

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Junio C Hamano
Johannes Schindelin writes: > diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh > index 91235b7..f62409e 100755 > --- a/t/t1308-config-set.sh > +++ b/t/t1308-config-set.sh > @@ -218,4 +218,13 @@ test_expect_success 'check line errors for malformed > values' ' > test_i18ngrep "fata

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-24 Thread David Turner
On Sat, 2016-02-20 at 15:59 +0700, Duy Nguyen wrote: > On Thu, Feb 18, 2016 at 12:17 PM, David Turner < > dtur...@twopensource.com> wrote: > > LMDB has a few features that make it suitable for usage in git: > > ... > > I'm reading lmdb documents and hitting the caveat section [1]. > Random though

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-24 Thread David Turner
On Sat, 2016-02-20 at 20:14 +0700, Duy Nguyen wrote: > On Fri, Feb 19, 2016 at 3:23 AM, David Turner < > dtur...@twopensource.com> wrote: > > On Thu, 2016-02-18 at 15:50 +0700, Duy Nguyen wrote: > > > > [snip] > > > > Thanks; applied the above > > > > > This permission makes me wonder if we need

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-24 Thread David Turner
On Sat, 2016-02-20 at 09:58 +0700, Duy Nguyen wrote: > > On Fri, 2016-02-19 at 09:54 +0700, Duy Nguyen wrote: > > > On Fri, Feb 19, 2016 at 3:23 AM, David Turner < > > > dtur...@twopensource.com> wrote: > > > > > > +static int read_per_worktree_ref(const char *submodule, > > > > > > const > > > > >

Re: [PATCH v5 12/27] refs: forbid cross-backend ref renames

2016-02-24 Thread David Turner
On Sat, 2016-02-20 at 11:30 +0700, Duy Nguyen wrote: > On Thu, Feb 18, 2016 at 12:17 PM, David Turner < > dtur...@twopensource.com> wrote: > > This would be pretty weird, but since it will break, we should > > prevent > > it. > > > > Signed-off-by: David Turner > > --- > > refs.c | 6 ++ > >

Re: Git submodule regression in 2.7.0+

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 11:35 AM, Caleb Jorden wrote: > Git community, > > I have hit a rather significant regression in recent versions of Git, > when using submodules. I have narrowed it down to a simple set of > commands that demonstrates the problem (commands for a unix-style OS): > > St

[PATCH] submodule helper list: Respect correct path prefix

2016-02-24 Thread Stefan Beller
This is a regression introduced by 74703a1e4d (submodule: rewrite `module_list` shell function in C, 2015-09-02). Add a test to ensure we list the right submodule when giving a specific path spec. Reported-By: Caleb Jorden Signed-off-by: Stefan Beller --- I developed this on top of current or

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Jonathan Nieder
Stefan Beller wrote: > When the callers of parallel processing machine are sloppy with their > messages, make sure the output is terminated with LF after one child > process is handled. Why not always add \n here? That would make callers simpler and would make it easier for callers to know what

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 12:07 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -1095,9 +1098,11 @@ static void pp_buffer_stderr(struct >> parallel_processes *pp, int output_timeout) >> static void pp_output(struct parallel_processes *pp) >> { >> int i = pp->output_owner; >> -

Re: [PATCH] submodule helper list: Respect correct path prefix

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > This is a regression introduced by 74703a1e4d (submodule: rewrite > `module_list` shell function in C, 2015-09-02). > > Add a test to ensure we list the right submodule when giving a specific > path spec. > > Reported-By: Caleb Jorden > Signed-off-by: Stefan Beller > ---

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Feb 24, 2016 at 12:07 PM, Junio C Hamano wrote: >> The inconsistency may not hurt as long as (1) the producers of the >> message will never stuff a NUL in the middle, and (2) strbuf always >> has the guard NUL after its contents. Even though we know that the >> l

Re: [PATCH] submodule helper list: Respect correct path prefix

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 1:21 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This is a regression introduced by 74703a1e4d (submodule: rewrite >> `module_list` shell function in C, 2015-09-02). >> >> Add a test to ensure we list the right submodule when giving a specific >> path spec. >> >

Re: [PATCH] submodule helper list: Respect correct path prefix

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Feb 24, 2016 at 1:21 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> This is a regression introduced by 74703a1e4d (submodule: rewrite >>> `module_list` shell function in C, 2015-09-02). >>> >>> Add a test to ensure we list the right submodule when givi

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote: > Stefan Beller wrote: > >> When the callers of parallel processing machine are sloppy with their >> messages, make sure the output is terminated with LF after one child >> process is handled. > > Why not always add \n here? So you propose t

Rebase performance

2016-02-24 Thread Christian Couder
Hi, Using GIT_TRACE_PERFORMANCE it looks like a lot of time in a regular rebase is spent in run_apply() in builtin/am.c. This function first sets up a 'struct child_process cp' to launch "git apply" on a patch and then uses run_command(&cp) to actually launch the "git apply". Then this function ca

Re: [PATCH] submodule helper list: Respect correct path prefix

2016-02-24 Thread Caleb Jorden
Stefan, Thank you for the exceptionally quick response, and the patch! As your added test case verifies, this fixes my use case. I will continue to test this, and let you know if I see any other problems. Thanks again. Caleb Jorden cjor...@gmail.com On Wed, Feb 24, 2016 at 3:15 PM, Stefan Bel

using git-diff as a diff replacement?

2016-02-24 Thread Jacob Keller
Hey, I know that running "git diff " when outside a git project will result in a normal diff being run. I happen to prefer the diff algorithm and diff output of "git diff" but there does not seem to be a way to have this behavior from within a git tree. Is there a way to pass an option to git-di

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh >> index 91235b7..f62409e 100755 >> --- a/t/t1308-config-set.sh >> +++ b/t/t1308-config-set.sh >> @@ -218,4 +218,13 @@ test_expect_success 'check line errors for malformed >> val

Some strange behavior of git

2016-02-24 Thread Olga Pshenichnikova
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) app/addons/arliteks/ nothing added to commit but untracked fil

Re: Some strange behavior of git

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 2:43 PM, 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] unpack-trees: do not delete i-t-a entries in worktree even when forced

2016-02-24 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Intent-to-add entries are basically "I may want to commit these files > later, but for now they are untracked". As such, when the user does "git > reset --hard ", which removes i-t-a entries from the index, i-t-a > entries in worktree should be kept as untracked.

[PATCH v6 00/32] refs backend

2016-02-24 Thread David Turner
This version incorporates fixes for function scope from Ramsay Jones. It breaks patches down a bit more, to make them easier to review and understand. Michael Haggerty had some suggestions here. As suggested by Duy Nguyen, it replaces the resolve_ref_unsafe backend method with read_raw_ref, movin

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

2016-02-24 Thread David Turner
Refactor resolve_ref_1 in terms of a new function read_raw_ref, which is responsible for reading ref data from the ref storage. Later, we will make read_raw_ref a pluggable backend function, and make resolve_ref_unsafe common. Testing done: Hacked in code to run both old and new version of resolv

[PATCH v6 04/32] refs: move resolve_ref_unsafe into common code

2016-02-24 Thread David Turner
Now that resolve_ref_unsafe's only interaction with the backend is through read_raw_ref, we can move it into the common code. Later, we'll replace read_raw_ref with a backend function. Signed-off-by: David Turner --- refs.c | 104 ++ refs

[PATCH v6 05/32] refs: add a backend method structure with transaction functions

2016-02-24 Thread David Turner
From: Ronnie Sahlberg Add a ref structure for storage backend methods. Start by adding a method pointer for the transaction commit function. Add a function set_refs_backend to switch between storage backends. The files based storage backend is the default. Signed-off-by: Ronnie Sahlberg Signed

[PATCH v6 06/32] refs: add methods for misc ref operations

2016-02-24 Thread David Turner
From: Ronnie Sahlberg Add ref backend methods for: read_raw_ref, verify_refname_available, pack_refs, peel_ref, create_symref, resolve_gitlink_ref. read_raw_ref becomes static because it's not used outside refs.c Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c

[PATCH v6 26/32] svn: learn ref-storage argument

2016-02-24 Thread David Turner
git svn learns to pass the ref-storage command-line argument (to init and clone) through to git init. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor Signed-off-by: Eric Wong --- contrib/completion/git-completion.bash | 2 +- git-svn.perl | 6 +- 2 files c

[PATCH v6 19/32] refs: don't dereference on rename

2016-02-24 Thread David Turner
When renaming refs, don't dereference either the origin or the destination before renaming. The origin does not need to be dereferenced because it is presently forbidden to rename symbolic refs. Not dereferencing the destination fixes a bug where renaming on top of a broken symref would use the p

[PATCH v6 18/32] refs: allow log-only updates

2016-02-24 Thread David Turner
The refs infrastructure learns about log-only ref updates, which only update the reflog. Later, we will use this to separate symbolic reference resolution from ref updating. Signed-off-by: David Turner --- refs/files-backend.c | 15 ++- refs/refs-internal.h | 7 +++ 2 files cha

[PATCH v6 12/32] refs: add method for delete_refs

2016-02-24 Thread David Turner
In the file-based backend, delete_refs has some special optimization to deal with packed refs. In other backends, we might be able to make ref deletion faster by putting all deletions into a single transaction. So we need a special backend function for this. Signed-off-by: David Turner --- ref

[PATCH v6 31/32] refs: tests for lmdb backend

2016-02-24 Thread David Turner
Add tests for the database backend. Signed-off-by: David Turner Helped-by: Dennis Kaarsemaker --- t/t1460-refs-lmdb-backend.sh| 1109 +++ t/t1470-refs-lmdb-backend-reflog.sh | 359 t/t1480-refs-lmdb-submodule.sh | 85 +++ t/test-lib.s

[PATCH v6 25/32] clone: allow ref storage backend to be set for clone

2016-02-24 Thread David Turner
Add a new option, --ref-storage, to allow the ref storage backend to be set on new clones. Submodules must use the same ref storage as the parent repository, so we also pass the --ref-storage option option when cloning submodules. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor --- Doc

[PATCH v6 24/32] refs: check submodules' ref storage config

2016-02-24 Thread David Turner
All submodules must have the same ref storage (for now). Confirm that this is so before attempting to do anything with submodule refs. Signed-off-by: David Turner --- refs.c | 54 refs.h | 2 +- refs/files-backend

[PATCH v6 02/32] refs: move for_each_*ref* functions into common code

2016-02-24 Thread David Turner
Make do_for_each_ref take a submodule as an argument instead of a ref_cache. Since all for_each_*ref* functions are defined in terms of do_for_each_ref, we can then move them into the common code. Later, we can simply make do_for_each_ref into a backend function. Signed-off-by: David Turner ---

[PATCH v6 07/32] refs: add method for do_for_each_ref

2016-02-24 Thread David Turner
Add a ref backend method for do_for_each_ref. Signed-off-by: David Turner --- refs.c | 8 refs/files-backend.c | 7 +-- refs/refs-internal.h | 5 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 6fd5121..cd06f4b 100644 --- a/r

[PATCH v6 11/32] refs: add method for initial ref transaction commit

2016-02-24 Thread David Turner
Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 6 ++ refs/files-backend.c | 5 +++-- refs/refs-internal.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 9f06686..5ae1903 100644 --- a/refs.c +++ b/refs.c @@ -

[PATCH v6 16/32] refs: make lock generic

2016-02-24 Thread David Turner
Instead of using a files-backend-specific struct ref_lock, the generic ref_transaction struct should provide a void pointer that backends can use for their own lock data. Signed-off-by: David Turner --- refs/files-backend.c | 29 - refs/refs-internal.h | 2 +- 2 file

[PATCH v6 20/32] refs: on symref reflog expire, lock symref not referrent

2016-02-24 Thread David Turner
When locking a symbolic ref to expire a reflog, lock the symbolic ref (using REF_NODEREF) instead of its referent. Add a test for this. Signed-off-by: David Turner --- refs/files-backend.c | 3 ++- t/t1410-reflog.sh| 10 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --g

[PATCH v6 15/32] refs: handle non-normal ref renames

2016-02-24 Thread David Turner
Forbid cross-backend ref renames. This would be pretty weird, but since it will break, we should prevent it. Also make the files backend deal with all non-normal ref renames. Signed-off-by: David Turner --- refs.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a

[PATCH v6 30/32] refs: add LMDB refs storage backend

2016-02-24 Thread David Turner
Add a database backend for refs using LMDB. This backend runs git for-each-ref about 30% faster than the files backend with fully-packed refs on a repo with ~120k refs. It's also about 4x faster than using fully-unpacked refs. In addition, and perhaps more importantly, it avoids case-conflict is

[PATCH v6 13/32] refs: add methods to init refs db

2016-02-24 Thread David Turner
Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner --- builtin/init-db.c| 20 ++-- refs.c | 5 + refs.h | 2 ++ refs/files-backend.c | 1

[PATCH v6 01/32] refs: move head_ref{,_submodule} to the common code

2016-02-24 Thread David Turner
These don't use any backend-specific functions. These were previously defined in terms of the do_head_ref helper function, but since they are otherwise identical, we don't need that function. Signed-off-by: David Turner --- refs.c | 23 +++ refs/files-backend.c

[PATCH v6 23/32] init: allow alternate ref strorage to be set for new repos

2016-02-24 Thread David Turner
git init learns a new argument --ref-storage. Presently, only "files" is supported, but later we will add other storage backends. When this argument is used, the repository's extensions.refStorage configuration value is set (as well as core.repositoryformatversion), and the ref storage backend's

[PATCH v6 27/32] refs: register ref storage backends

2016-02-24 Thread David Turner
Add new function register_ref_storage_backends(). This new function registers all known ref storage backends... once there are any other than the default. For now, it just registers the files backend. Call the function before calling set_ref_storage_backend. Signed-off-by: David Turner --- bu

[PATCH v6 14/32] refs: add method to rename refs

2016-02-24 Thread David Turner
Signed-off-by: David Turner --- refs.c | 5 + refs/files-backend.c | 4 +++- refs/refs-internal.h | 8 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index baf83ac..3a2ad5e 100644 --- a/refs.c +++ b/refs.c @@ -1412,3 +1412,8 @@ int delete

[PATCH v6 08/32] refs: reduce the visibility of do_for_each_ref()

2016-02-24 Thread David Turner
From: Ramsay Jones Now that we have moved do_for_each_ref into refs.c, it no longer needs to be public. Signed-off-by: Ramsay Jones --- refs.c | 19 +++ refs/refs-internal.h | 6 -- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/refs.c b/ref

[PATCH v6 17/32] refs: move duplicate check to common code

2016-02-24 Thread David Turner
The check for duplicate refnames in a transaction is needed for all backends, so move it to the common code. ref_transaction_commit_fn gains a new argument, the sorted string_list of affected refnames. Signed-off-by: David Turner --- refs.c | 69 +++

[PATCH v6 22/32] refs: always handle non-normal refs in files backend

2016-02-24 Thread David Turner
Always handle non-normal (per-worktree or pseudo) refs in the files backend instead of alternate backends. Sometimes a ref transaction will update both a per-worktree ref and a normal ref. For instance, an ordinary commit might update refs/heads/master and HEAD (or at least HEAD's reflog). Updat

[PATCH v6 28/32] config: read ref storage config on startup

2016-02-24 Thread David Turner
This sets up the existing backend early, so that other code which reads refs is reading from the right place. Signed-off-by: David Turner --- config.c | 24 1 file changed, 24 insertions(+) diff --git a/config.c b/config.c index b95ac3a..6cea884 100644 --- a/config.c ++

[PATCH v6 10/32] refs: add methods for reflog

2016-02-24 Thread David Turner
In the file-based backend, the reflog piggybacks on the ref lock. Since other backends won't have the same sort of ref lock, ref backends must also handle reflogs. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 46 ++

[PATCH v6 32/32] tests: add ref-storage argument

2016-02-24 Thread David Turner
Add a --ref-storage argument to make it easy to test alternate ref storage backends. This means that every test that calls git init or git clone must use the new ref storage argument. Modify many tests to work under alternate ref storage backends. Introduce abstractions for raw ref/reflog readin

[PATCH v6 29/32] refs: break out resolve_ref_unsafe_submodule

2016-02-24 Thread David Turner
It will soon be useful for resolve_ref_unsafe to support submodules. But since it is called from so many places, changing it would have been painful. Fortunately, it's just a thin wrapper around (the former) resolve_ref_1. So now resolve_ref_1 becomes resolve_ref_unsafe_submodule, and it passes i

[PATCH v6 09/32] refs: add do_for_each_per_worktree_ref

2016-02-24 Thread David Turner
Alternate refs backends might still use files to store per-worktree refs. So the files backend's ref-loading infrastructure should be available to those backends, just for use on per-worktree refs. Add do_for_each_per_worktree_ref, which iterates over per-worktree refs. Signed-off-by: David Turn

[PATCH v6 21/32] refs: resolve symbolic refs first

2016-02-24 Thread David Turner
Before committing ref updates, split symbolic ref updates into two parts: an update to the underlying ref, and a log-only update to the symbolic ref. This ensures that both references are locked correctly while their reflogs are updated. It is still possible to confuse git by concurrent updates,

RE: Some strange behavior of git

2016-02-24 Thread Randall S. Becker
On February 24, 2016 5:43 PM, Olga Pshenichnikova wrote > 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) > > app/addons/arliteks/ > >

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

2016-02-24 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 operation of submodule comma

Re: [PATCH] unpack-trees: do not delete i-t-a entries in worktree even when forced

2016-02-24 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> Intent-to-add entries are basically "I may want to commit these files >> later, but for now they are untracked". As such, when the user does "git >> reset --hard ", which removes i-t-a entries from the index, i-t-a >> entries in worktre

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

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller wrote: > 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 > o

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

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller > wrote: >> 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 set

git mv messed up file mapping if folders contain identical files

2016-02-24 Thread Bill Okara
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. that is, if having identical 'content.txt' file under gitmvtest |--demo/conten

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

2016-02-24 Thread Junio C Hamano
Bill Okara writes: > just want to see if this is a bug, user error (on my end), or?? Not a bug, not a user error, just "it does not matter", I think. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at

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

2016-02-24 Thread Jacob Keller
Hi, On Wed, Feb 24, 2016 at 3:27 PM, Stefan Beller wrote: > On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller > wrote: >> From: Jacob Keller >> Add a git submodule--helper function which can be used to sanitize the >> GIT_CONFIG_PARAMETERS value to only allow certain settings. For now, >> restric

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

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 3:36 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller >> wrote: >>> From: Jacob Keller >>> >>> Due to the way that the git-submodule code works, it clears all local >>> git environment variables before entering submod

  1   2   >