Re: What's cooking in git.git (Jun 2016, #01; Thu, 2)

2016-06-03 Thread Mike Hommey
On Fri, Jun 03, 2016 at 04:47:33PM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > In fact, the parser doesn't even reject the one that is considered > > invalid (the first). > > My question was what the desired behaviour is, and if your "fix" > gives us that desired

Re: [PATCH v4 0/6] worktree lock/unlock

2016-06-03 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > v4 > > - fixes some documentation bugs in v3 > > - updates is_main_worktree commit message a bit > > - brings back is_worktree_locked() as API with value lazily obtained >and cached in worktree->lock_reason and fixes a memory leak > > -

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Junio C Hamano
On Fri, Jun 3, 2016 at 4:52 PM, Duy Nguyen wrote: > A placeholder can still keep the variable part at the end, e.g. > "refs/$/head -> pull/123" I somehow like this very much. A more typical "their topic went to remote-tracking namespace under 'origin'", aka topic ->

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Duy Nguyen
On Sat, Jun 4, 2016 at 3:53 AM, Junio C Hamano wrote: > By punting on the effort to find a readable format that does not > repeat the same info twice, we are sending a signal to the users > that they cannot use a meaningful sentence as the name of a branch > name; they need to

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Junio C Hamano
On Fri, Jun 3, 2016 at 5:19 PM, Eric Sunshine wrote: > > My only minor reservation is that it your concise version is still > subtle with regard to not taking 'linelen' into account. At first > glance, it looks like a bug that it doesn't consider the logical >

Re: [PATCH] reflog: continue walking the reflog past root commits

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 4:42 PM, SZEDER Gábor wrote: > If a repository contains more than one root commit, then its HEAD > reflog may contain multiple "creation events", i.e. entries whose > "from" value is the null sha1. Listing such a reflog currently stops > prematurely at

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Duy Nguyen
On Fri, Jun 03, 2016 at 10:53:27AM -0400, Marc Branchaud wrote: > On 2016-06-03 07:08 AM, Nguyễn Thái Ngọc Duy wrote: > > When there are lots of ref updates, each has different name length, this > > will make it easier to look because the variable part is at the end. > > s/look/read/ > > For the

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 8:02 PM, Eric Sunshine wrote: > On Fri, Jun 3, 2016 at 7:42 PM, Junio C Hamano wrote: >> Eric Sunshine writes: >> static int is_mboxrd_from(const char *line) { return

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 7:42 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> static int is_mboxrd_from(const char *line) { >>> return starts_with(line + strspn(line, ">"), "From "); >>> } >>> >>> is sufficiently

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Duy Nguyen
On Sat, Jun 4, 2016 at 12:06 AM, Jeff King wrote: > On Fri, Jun 03, 2016 at 06:08:43PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> When there are lots of ref updates, each has different name length, this >> will make it easier to look because the variable part is at the end. > > Is it

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Duy Nguyen
On Sat, Jun 4, 2016 at 12:00 AM, Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > +static int common_suffix_length(const char *a, const char *b) > > +{ > > + const char *pa = a + strlen(a); > > + const char *pb = b + strlen(b); > > +

Re: What's cooking in git.git (Jun 2016, #01; Thu, 2)

2016-06-03 Thread Junio C Hamano
Mike Hommey writes: > In fact, the parser doesn't even reject the one that is considered > invalid (the first). My question was what the desired behaviour is, and if your "fix" gives us that desired outcome. > (Also, the discussion back then was about >

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Junio C Hamano
Eric Sunshine writes: >> static int is_mboxrd_from(const char *line) { >> return starts_with(line + strspn(line, ">"), "From "); >> } >> >> is sufficiently high-level that no longer is scary, hopefully? > > That's nice and concise but

Re: [PATCH v2 00/13] Reference iterators

2016-06-03 Thread Junio C Hamano
Michael Haggerty writes: > On 06/03/2016 11:33 PM, Junio C Hamano wrote: >> Michael Haggerty writes: >> >>> This patch series applies on top of mh/split-under-lock. It can also >>> be obtained from my GitHub repo [2] as branch "ref-iterators". >> >>

[PATCH] regex: fix a SIZE_MAX macro redefinition warning

2016-06-03 Thread Ramsay Jones
Since commit 56a1a3ab ("Silence GCC's \"cast of pointer to integer of a different size\" warning", 26-10-2015), sparse has been issuing a macro redefinition warning for the SIZE_MAX macro. However, gcc did not issue any such warning. After commit 56a1a3ab, in terms of the order of #includes and

Re: RFC: have a config option for running submodule update after checkout

2016-06-03 Thread Stefan Beller
On Fri, Jun 3, 2016 at 3:53 PM, Stefan Beller wrote: > disadvantages: > * it's not `done right`, i.e. dealing with gitlinks in read-tree/unpack-tree >but just another command chained after checkout, so we would do that >for pull too eventually? Well one argument

Re: What's cooking in git.git (Jun 2016, #01; Thu, 2)

2016-06-03 Thread Mike Hommey
On Fri, Jun 03, 2016 at 08:59:46AM -0700, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > There where 2 comments in the review. > > The most important thing is that now > > git://[example.com:123]/path/to/repo is valid, but it shouldn't. > > This patch fixes it: > > > >

hi

2016-06-03 Thread William Broady
Greetings http://cdxdhc.com/minerals.php?coast=ky1mydg4n8s69z William -- 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 http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 6:36 PM, Junio C Hamano wrote: > Eric Sunshine writes: >> On Thu, Jun 2, 2016 at 3:51 AM, Eric Wong wrote: >>> Eric Wong wrote: Eric Sunshine wrote: > On Tue,

RFC: have a config option for running submodule update after checkout

2016-06-03 Thread Stefan Beller
When checking out a new revision in a repo with submodules, one of the first commands after checkout is `git submodule update` to make sure the submodules are updated. I propose to have a switch which when turned on automatically runs `git submodule update` for you instead of implementing proper

Re: [PATCH v2] Documentation more consistent

2016-06-03 Thread Junio C Hamano
Tom Russello writes: > Hello, > as `MAN_BOLD_LITERAL` knob is now turned on by default, it is the right time > to > make our documentation more consistent. "is now turned on by default" since when ;-)? Just kidding; it just happened in my tree a few minutes ago

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Jun 2, 2016 at 3:51 AM, Eric Wong wrote: >> Eric Wong wrote: >>> Eric Sunshine wrote: >>> > On Tue, May 31, 2016 at 3:45 AM, Eric Wong wrote: >>> > > Eric

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
[cc:+junio] On Thu, Jun 2, 2016 at 3:51 AM, Eric Wong wrote: > Eric Wong wrote: >> Eric Sunshine wrote: >> > On Tue, May 31, 2016 at 3:45 AM, Eric Wong wrote: >> > > Eric Sunshine wrote: >> > >>

Re: [RFC/PATCH] Triangular Workflow UI improvement: Documentation

2016-06-03 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: That said, trying to find a good name for that 'third place' is not easy. It's neither upstream, nor downstream (for Junio - the maintainer special case - git.git would be his downstream). The me/git repo

[PATCH v2 2/3] Change environment variables format

2016-06-03 Thread Tom Russello
As a first step, this change GIT_* variables that where in italic style to monospace font according to the guideline. It was obtained with perl -pi -e "s/\'(GIT_.*?)\'/\`\1\`/g" *.txt Signed-off-by: Tom Russello Signed-off-by: Erwan Mathoniere

[PATCH v2 3/3] Change configuration variables format

2016-06-03 Thread Tom Russello
As a first step, this change configuration variables that where in italic style to monospace font according to the guideline. It was obtained with grep '[[:alpha:]]*\.[[:alpha:]]*::$' config.txt | \ sed -e 's/::$//' -e 's/\././' | \ xargs -iP perl -pi -e

[PATCH v2 1/3] Clearer rule about formatting literals

2016-06-03 Thread Tom Russello
Make the guideline text that we want for our documentation clearer. Signed-off-by: Tom Russello Signed-off-by: Erwan Mathoniere Signed-off-by: Samuel Groot Signed-off-by: Matthieu Moy

[PATCH v2] Documentation more consistent

2016-06-03 Thread Tom Russello
Hello, as `MAN_BOLD_LITERAL` knob is now turned on by default, it is the right time to make our documentation more consistent. -- 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 v2 00/13] Reference iterators

2016-06-03 Thread Michael Haggerty
On 06/03/2016 11:33 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> This patch series applies on top of mh/split-under-lock. It can also >> be obtained from my GitHub repo [2] as branch "ref-iterators". > > Ah, that reminds me. What's the doneness of the

Re: [PATCH v2 00/13] Reference iterators

2016-06-03 Thread Junio C Hamano
Michael Haggerty writes: > This patch series applies on top of mh/split-under-lock. It can also > be obtained from my GitHub repo [2] as branch "ref-iterators". Ah, that reminds me. What's the doneness of the dependent topic? The patches in this series looked all good to

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-03 Thread Johannes Sixt
Am 03.06.2016 um 14:32 schrieb William Duclot: CSS is widely used, motivating it being included as a built-in pattern. It must be noted that the word_regex for CSS (i.e. the regex defining what is a word in the language) does not consider '.' and '#' characters (in CSS selectors) to be part of

[PATCH 25/38] lock_raw_ref(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 48b37fa..dfce4d1 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 28/38] lock_ref_sha1_basic(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 225e0af..24b7c60 100644 --- a/refs/files-backend.c +++

[PATCH 23/38] refs: make peel_ref() virtual

2016-06-03 Thread Michael Haggerty
For now it only supports the main reference store. Signed-off-by: Michael Haggerty --- refs.c | 7 +++ refs/files-backend.c | 6 -- refs/refs-internal.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH 29/38] split_symref_update(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
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 24b7c60..8d3cf96 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -3405,7

[PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-03 Thread Michael Haggerty
We want ref_stores to be polymorphic, so invent a base class of which files_ref_store is a derived class. For now there is a one-to-one relationship between ref_stores and submodules. Signed-off-by: Michael Haggerty --- refs.c | 91 ++

[PATCH 35/38] refs: add methods to init refs db

2016-06-03 Thread Michael Haggerty
From: 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 Signed-off-by: Junio C Hamano Signed-off-by:

[PATCH 08/38] resolve_missing_loose_ref(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 57f1965..9307fa0 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 31/38] refs: add method iterator_begin

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 2 +- refs/files-backend.c | 3 ++- refs/refs-internal.h | 24 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/refs.c b/refs.c index bda8fc1..d1ab20b 100644 --- a/refs.c

[PATCH 16/38] resolve_gitlink_ref(): implement using resolve_ref_recursively()

2016-06-03 Thread Michael Haggerty
resolve_ref_recursively() can handle references in arbitrary files reference stores, so use it to resolve "gitlink" (i.e., submodule) references. Aside from removing redundant code, this allows submodule lookups to benefit from the much more robust code that we use for reading non-submodule

[PATCH 18/38] resolve_gitlink_ref(): rename path parameter to submodule

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 11 ++- refs.h | 9 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/refs.c b/refs.c index 7a8ef6d..c39f85a 100644 --- a/refs.c +++ b/refs.c @@ -1299,22 +1299,23 @@ const char

[PATCH 07/38] get_packed_ref(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 5bfa912..57f1965 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 32/38] refs: add methods for reflog

2016-06-03 Thread Michael Haggerty
From: 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

[PATCH 30/38] files_ref_iterator_begin(): take a ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 2 +- refs/files-backend.c | 4 ++-- refs/refs-internal.h | 8 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index 2d84c5c..bda8fc1 100644 --- a/refs.c +++ b/refs.c @@

[PATCH 36/38] refs: add method to rename refs

2016-06-03 Thread Michael Haggerty
From: David Turner This removes the last caller of function get_files_ref_store(), so remove it. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs.c

[PATCH 22/38] refs: make create_symref() virtual

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 9 + refs/files-backend.c | 7 ++- refs/refs-internal.h | 5 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index f4f5f32..22837f4 100644 --- a/refs.c +++ b/refs.c

[PATCH 26/38] commit_ref_update(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index dfce4d1..bc7d250 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 33/38] refs: add method for initial ref transaction commit

2016-06-03 Thread Michael Haggerty
From: David Turner Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs.c | 8

[PATCH 37/38] refs: make lock generic

2016-06-03 Thread Michael Haggerty
From: David Turner Instead of including a files-backend-specific struct ref_lock, change the generic ref_update struct to include a void pointer that backends can use for their own arbitrary data. Signed-off-by: David Turner Signed-off-by:

[PATCH 21/38] refs: make pack_refs() virtual

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 7 +++ refs/files-backend.c | 6 -- refs/refs-internal.h | 4 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 79ef443..f4f5f32 100644 --- a/refs.c +++ b/refs.c @@

[PATCH 20/38] refs: make verify_refname_available() virtual

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.c | 10 ++ refs/files-backend.c | 14 -- refs/refs-internal.h | 7 +++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 1798f66..79ef443 100644 --- a/refs.c

[PATCH 13/38] resolve_gitlink_packed_ref(): remove function

2016-06-03 Thread Michael Haggerty
Now that resolve_packed_ref() can work with an arbitrary files_ref_store, there is no need to have a separate resolve_gitlink_packed_ref() function. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 26 +- 1 file changed, 5 insertions(+),

[PATCH 27/38] lock_ref_for_update(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index bc7d250..225e0af 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 24/38] repack_without_refs(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 91dcfcb..48b37fa 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 34/38] refs: add method for delete_refs

2016-06-03 Thread Michael Haggerty
From: 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

[PATCH 38/38] refs: implement iteration over only per-worktree refs

2016-06-03 Thread Michael Haggerty
From: David Turner Alternate refs backends might still use files to store per-worktree refs. So provide a way to iterate over only the per-worktree references in a ref_store. The other backend can set up a files ref_store and iterate using the new

[PATCH 06/38] add_packed_ref(): add a files_ref_store argument

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 8ef79c2..5bfa912 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1196,10

[PATCH 00/38] Virtualization of the refs API

2016-06-03 Thread Michael Haggerty
Since the that ref-iterator [1] changes seem to have gotten a positive reception, let's try to keep up the momentum. I hope I'm not overloading the review pipeline... I think all of the groundwork is in place now to virtualize the refs API. This will open the way to storing refs in ways other

[PATCH 04/38] refs: add a backend method structure

2016-06-03 Thread Michael Haggerty
From: Ronnie Sahlberg Add a `struct ref_storage_be` to represent types of reference stores. In OO notation, this is the class, and will soon hold some class methods (e.g., a factory to create new ref_store instances) and will also serve as the vtable for ref_store instances

[PATCH 02/38] rename_ref_available(): add docstring

2016-06-03 Thread Michael Haggerty
From: David Turner Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs/refs-internal.h | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 12/38] resolve_packed_ref(): rename function from resolve_missing_loose_ref()

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 50bfe97..b54355d 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@

[PATCH 19/38] refs: make read_raw_ref() virtual

2016-06-03 Thread Michael Haggerty
Reference backends will be able to customize this function to implement reference reading. Signed-off-by: Michael Haggerty --- refs.c | 4 ++-- refs/files-backend.c | 14 -- refs/refs-internal.h | 36 +++- 3 files

[PATCH 15/38] resolve_ref_recursively(): new function

2016-06-03 Thread Michael Haggerty
Add a new function, resolve_ref_recursively(), which is basically like the old resolve_ref_unsafe() except that it takes a (ref_store *) argument and also works for submodules. Re-implement resolve_ref_unsafe() as a thin wrapper around resolve_ref_recursively(). Signed-off-by: Michael Haggerty

[PATCH 14/38] read_raw_ref(): take a (struct ref_store *) argument

2016-06-03 Thread Michael Haggerty
And make the function work for submodules. Signed-off-by: Michael Haggerty --- refs.c | 4 +++- refs/files-backend.c | 18 +- refs/refs-internal.h | 9 ++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/refs.c b/refs.c

[PATCH 09/38] {lock,commit,rollback}_packed_refs(): add files_ref_store arguments

2016-06-03 Thread Michael Haggerty
These functions currently only work in the main repository, so add an assert_main_repository() check to each function. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff

[PATCH 17/38] resolve_gitlink_ref(): avoid memory allocation in many cases

2016-06-03 Thread Michael Haggerty
If we don't have to strip trailing '/' from the submodule path, then don't allocate and copy the submodule name. Signed-off-by: Michael Haggerty --- refs.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH 10/38] refs: add a transaction_commit() method

2016-06-03 Thread Michael Haggerty
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Jeff King Signed-off-by: Michael Haggerty

[PATCH 11/38] refs: reorder definitions

2016-06-03 Thread Michael Haggerty
Move resolve_gitlink_ref() and related functions lower in the file to avoid the need for forward declarations in the next step. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 166 +-- 1 file changed, 83

[PATCH 01/38] resolve_gitlink_ref(): eliminate temporary variable

2016-06-03 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 36bf128..2f9d79a 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1387,7

[PATCH 03/38] refs: rename struct ref_cache to files_ref_store

2016-06-03 Thread Michael Haggerty
The greater goal of this patch series is to develop the concept of a reference store, which is a place that references, their values, and their reflogs are stored, and to virtualize the reference interface so that different types of ref_stores can be implemented. We will then, for example, use

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Junio C Hamano
Marc Branchaud writes: >>> * [new branch] 2nd-index -> pclouds/2nd-index >>> * [new branch] some-kind-of-long-ref-name >>> -> pclouds/some-kind-of-long-ref-name >>> * [new branch] 3nd-index -> pclouds/3nd-index > ... > I

[PATCH] reflog: continue walking the reflog past root commits

2016-06-03 Thread SZEDER Gábor
If a repository contains more than one root commit, then its HEAD reflog may contain multiple "creation events", i.e. entries whose "from" value is the null sha1. Listing such a reflog currently stops prematurely at the first such entry, even when the reflog still contains older entries. This

Re: [PATCHv4] pathspec: allow escaped query values

2016-06-03 Thread Junio C Hamano
Stefan Beller writes: > In our own .gitattributes file we have attributes such as: > > *.[ch] whitespace=indent,trail,space > > When querying for attributes we want to be able to ask for the exact > value, i.e. > > git ls-files :(attr:whitespace=indent,trail,space) >

Re: --orphan erases HEAD reflog

2016-06-03 Thread SZEDER Gábor
> after running the command: > > git checkout --orphan fuleFix > > my HEAD reflog is emptied. > I would like to have my reflog intact :) No worries, your reflog is still intact :) It's just the reflog walker stopping prematurely upon encountering the null sha1 of the new root commit's reflog

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Marc Branchaud
On 2016-06-03 01:04 PM, Junio C Hamano wrote: Marc Branchaud writes: What if we detect when the full line exceeds the terminal width, and insert a newline after the remote ref and indent the -> to the same offset as its surrounding lines, like this: * [new branch]

[PATCHv4] pathspec: allow escaped query values

2016-06-03 Thread Stefan Beller
In our own .gitattributes file we have attributes such as: *.[ch] whitespace=indent,trail,space When querying for attributes we want to be able to ask for the exact value, i.e. git ls-files :(attr:whitespace=indent,trail,space) should work, but the commas are used in the attr magic to

[PATCH v4 1/3] completion: factor out untracked file modes into a variable

2016-06-03 Thread Thomas Braun
Signed-off-by: Thomas Braun --- contrib/completion/git-completion.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3402475..addea89 100644 ---

[PATCH v4 0/3] support completion for git status

2016-06-03 Thread Thomas Braun
changes since v3: * support short version -u of --untracked-files option * introduce __git_get_option_value for general usage * fix style issues * support order dependent statements like git status -uno --untracked-files=all properly Thomas Braun (3): completion: factor out untracked file

[PATCH v4 3/3] completion: add git status

2016-06-03 Thread Thomas Braun
Signed-off-by: Thomas Braun --- contrib/completion/git-completion.bash | 50 ++ 1 file changed, 50 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 4bd17aa..9eff33c

[PATCH v4 2/3] completion: add __git_get_option_value helper

2016-06-03 Thread Thomas Braun
This function allows to search the commmand line and config files for an option, long and short, with mandatory value. The function would return e.g. for the command line "git status -uno --untracked-files=all" the result "all" regardless of the config option. Signed-off-by: Thomas Braun

Re: [PATCH v3 2/2] completion: add git status

2016-06-03 Thread Thomas Braun
Am 03.06.2016 um 19:54 schrieb Junio C Hamano: > Jeff King writes: > >> I know not everybody will the "natural thing" I claim, and if it were >> easy to support everywhere, I don't mind doing it. But I suspect >> (without thinking very hard on it) that it would make those case >>

Re: Signing off, for now

2016-06-03 Thread David Turner
On Tue, 2016-05-24 at 15:22 -0400, David Turner wrote: > - Protocol v2: I would like to get a new draft of Stefan's series out > before I leave, but no promises. It's turned out to be a bit more > complicated than I expected to support HTTP. At worst, I'll toss my > WIP on github and send a link

Re: [PATCH v4 1/2] builtin/apply: add 'lock_file' pointer into 'struct apply_state'

2016-06-03 Thread Junio C Hamano
Christian Couder writes: > This is to replace: > > "[PATCH v3 48/49] builtin/apply: move 'lock_file' global into 'struct > apply_state'" > > from the "libify apply and use lib in am, part 1" patch series. Thanks; will replace the tip 2 patches and requeue. > diff

Re: [PATCH v2 00/13] Reference iterators

2016-06-03 Thread David Turner
On Fri, 2016-06-03 at 14:33 +0200, Michael Haggerty wrote: > This is v2 of a patch series to implement iteration over references > via iterators. Thanks to Ramsay, Eric, Junio, and David for their > feedback about v1 [1]. I think I have addressed all of the points > that > were raised. In case I

Re: [PATCH v3 2/2] completion: add git status

2016-06-03 Thread Junio C Hamano
Jeff King writes: > I know not everybody will the "natural thing" I claim, and if it were > easy to support everywhere, I don't mind doing it. But I suspect > (without thinking very hard on it) that it would make those case > statements a bit harder to read and maintain. Oh, I

Re: [PATCH v2 0/3] Better ref summary alignment in "git fetch"

2016-06-03 Thread Junio C Hamano
Jeff King writes: >> It's a shame that the flag '-' in these ref update lines is not the >> same in fetch and push (see 1/3). Because git-fetch does not support >> --porcelain option, maybe it's not too late to change its meaning... > > I'd agree with that final "maybe". :)

Re: [PATCH v4 1/2] builtin/apply: add 'lock_file' pointer into 'struct apply_state'

2016-06-03 Thread Christian Couder
On Fri, Jun 3, 2016 at 6:58 PM, Christian Couder wrote: > From: Christian Couder Sorry for this spurious "From:" line. It looks like send-email added it, and I don't understand why it does it now. -- To unsubscribe from this list: send the

[PATCH] l10n: de.po: translate 104 new messages

2016-06-03 Thread Ralf Thielow
Translate 104 new messages came from git.pot update in f517e50 (l10n: git.pot: v2.9.0 round 1 (104 new, 37 removed)). Signed-off-by: Ralf Thielow --- po/de.po | 413 --- 1 file changed, 212 insertions(+), 201

Re: [PATCH v3 2/2] completion: add git status

2016-06-03 Thread Jeff King
On Fri, Jun 03, 2016 at 09:34:00AM -0700, Junio C Hamano wrote: > Thomas Braun writes: > > >>> + if [ -n "$(__git_find_on_cmdline "--ignored")" ]; then > >> > >> Same question as the "--untracked-files=no vs -uno" applies here. > > > > Is there

Re: [PATCH 02/10] builtin/index-pack.c: convert trivial snprintf calls to xsnprintf

2016-06-03 Thread Jeff King
On Fri, Jun 03, 2016 at 04:32:41PM +0100, Ramsay Jones wrote: > >>char buf[48]; > >> - int len = snprintf(buf, sizeof(buf), "%s\t%s\n", > >> + int len = xsnprintf(buf, sizeof(buf), "%s\t%s\n", > >> report, sha1_to_hex(sha1)); > >>

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Jeff King
On Fri, Jun 03, 2016 at 06:08:43PM +0700, Nguyễn Thái Ngọc Duy wrote: > When there are lots of ref updates, each has different name length, this > will make it easier to look because the variable part is at the end. Is it worth handling more complicated cases, where there is a similar "middle",

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Junio C Hamano
Marc Branchaud writes: > What if we detect when the full line exceeds the terminal width, and > insert a newline after the remote ref and indent the -> to the same > offset as its surrounding lines, like this: > > * [new branch] 2nd-index -> pclouds/2nd-index > *

Re: [PATCH v2 0/3] Better ref summary alignment in "git fetch"

2016-06-03 Thread Jeff King
On Fri, Jun 03, 2016 at 06:08:40PM +0700, Nguyễn Thái Ngọc Duy wrote: > v2 reformats "abc/common -> def/common" to "{abc -> def}/common" > instead and fall back to "a -> b" when they have nothing in commmon > (e.g. "HEAD -> FETCH_HEAD"). We could add an option if a user wants to > stick with "a

Re: [PATCH v2 3/3] fetch: reduce duplicate in ref update status lines

2016-06-03 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +static int common_suffix_length(const char *a, const char *b) > +{ > + const char *pa = a + strlen(a); > + const char *pb = b + strlen(b); > + int count = 0; > + > + while (pa > a && pb > b && pa[-1] == pb[-1]) { > +

[PATCH v4 1/2] builtin/apply: add 'lock_file' pointer into 'struct apply_state'

2016-06-03 Thread Christian Couder
From: Christian Couder We cannot have a 'struct lock_file' allocated on the stack, as lockfile.c keeps a linked list of all created lock_file structures. Also 'struct apply_state' users might later want the same 'struct lock_file' instance to be reused by different

[PATCH v4 2/2] builtin/apply: move 'newfd' global into 'struct apply_state'

2016-06-03 Thread Christian Couder
From: Christian Couder To libify the apply functionality the 'newfd' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano

Re: [PATCH v2 1/3] git-fetch.txt: document fetch output

2016-06-03 Thread Jeff King
On Fri, Jun 03, 2016 at 06:08:41PM +0700, Nguyễn Thái Ngọc Duy wrote: > This patch is a copy from git-push.txt, modified a bit because the > flag '-' means different things in push (delete) and fetch (tag > update). We probably should unify the documents at some point in > future. This is stderr

Re: [PATCH v2 2/3] fetch: refactor ref update status formatting code

2016-06-03 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This makes it easier to change the formatting later. And it makes sure > translators cannot mess up format specifiers and break Git. > ... > +static void format_display(struct strbuf *display, char code, > +const char

Re: git gc and worktrees

2016-06-03 Thread Junio C Hamano
Michael Haggerty writes: > On 06/01/2016 09:39 PM, Junio C Hamano wrote: >> ... > I think I would represent the logical store of a worktree repo as > follows. First, ... > ... >> Up to this point, I am all for your "separate physical stores are >> composited to give a

Re: [PATCH v3 2/2] completion: add git status

2016-06-03 Thread Junio C Hamano
Thomas Braun writes: >>> + if [ -n "$(__git_find_on_cmdline "--ignored")" ]; then >> >> Same question as the "--untracked-files=no vs -uno" applies here. > > Is there a short version of --ignored? I could not find one in the help, > and from a

  1   2   >