Re: [PATCH 7/7] completion: recognize more long-options

2017-01-23 Thread Johannes Sixt
If at all possible, please use your real email address as the From address. It is pointless to hide behind a fake address because as Git contributor you will have to reveal your identity anyway. Please study item (5) "Sign your work" in Documentation/SubmittingPatches and sign off your work.

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Giuseppe Bilotta
On Tue, Jan 24, 2017 at 12:27 AM, Junio C Hamano wrote: > Giuseppe Bilotta writes: >> >> I'm not sure I follow. If the user doesn't want to signoff during a >> rebase, they can simply not pass --signoff. If they do, they can not >> pass it. Am I

[PATCH] gitk: use right colour for remote refs in the "Tags and heads" dialog

2017-01-23 Thread Paul Wise
Makes it easier to see which refs are local and which refs are remote. Adds consistency with the remote background colour in the graph display. Signed-off-by: Paul Wise --- gitk-git/gitk | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v3 4/5] show-ref: Detect dangling refs under --verify as well

2017-01-23 Thread Junio C Hamano
Vladimir Panteleev writes: > Move detection of dangling refs into show_one, so that they are > detected when --verify is present as well as when it is absent. > > Signed-off-by: Vladimir Panteleev > --- > builtin/show-ref.c | 16

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-23 Thread Junio C Hamano
Brandon Williams writes: > ... It seems like breaking the question and answer up > doesn't buy you much in terms of reducing allocation churn and instead > complicates the API with needing to keep track of two structures instead > of a one. In my mind, the value of having a

Re: [PATCH] [draft]blame: add --aggregate option

2017-01-23 Thread Edmundo Carmona Antoranz
Developers of the world, rejoice! :-) Junio, Pranit (and whoever is paying attention to the conversation that was being held about --tips), here's a draft of what I meant when I was talking about the option of "aggregating" blame output. I'm not considering _all_ cases yet, just would like for

Re: [PATCH 0/12] reducing resource usage of for_each_alternate_ref

2017-01-23 Thread Jeff King
On Mon, Jan 23, 2017 at 05:33:41PM -0800, Brandon Williams wrote: > On 01/23, Jeff King wrote: > > > > A brief overview of the patches: > > > > [01/12]: for_each_alternate_ref: handle failure from real_pathdup() > > [02/12]: for_each_alternate_ref: stop trimming trailing slashes > >

[PATCH] [draft]blame: add --aggregate option

2017-01-23 Thread Edmundo Carmona Antoranz
--- builtin/blame.c | 78 + 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index 126b8c9e5..9e8403303 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1884,6 +1884,7 @@ static const

Re: [PATCH 0/12] reducing resource usage of for_each_alternate_ref

2017-01-23 Thread Brandon Williams
On 01/23, Jeff King wrote: > > A brief overview of the patches: > > [01/12]: for_each_alternate_ref: handle failure from real_pathdup() > [02/12]: for_each_alternate_ref: stop trimming trailing slashes > [03/12]: for_each_alternate_ref: use strbuf for path allocation > > Bugfixes and

Re: [PATCH 3/3] git-prompt.sh: fix for submodule 'dirty' indicator

2017-01-23 Thread brian m. carlson
On Sun, Jan 22, 2017 at 08:30:21PM +0100, Benjamin Fuchs wrote: > Fixing wrong git diff line. This patch says 3/3, but I don't see 1 and 2. Also, this description doesn't tell me what the problem is, or why this fix is useful. Such information helps us down the line when looking at the history,

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-23 Thread Brandon Williams
On 01/23, Brandon Williams wrote: > As we discussed off-line I'll also do the rework to break up the > question and result. That way two threads can be executing using the > same attr_check structure. Thinking about this I don't really see what we would gain by breaking them up. Right now most

[PATCH 11/12] receive-pack: treat namespace .have lines like alternates

2017-01-23 Thread Jeff King
Namely, de-duplicate them. We use the same set as the alternates, since we call them both ".have" (i.e., there is no value in showing one versus the other). Signed-off-by: Jeff King --- builtin/receive-pack.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[PATCH 12/12] receive-pack: avoid duplicates between our refs and alternates

2017-01-23 Thread Jeff King
We de-duplicate ".have" refs among themselves, but never check if they are duplicates of our local refs. It's not unreasonable that they would be if we are a "--shared" or "--reference" clone of a similar repository; we'd have all the same tags. We can handle this by inserting our local refs into

[PATCH 09/12] receive-pack: use oidset to de-duplicate .have lines

2017-01-23 Thread Jeff King
If you have an alternate object store with a very large number of refs, the peak memory usage of the sha1_array can grow high, even if most of them are duplicates that end up not being printed at all. The similar for_each_alternate_ref() code-paths in fetch-pack solve this by using flags in

[PATCH 10/12] receive-pack: fix misleading namespace/.have comment

2017-01-23 Thread Jeff King
The comment claims that we handle alternate ".have" lines through this function, but that hasn't been the case since 85f251045 (write_head_info(): handle "extra refs" locally, 2012-01-06). Signed-off-by: Jeff King --- builtin/receive-pack.c | 5 + 1 file changed, 1

[PATCH 08/12] add oidset API

2017-01-23 Thread Jeff King
This is similar to many of our uses of sha1-array, but it overcomes one limitation of a sha1-array: when you are de-duplicating a large input with relatively few unique entries, sha1-array uses 20 bytes per non-unique entry. Whereas this set will use memory linear in the number of unique entries

[PATCH 07/12] fetch-pack: cache results of for_each_alternate_ref

2017-01-23 Thread Jeff King
We may run for_each_alternate_ref() twice, once in find_common() and once in everything_local(). This operation can be expensive, because it involves running a sub-process which must freshly load all of the alternate's refs from disk. Let's cache and reuse the results between the two calls. We

[PATCH 06/12] clone: disable save_commit_buffer

2017-01-23 Thread Jeff King
Normally git caches the raw commit object contents in "struct commit". This makes it fast to run parse_commit() followed by a pretty-print operation. For commands which don't actually pretty-print the commits, the caching is wasteful (and may use quite a lot of memory if git accesses a large

[PATCH 05/12] for_each_alternate_ref: replace transport code with for-each-ref

2017-01-23 Thread Jeff King
The current method for getting the refs from an alternate is to run upload-pack in the alternate and parse its output using the normal transport code. This works and is reasonably short, but it has a very bad memory footprint when there are a lot of refs in the alternate. There are two problems:

[PATCH 04/12] for_each_alternate_ref: pass name/oid instead of ref struct

2017-01-23 Thread Jeff King
Breaking down the fields in the interface makes it easier to change the backend of for_each_alternate_ref to something that doesn't use "struct ref" internally. The only field that callers actually look at is the oid, anyway. The refname is kept in the interface as a plausible thing for future

[PATCH 03/12] for_each_alternate_ref: use strbuf for path allocation

2017-01-23 Thread Jeff King
We have a string with ".../objects" pointing to the alternate object store, and overwrite bits of it to look at other paths in the (potential) git repository holding it. This works because the only path we care about is "refs", which is shorter than "objects". Using a strbuf to hold the path lets

[PATCH 02/12] for_each_alternate_ref: stop trimming trailing slashes

2017-01-23 Thread Jeff King
The real_pathdup() function will have removed extra slashes for us already (on top of the normalize_path() done when we created the alternate_object_database struct in the first place). Incidentally, this also fixes the case where the path is just "/", which would read off the start of the array.

[PATCH 01/12] for_each_alternate_ref: handle failure from real_pathdup()

2017-01-23 Thread Jeff King
In older versions of git, if real_path() failed to resolve the alternate object store path, we would die() with an error. However, since 4ac9006f8 (real_path: have callers use real_pathdup and strbuf_realpath, 2016-12-12) we use the real_pathdup() function, which may return NULL. Since we don't

[PATCH 0/12] reducing resource usage of for_each_alternate_ref

2017-01-23 Thread Jeff King
As I've mentioned before, I have some alternates repositories with absurd numbers of refs, most of which are duplicates of each other[1]. There are a couple of problems I've seen: 1. the way that for_each_alternate_ref() works has very high peak memory usage for this case 2. the way that

What's cooking in git.git (Jan 2017, #04; Mon, 23)

2017-01-23 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes

Re: [PATCH v2 0/5] string-list: make string_list_sort() reentrant

2017-01-23 Thread Jeff King
On Sun, Jan 22, 2017 at 06:47:18PM +0100, René Scharfe wrote: > Use qsort_s() from C11 Annex K to make string_list_sort() safer, in > particular when called from parallel threads. > > Changes from v1: > * Renamed HAVE_QSORT_S to HAVE_ISO_QSORT_S in Makefile to disambiguate. > * Added basic perf

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Junio C Hamano
Giuseppe Bilotta writes: > On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano wrote: >> Giuseppe Bilotta writes: >> >>> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote: Should we plan to

[PATCH 5/5] sequencer: allow to --skip current commit

2017-01-23 Thread Giuseppe Bilotta
If a sequencing gets interrupted (by a conflict or an empty commit or whatever), the user can now opt to just skip it passing the `--skip` command line option, which acts like a `--continue`, except that the current commit gets skipped. Signed-off-by: Giuseppe Bilotta

[PATCH 4/5] cherry-pick: allow skipping only redundant commits

2017-01-23 Thread Giuseppe Bilotta
This allows the preservation of originally empty commits with the combination of flags --allow-empty --skip-redundant-commits. Signed-off-by: Giuseppe Bilotta --- Documentation/git-cherry-pick.txt | 8 - builtin/revert.c | 18 +++-

[PATCH 2/5] sequencer: save/load all options

2017-01-23 Thread Giuseppe Bilotta
Add the missing replay_opts to save_opts and populate_opts, so that an interrupted cherry-pick will continue with the same setup it had before the interruption. Signed-off-by: Giuseppe Bilotta --- sequencer.c | 16 1 file changed, 16 insertions(+)

[PATCH 1/5] sequencer: sort options load/save by struct position

2017-01-23 Thread Giuseppe Bilotta
No functional change. The order in which options are serialized and reloaded is now the same in which they appear in the replay_opts structure. This makes it easier to spot when we forget to serialize/reload an option value. Signed-off-by: Giuseppe Bilotta ---

[PATCH 0/5] sequencer: allow skipping commits

2017-01-23 Thread Giuseppe Bilotta
This series introduces a few options to the sequencer, to allow skipping unwanted/unnecessary commits. The first patch is just cleanup. The second fixes a potential issue about sequencing options not being correctly remembered across interruptions. The next two introduce cherry-pick options to

[PATCH 3/5] cherry-pick: option to skip empty commits

2017-01-23 Thread Giuseppe Bilotta
This allows cherry-picking a set of commits, some of which may be redundant, without stopping to ask for the user intervention. Signed-off-by: Giuseppe Bilotta --- Documentation/git-cherry-pick.txt | 4 builtin/revert.c | 1 + sequencer.c

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Giuseppe Bilotta
On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano wrote: > Giuseppe Bilotta writes: > >> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote: >>> >>> Should we plan to extend this to the interactive backend that is >>> shared

Re: [RFC PATCH] Option to allow cherry-pick to skip empty commits

2017-01-23 Thread Giuseppe Bilotta
On Mon, Jan 23, 2017 at 9:10 PM, Junio C Hamano wrote: > Giuseppe Bilotta writes: > >> ... I still don't see how to force a complete reread of the index >> after running a git reset (which I need for the --skip command), ... > > Do you mean

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-23 Thread Brandon Williams
On 01/23, Junio C Hamano wrote: > Brandon Williams writes: > > > The last big hurdle towards a thread-safe API for the attribute system > > is the reliance on a global attribute stack that is modified during each > > call into the attribute system. > > The same comment as

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-23 Thread Junio C Hamano
Brandon Williams writes: > The last big hurdle towards a thread-safe API for the attribute system > is the reliance on a global attribute stack that is modified during each > call into the attribute system. The same comment as 22/27 applies here. It is not an immediate

Re: [PATCH v2 22/27] attr: eliminate global check_all_attr array

2017-01-23 Thread Junio C Hamano
Brandon Williams writes: > Currently there is a reliance on 'check_all_attr' which is a global > array of 'attr_check_item' items which is used to store the value of > each attribute during the collection process. > > This patch eliminates this global and instead creates an

[PATCH v2 27/27] attr: reformat git_attr_set_direction() function

2017-01-23 Thread Brandon Williams
Move the 'git_attr_set_direction()' up to be closer to the variables that it modifies as well as a small formatting by renaming the variable 'new' to 'new_direction' so that it is more descriptive. Update the comment about how 'direction' is used to read the state of the world. It should be

[PATCH v2 26/27] attr: push the bare repo check into read_attr()

2017-01-23 Thread Brandon Williams
Push the bare repository check into the 'read_attr()' function. This avoids needing to have extra logic which creates an empty stack frame when inside a bare repo as a similar bit of logic already exists in the 'read_attr()' function. Signed-off-by: Brandon Williams ---

[PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-23 Thread Brandon Williams
The last big hurdle towards a thread-safe API for the attribute system is the reliance on a global attribute stack that is modified during each call into the attribute system. This patch removes this global stack and instead a stack is stored locally in each attr_check instance. This opens up

[PATCH v2 19/27] attr: pass struct attr_check to collect_some_attrs

2017-01-23 Thread Brandon Williams
The old callchain used to take an array of attr_check_item items. Instead pass the 'attr_check' container object to 'collect_some_attrs()' and access the fields in the data structure directly. Signed-off-by: Brandon Williams --- attr.c | 33 +

[PATCH v2 18/27] attr: retire git_check_attrs() API

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Since nobody uses the old API, make it file-scope static, and update the documentation to describe the new API. Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams

[PATCH v2 06/27] attr.c: mark where #if DEBUG ends more clearly

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr.c b/attr.c index

[PATCH v2 17/27] attr: convert git_check_attrs() callers to use the new API

2017-01-23 Thread Brandon Williams
From: Junio C Hamano The remaining callers are all simple "I have N attributes I am interested in. I'll ask about them with various paths one by one". After this step, no caller to git_check_attrs() remains. After removing it, we can extend "struct attr_check" struct with

[PATCH v2 15/27] attr: (re)introduce git_check_attr() and struct attr_check

2017-01-23 Thread Brandon Williams
From: Junio C Hamano A common pattern to check N attributes for many paths is to (1) prepare an array A of N attr_check_item items; (2) call git_attr() to intern the N attribute names and fill A; (3) repeatedly call git_check_attrs() for path with N and A; A look-up for

[PATCH v2 08/27] attr.c: tighten constness around "git_attr" structure

2017-01-23 Thread Brandon Williams
From: Junio C Hamano It holds an interned string, and git_attr_name() is a way to peek into it. Make sure the involved pointer types are pointer-to-const. Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by:

[PATCH v2 21/27] attr: use hashmap for attribute dictionary

2017-01-23 Thread Brandon Williams
The current implementation of the attribute dictionary uses a custom hashtable. This modernizes the dictionary by converting it to the builtin 'hashmap' structure. Also, in order to enable a threaded API in the future add an accompanying mutex which must be acquired prior to accessing the

[PATCH v2 23/27] attr: remove maybe-real, maybe-macro from git_attr

2017-01-23 Thread Brandon Williams
Whether or not a git attribute is real or a macro isn't a property of the attribute but rather it depends on the attribute stack (which .gitattribute files were read). This patch removes the 'maybe_real' and 'maybe_macro' fields in a git_attr and instead adds the 'macro' field to a

[PATCH v2 16/27] attr: convert git_all_attrs() to use "struct attr_check"

2017-01-23 Thread Brandon Williams
From: Junio C Hamano This updates the other two ways the attribute check is done via an array of "struct attr_check_item" elements. These two niches appear only in "git check-attr". * The caller does not know offhand what attributes it wants to ask about and cannot use

[PATCH v2 22/27] attr: eliminate global check_all_attr array

2017-01-23 Thread Brandon Williams
Currently there is a reliance on 'check_all_attr' which is a global array of 'attr_check_item' items which is used to store the value of each attribute during the collection process. This patch eliminates this global and instead creates an array per 'attr_check' instance which is then used in the

[PATCH v2 24/27] attr: tighten const correctness with git_attr and match_attr

2017-01-23 Thread Brandon Williams
Signed-off-by: Brandon Williams --- attr.c | 14 +++--- attr.h | 2 +- builtin/check-attr.c | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/attr.c b/attr.c index ed9ba3756..95456503e 100644 --- a/attr.c +++

[PATCH v2 20/27] attr: change validity check for attribute names to use positive logic

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Convert 'invalid_attr_name()' to 'attr_name_valid()' and use positive logic for the return value. In addition create a helper function that prints out an error message when an invalid attribute name is used. We could later update the message to exactly

[PATCH v2 14/27] attr: rename function and struct related to checking attributes

2017-01-23 Thread Brandon Williams
From: Junio C Hamano The traditional API to check attributes is to prepare an N-element array of "struct git_attr_check" and pass N and the array to the function "git_check_attr()" as arguments. In preparation to revamp the API to pass a single structure, in which these N

[PATCH v2 11/27] attr.c: add push_stack() helper

2017-01-23 Thread Brandon Williams
From: Junio C Hamano There are too many repetitious "I have this new attr_stack element; push it at the top of the stack" sequence. The new helper function push_stack() gives us a way to express what is going on at these places, and as a side effect, halves the number of

[PATCH v2 02/27] attr.c: use strchrnul() to scan for one line

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attr.c b/attr.c

[PATCH v2 00/27] Revamp the attribute system; another round

2017-01-23 Thread Brandon Williams
Changes in v2: * surround the mutex initializer calls by #ifdef * mark file-local symbol static * handling of attribute stacks. Instead of storing each stack frame in a hashmap, there is a stack per attr_check instance. This will allow for easier optimizing of the stack in future patches as

[PATCH v2 10/27] attr: support quoting pathname patterns in C style

2017-01-23 Thread Brandon Williams
From: Nguyễn Thái Ngọc Duy Full pattern must be quoted. So 'pat"t"ern attr' will give exactly 'pat"t"ern', not 'pattern'. Also clarify that leading whitespaces are not part of the pattern and document comment syntax. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v2 12/27] Documentation: fix a typo

2017-01-23 Thread Brandon Williams
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- Documentation/gitattributes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gitattributes.txt

[PATCH v2 13/27] attr.c: outline the future plans by heavily commenting

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- attr.c | 40 +++- 1 file changed, 39 insertions(+), 1

[PATCH v2 09/27] attr.c: plug small leak in parse_attr_line()

2017-01-23 Thread Brandon Williams
From: Junio C Hamano If any error is noticed after the match_attr structure is allocated, we shouldn't just return NULL from this function. Add a fail_return label that frees the allocated structure and returns NULL, and consistently jump there when we want to return NULL

[PATCH v2 04/27] attr.c: explain the lack of attr-name syntax check in parse_attr()

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- attr.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/attr.c b/attr.c index

[PATCH v2 05/27] attr.c: complete a sentence in a comment

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr.c b/attr.c index

[PATCH v2 01/27] commit.c: use strchrnul() to scan for one line

2017-01-23 Thread Brandon Williams
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Brandon Williams --- commit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commit.c b/commit.c

[PATCH v2 07/27] attr.c: simplify macroexpand_one()

2017-01-23 Thread Brandon Williams
From: Junio C Hamano The double-loop wants to do an early return immediately when one matching macro is found. Eliminate the extra variable 'a' used for that purpose and rewrite the "assign the found item to 'a' to make it non-NULL and force the loop(s) to terminate" with a

[PATCH v2 03/27] attr.c: update a stale comment on "struct match_attr"

2017-01-23 Thread Brandon Williams
From: Junio C Hamano When 82dce998 (attr: more matching optimizations from .gitignore, 2012-10-15) changed a pointer to a string "*pattern" into an embedded "struct pattern" in struct match_attr, it forgot to update the comment that describes the structure. Signed-off-by:

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Junio C Hamano
Giuseppe Bilotta writes: > On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote: >> >> Should we plan to extend this to the interactive backend that is >> shared between rebase -i and rebase -m, too? Or is this patch >> already sufficient to

Re: [RFC PATCH] Option to allow cherry-pick to skip empty commits

2017-01-23 Thread Junio C Hamano
Giuseppe Bilotta writes: > ... I still don't see how to force a complete reread of the index > after running a git reset (which I need for the --skip command), ... Do you mean discard_index() or discard_cache() followed by read_index() or read_cache(), or do you mean

Re: [RFC PATCH] Option to allow cherry-pick to skip empty commits

2017-01-23 Thread Giuseppe Bilotta
On Mon, Jan 23, 2017 at 7:15 PM, Junio C Hamano wrote: > Giuseppe Bilotta writes: > >> By the way, I noticed going over the code that the -allow options are >> not stored, so that in case of interruption they will be reset, is >> this intentional or

Re: [PATCH v3 0/5] show-ref: Allow -d, --head to work with --verify

2017-01-23 Thread Junio C Hamano
Vladimir Panteleev writes: > Third iteration, according to Junio's comments. This time we keep > show_ref and show_one separate, accept HEAD with --verify even without > --head, and add tests for dangling ref validation with --verify. I am no longer a neutral judge but

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Giuseppe Bilotta
On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano wrote: > > Should we plan to extend this to the interactive backend that is > shared between rebase -i and rebase -m, too? Or is this patch > already sufficient to cover them? AFAIK this is sufficient for both, in the sense that

Re: [PATCH v3 08/21] Documentation/git-update-index: talk about core.splitIndex config var

2017-01-23 Thread Junio C Hamano
Christian Couder writes: >>> Perhaps we should declare that config will be the one and only way >>> in the future and start deprecating the command line option way. >>> That will remove the need for two to interact with each other. > > That would be my preferred

Re: [PATCH v1 0/2] urlmatch: allow regexp-based matches

2017-01-23 Thread Junio C Hamano
Patrick Steinhardt writes: > This patch is mostly a request for comments. The use case is to > be able to configure an HTTP proxy for all subdomains of a > certain domain where there are hundreds of subdomains. The most > flexible way I could imagine was by using

Re: [RFC] Case insensitive Git attributes

2017-01-23 Thread Junio C Hamano
Junio C Hamano writes: > So you are worried about the case where somebody on a case > insensitive but case preserving system would do > > $ edit file.txt > $ edit .gitattributes > $ git add file.txt .gitattributes > > and adds "*.TXT someattr=true" to the

Re: [RFC] Case insensitive Git attributes

2017-01-23 Thread Junio C Hamano
Lars Schneider writes: > Problem: > Git attributes for path names are generally case sensitive. However, on > a case insensitive file system (e.g. macOS/Windows) they appear to be > case insensitive (`*.bar` would match `foo.bar` and `foo.BAR`). That > works great

Re: [DEMO][PATCH v2 6/5] compat: add a qsort_s() implementation based on GNU's qsort_r(1)

2017-01-23 Thread Junio C Hamano
René Scharfe writes: > Implement qsort_s() as a wrapper to the GNU version of qsort_r(1) and > use it on Linux. Performance increases slightly: > > Test HEAD^ HEAD > > 0071.2:

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-23 Thread Junio C Hamano
"brian m. carlson" writes: > There are two major processors of AsciiDoc: AsciiDoc itself, and Asciidoctor. > Both have advantages and disadvantages, but traditionally the documentation > has > been built with AsciiDoc, leading to some surprising breakage when

Re: [PATCH v3 14/21] read-cache: touch shared index files when used

2017-01-23 Thread Junio C Hamano
Christian Couder writes: > Also in general the split-index mode is useful when you often write > new indexes, and in this case shared index files that are used will > often be freshened, so the risk of deleting interesting shared index > files should be low. > ... >>

Re: [PATCH 3/3] stash: support filename argument

2017-01-23 Thread Junio C Hamano
Thomas Gummerer writes: > diff --git a/git-stash.sh b/git-stash.sh > index d6b4ae3290..7dcce629bd 100755 > --- a/git-stash.sh > +++ b/git-stash.sh > @@ -41,7 +41,7 @@ no_changes () { > untracked_files () { > excl_opt=--exclude-standard > test "$untracked" =

Re: [RFC] Case insensitive Git attributes

2017-01-23 Thread Lars Schneider
> On 23 Jan 2017, at 19:35, Junio C Hamano wrote: > > Dakota Hawkins writes: > >> Apologies for the delayed bump. I think because we're talking about >> affecting the behavior of .gitattributes that it would be better to >> have a distinct

Re: [PATCH v2] travis-ci: fix Perforce install on macOS

2017-01-23 Thread Junio C Hamano
Lars Schneider writes: > The `perforce` and `perforce-server` package were moved from brew [1][2] > to cask [3]. Teach TravisCI the new location. > > Perforce updates their binaries without version bumps. That made the > brew install (legitimately!) fail due to checksum

Re: [PATCH] blame: add option to print tips (--tips)

2017-01-23 Thread Junio C Hamano
Pranit Bauva writes: > We can probably make it useful with some extended efforts. I use > git-blame and I sometimes find that I don't need things like the name > of the author, time, timezone and not even the file name and I have to > use a bigger terminal. If we could

Re: [PATCH v1] travis-ci: fix Perforce install on macOS

2017-01-23 Thread Lars Schneider
> On 23 Jan 2017, at 19:22, Junio C Hamano wrote: > > larsxschnei...@gmail.com writes: > >> Could you fast track the patch to `maint` if it works without trouble on >> `next` (as it should!)? >> >> Notes: >>Base Commit: 787f75f056 (master) > > I do not think there is

Re: [RFC] Case insensitive Git attributes

2017-01-23 Thread Junio C Hamano
Dakota Hawkins writes: > Apologies for the delayed bump. I think because we're talking about > affecting the behavior of .gitattributes that it would be better to > have a distinct .gitattributes option, whether or not you also have a > similar config option. As I know

Re: [PATCH 2/3] stash: introduce push verb

2017-01-23 Thread Junio C Hamano
Thomas Gummerer writes: > + stash_msg="$*" > + > + if test -z stash_msg A dollar-sign is missing here, I think. > + then > + push_stash $push_options > + else > + push_stash $push_options -m "$stash_msg" > + fi > +}

Re: [PATCH v1] travis-ci: fix Perforce install on macOS

2017-01-23 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > Could you fast track the patch to `maint` if it works without trouble on > `next` (as it should!)? > > Notes: > Base Commit: 787f75f056 (master) I do not think there is any difference between 'maint' and 'master' for this file right now, but I still would

Re: [RFC PATCH] Option to allow cherry-pick to skip empty commits

2017-01-23 Thread Junio C Hamano
Giuseppe Bilotta writes: > By the way, I noticed going over the code that the -allow options are > not stored, so that in case of interruption they will be reset, is > this intentional or a bug? I do not know offhand, but given the history of the two commands, I

Re: [PATCH v3 14/21] read-cache: touch shared index files when used

2017-01-23 Thread Christian Couder
On Thu, Jan 19, 2017 at 8:00 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Mon, Jan 9, 2017 at 9:34 PM, Junio C Hamano wrote: >>> Duy Nguyen writes: >>> On Sun, Jan 8, 2017 at 4:46 AM, Junio C Hamano

Re: [PATCH] rebase: pass --signoff option to git am

2017-01-23 Thread Junio C Hamano
Giuseppe Bilotta writes: > Signed-off-by: Giuseppe Bilotta > --- > Documentation/git-rebase.txt | 5 + > git-rebase.sh| 3 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) Should we plan to extend this to the

Re: [PATCH 25/27] attr: store attribute stacks in hashmap

2017-01-23 Thread Brandon Williams
On 01/18, Brandon Williams wrote: > On 01/13, Junio C Hamano wrote: > > Brandon Williams writes: > > > > > The last big hurdle towards a thread-safe API for the attribute system > > > is the reliance on a global attribute stack that is modified during each > > > call into the

[PATCH v3 5/5] show-ref: Remove dead `if (verify)' check

2017-01-23 Thread Vladimir Panteleev
As show_ref is only ever called on the path where --verify is not specified, `verify' can never possibly be true here. Signed-off-by: Vladimir Panteleev --- builtin/show-ref.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/builtin/show-ref.c b/builtin/show-ref.c

[PATCH v3 2/5] show-ref: Allow -d to work with --verify

2017-01-23 Thread Vladimir Panteleev
Move handling of -d into show_one, so that it takes effect when --verify is present as well as when it is absent. This is useful when the user wishes to avoid the costly iteration of refs. Signed-off-by: Vladimir Panteleev --- builtin/show-ref.c | 23

[PATCH v3 3/5] show-ref: Move --quiet handling into show_one

2017-01-23 Thread Vladimir Panteleev
Do the same with --quiet as was done with -d, to remove the need to perform this check at show_one's call site from the --verify branch. Signed-off-by: Vladimir Panteleev --- builtin/show-ref.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH v3 1/5] show-ref: Accept HEAD with --verify

2017-01-23 Thread Vladimir Panteleev
Previously, when --verify was specified, show-ref would use a separate code path which did not handle HEAD and treated it as an invalid ref. Thus, "git show-ref --verify HEAD" (where "--verify" is used because the user is not interested in seeing refs/remotes/origin/HEAD) did not work as expected.

[PATCH v3 4/5] show-ref: Detect dangling refs under --verify as well

2017-01-23 Thread Vladimir Panteleev
Move detection of dangling refs into show_one, so that they are detected when --verify is present as well as when it is absent. Signed-off-by: Vladimir Panteleev --- builtin/show-ref.c | 16 t/t1403-show-ref.sh | 22 ++ 2 files

[PATCH v3 0/5] show-ref: Allow -d, --head to work with --verify

2017-01-23 Thread Vladimir Panteleev
Third iteration, according to Junio's comments. This time we keep show_ref and show_one separate, accept HEAD with --verify even without --head, and add tests for dangling ref validation with --verify.

Re: [PATCH] blame: add option to print tips (--tips)

2017-01-23 Thread Pranit Bauva
Hey Junio, On Mon, Jan 23, 2017 at 5:05 AM, Junio C Hamano wrote: > That is too early to tell. At this point we only know there are me > who won't use it and you who will, among all the other people in the > world. We can probably make it useful with some extended efforts. I

Re: [PATCH v3 08/21] Documentation/git-update-index: talk about core.splitIndex config var

2017-01-23 Thread Christian Couder
On Mon, Jan 9, 2017 at 12:18 PM, Duy Nguyen wrote: > On Sun, Jan 8, 2017 at 4:38 AM, Junio C Hamano wrote: >> Christian Couder writes: >> >>> It feels strange that when I do things one way, you suggest another >>> way, and the

Re: sparse checkout : ignore paths

2017-01-23 Thread Johannes Schindelin
Hi, On Mon, 23 Jan 2017, Tushar Kapila wrote: > When we clone/ pull with : config core.sparsecheckout true > > We can specify paths to include. Would be good to explicitly specify > paths to exclude too. That is already possible by using "negative patterns", i.e. patterns preceded by an

GSoC 2017: application open, deadline = February 9, 2017

2017-01-23 Thread Matthieu Moy
Hi, The Google Summer of Code 2017 program is launched (https://summerofcode.withgoogle.com/). Last year, Pranit Bauva worked on porting "git bisect" from shell to C, mentored by Christian and Lars (I didn't follow closely, but essentially many preparatory steps, cleanups and tests were merged

  1   2   >