Re: [PATCH v4 4/4] mergetool: honor -O

2016-10-10 Thread David Aguilar
On Mon, Oct 10, 2016 at 11:28:35AM -0700, Junio C Hamano wrote: > David Aguilar writes: > > > Teach mergetool to pass "-O" down to `git diff` when > > specified on the command-line. > > > > Helped-by: Johannes Sixt > > Signed-off-by: David Aguilar

Re: [PATCH v2] pretty: fix document link for color specification

2016-10-10 Thread Jeff King
On Tue, Oct 11, 2016 at 05:41:14AM +0200, René Scharfe wrote: > Helped-by: Jeff King > Signed-off-by: Rene Scharfe > --- > Removed confusing and unnecessary reference to the "colors" paragraph. This looks good to me. -Peff

[PATCH v2] pretty: fix document link for color specification

2016-10-10 Thread René Scharfe
Helped-by: Jeff King Signed-off-by: Rene Scharfe --- Removed confusing and unnecessary reference to the "colors" paragraph. Documentation/pretty-formats.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/pretty-formats.txt

Re: Invisible file remove during merge

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 06:04:26PM -0700, Octavio Alvarez wrote: > If I do a "git rm file" during conflict resolution, the removed file > (mysterious-file.txt) does not show up on "git log --stat" nor "git show > --patch" for the merge commit. "git log" does not do merge diffs by default; you

Invisible file remove during merge

2016-10-10 Thread Octavio Alvarez
Hi. If I do a "git rm file" during conflict resolution, the removed file (mysterious-file.txt) does not show up on "git log --stat" nor "git show --patch" for the merge commit. "git log --all --stat --follow -- mysterious-file.txt" only shows the commit where the file was added. I also tried

[PATCH 11/28] attr: (re)introduce git_check_attr() and struct git_attr_check

2016-10-10 Thread Stefan Beller
From: Junio C Hamano A common pattern to check N attributes for many paths is to (1) prepare an array A of N git_attr_check_elem 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

[PATCH 12/28] attr: convert git_all_attrs() to use "struct git_attr_check"

2016-10-10 Thread Stefan Beller
From: Junio C Hamano This updates the other two ways the attribute check is done via an array of "struct git_attr_check_elem" 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

[PATCH 17/28] attr: expose validity check for attribute names

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Export attr_name_valid() function, and a helper function that returns the message to be given when a given pair is not a good name for an attribute. We could later update the message to exactly spell out what the rules for a good attribute

[PATCH 10/28] attr: rename function and struct related to checking attributes

2016-10-10 Thread Stefan Beller
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 21/28] attr.c: rename a local variable check

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Throughout this series, we are trying to use "check" to name an instance of "git_attr_check" structure; let's rename a "check" that refers to an array whose elements are git_attr_check_elem to avoid confusion. Signed-off-by: Junio C Hamano

[PATCH 20/28] attr.c: pass struct git_attr_check down the callchain

2016-10-10 Thread Stefan Beller
From: Junio C Hamano The callchain that starts from git_check_attrs() down to collect_some_attrs() used to take an array of git_attr_check_elem as their parameters. Pass the enclosing git_attr_check instance instead, so that they will have access to new fields we will add to

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

2016-10-10 Thread Stefan Beller
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 --- attr.c | 2 +-

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

2016-10-10 Thread Stefan Beller
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 28/28] attr: convert to new threadsafe API

2016-10-10 Thread Stefan Beller
This revamps the API of the attr subsystem to be thread safe. Before we had the question and its results in one struct type. The typical usage of the API was static struct git_attr_check; if (!check) check = git_attr_check_initl("text", NULL); git_check_attr(path, check);

[PATCH 19/28] attr.c: add push_stack() helper

2016-10-10 Thread Stefan Beller
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 16/28] attr: add counted string version of git_attr()

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Often a potential caller has pair that represents the name it wants to create an attribute out of. When name[namelen] is not NUL, the caller has to xmemdupz() only to call git_attr(). Add git_attr_counted() that takes such a counted

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

2016-10-10 Thread Stefan Beller
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:

[PATCH 23/28] attr.c: introduce empty_attr_check_elems()

2016-10-10 Thread Stefan Beller
From: Junio C Hamano One codepath needs to just empty the git_attr_check_elem array in the git_attr_check structure, without releasing the entire resource. Introduce a helper to do so and rewrite git_attr_check_clear() using it. Signed-off-by: Junio C Hamano

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

2016-10-10 Thread Stefan Beller
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 18/28] attr: support quoting pathname patterns in C style

2016-10-10 Thread Stefan Beller
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 06/28] attr.c: mark where #if DEBUG ends more clearly

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr.c b/attr.c index a7f2c3f..95416d3 100644 --- a/attr.c +++ b/attr.c @@

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

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr.c b/attr.c index 05db667..a7f2c3f 100644 --- a/attr.c +++ b/attr.c @@

[PATCH 14/28] attr: retire git_check_attrs() API

2016-10-10 Thread Stefan Beller
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 ---

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

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- attr.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/attr.c b/attr.c index 4ae7801..05db667 100644 --- a/attr.c +++ b/attr.c @@ -183,6

[PATCH 22/28] attr.c: correct ugly hack for git_all_attrs()

2016-10-10 Thread Stefan Beller
From: Junio C Hamano The collect_some_attrs() function has an ugly hack since 06a604e6 (attr: avoid heavy work when we know the specified attr is not defined, 2014-12-28) added an optimization that relies on the fact that the caller knows what attributes it is interested in,

[PATCH 15/28] attr: add counted string version of git_check_attr()

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Often a potential caller has pair that represents the path it wants to ask attributes for; when path[pathlen] is not NUL, the caller has to xmemdupz() only to call git_check_attr(). Add git_check_attr_counted() that takes such a counted

[PATCH 25/28] attr.c: outline the future plans by heavily commenting

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- attr.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/attr.c b/attr.c index

[PATCH 27/28] attr: make git_check_attr_counted static

2016-10-10 Thread Stefan Beller
It's not used outside the attr code, so let's keep it private. Signed-off-by: Stefan Beller --- attr.c | 4 ++-- attr.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/attr.c b/attr.c index ea6d5c1..fea0f10 100644 --- a/attr.c +++ b/attr.c @@ -892,8

[PATCH 13/28] attr: convert git_check_attrs() callers to use the new API

2016-10-10 Thread Stefan Beller
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 git_attr_check" struct

[PATCH 26/28] attr: make git_attr_counted static

2016-10-10 Thread Stefan Beller
It's not used outside the attr code, so let's keep it private. Change-Id: I0d15e0f2ea944b31d68b9cf1a4edecac0ca2170d Signed-off-by: Stefan Beller --- attr.c | 2 +- attr.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/attr.c b/attr.c index

[PATCH 24/28] attr.c: always pass check[] to collect_some_attrs()

2016-10-10 Thread Stefan Beller
From: Junio C Hamano This function used to be called with check=NULL to signal it to collect all attributes in the global check_all_attr[] array. Because the longer term plan is to allocate check_all_attr[] and attr_stack data structures per git_attr_check instance (i.e.

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

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- commit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commit.c b/commit.c index 856fd4a..41b2fdd 100644 --- a/commit.c +++

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

2016-10-10 Thread Stefan Beller
From: Junio C Hamano Signed-off-by: Junio C Hamano Signed-off-by: Stefan Beller --- attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attr.c b/attr.c index eec5d7d..45aec1b 100644 --- a/attr.c +++ b/attr.c

[PATCH 00/28] Revamping the attr subsystem!

2016-10-10 Thread Stefan Beller
This is a series that * replaces jc/attr-more. I did merge one fixup! commit at the appropriate place, as well as resolving a minor merge conflict when rebasing to the latest master * revamps the API of the attr subsystem, such that it can be made thread safe in a later step easily, because

Re: Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 06:35:01PM -0500, Larry Finger wrote: > > Ah, it is Mail::Address. It gets this case right, but if I uninstall it, > > then the cc becomes: > > > > Cc: Stable > > > > that you saw, which is broken. Older versions of git, even without > >

Re: Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Larry Finger
On 10/10/2016 04:57 PM, Jeff King wrote: [+cc authors of b1c8a11, which regressed this case; I'll quote liberally to give context] On Mon, Oct 10, 2016 at 05:48:56PM -0400, Jeff King wrote: I can't reproduce the problem with this simple setup: git init echo content >file

Re: [PATCH 1/3] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-10-10 Thread Junio C Hamano
Duy Nguyen writes: > Off topic. This reminds me of an old patch about apply and ita [1] but > that one is not the same here ... Yeah, and re-reading that one, I think that sort-of makes sense. I am hesitant to take it out of context, though. I wonder how it would interact

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-10 Thread Junio C Hamano
Heiko Voigt writes: > -static int submodule_needs_pushing(const char *path, const unsigned char > sha1[20]) > +static int check_has_hash(const unsigned char sha1[20], void *data) > { > - if (add_submodule_odb(path) || !lookup_commit_reference(sha1)) > + int *has_hash

Re: [PATCH v2 2/3] serialize collection of refs that contain submodule changes

2016-10-10 Thread Junio C Hamano
Heiko Voigt writes: > +static int append_hash_to_argv(const unsigned char sha1[20], void *data) > +{ > + struct argv_array *argv = (struct argv_array *) data; > + argv_array_push(argv, sha1_to_hex(sha1)); > + return 0; > +} Do we have struct object_id readily

Re: [PATCH v2 1/3] serialize collection of changed submodules

2016-10-10 Thread Junio C Hamano
Stefan Beller writes: >> +static struct sha1_array *get_sha1s_from_list(struct string_list >> *submodules, >> + const char *path) > > So this will take the stringlist `submodules` and insert the path into it, > if it wasn't already in there. In case it is newly

Re: [PATCH v3 05/25] sequencer: eventually release memory allocated for the option values

2016-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > diff --git a/builtin/revert.c b/builtin/revert.c > index 7365559..fce9c75 100644 > --- a/builtin/revert.c > +++ b/builtin/revert.c > @@ -174,6 +174,12 @@ static void parse_args(int argc, const char **argv, > struct replay_opts *opts) >

Re: [PATCH v3 03/25] sequencer: avoid unnecessary indirection

2016-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > We really do not need the *pointer to a* pointer to the options in > the read_populate_opts() function. > > Signed-off-by: Johannes Schindelin > --- > sequencer.c | 6 +++--- > 1 file changed, 3

Re: [PATCH v3 01/25] sequencer: use static initializers for replay_opts

2016-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > This change is not completely faithful: instead of initializing all fields > to 0, we choose to initialize command and subcommand to -1 (instead of > defaulting to REPLAY_REVERT and REPLAY_NONE, respectively). Practically, > it makes no

Re: [PATCH v3 07/25] sequencer: completely revamp the "todo" script parsing

2016-10-10 Thread Junio C Hamano
Johannes Schindelin writes: > Let's just bite the bullet and rewrite the entire parser; the code now > ... > In particular, we choose to maintain the list of commands in an array > instead of a linked list: this is flexible enough to allow us later on to > even

Re: Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Jeff King
[+cc authors of b1c8a11, which regressed this case; I'll quote liberally to give context] On Mon, Oct 10, 2016 at 05:48:56PM -0400, Jeff King wrote: > I can't reproduce the problem with this simple setup: > > git init > echo content >file && git add file > git commit -F-

Re: Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 04:00:56PM -0500, Larry Finger wrote: > I have recently switched to openSUSE Leap 42.2 and found that some of the > features of send_mail no longer work. The problem occurs when trying to add > information to a Cc to Stable. > > The initial pass through the patch produces

Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Larry Finger
I have recently switched to openSUSE Leap 42.2 and found that some of the features of send_mail no longer work. The problem occurs when trying to add information to a Cc to Stable. The initial pass through the patch produces the output (body) Adding cc: Stable [4.8+]

Re: %C(auto) not working as expected

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:52:47PM +0200, René Scharfe wrote: > > I like the intent here, though I found "Values, color" hard to parse (it > > was not immediately clear that you mean "the color paragraph of the > > Values section", as commas are already being used in that sentence for > > the

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 02:59:35PM -0400, Jeff King wrote: > > I must be reading the patch incorrectly, but I cannot quite tell > > where I want astray... > > No, we don't come here from %C() at all. This is for bare "%Cred", which > cannot have "always" (or "auto"), as there is no syntactic

Re: %C(auto) not working as expected

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 01:46 schrieb Jeff King: >> diff --git a/Documentation/pretty-formats.txt >> b/Documentation/pretty-formats.txt >> index a942d57..89e3bc6 100644 >> --- a/Documentation/pretty-formats.txt >> +++ b/Documentation/pretty-formats.txt >> @@ -166,7 +166,8 @@ endif::git-rev-list[] >> -

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:46:21PM +0200, René Scharfe wrote: > Good question. ALLOC_GROW() doesn't double exactly, but indeed the > number of reallocations depends on the size of the added pieces. I > always thought of strbuf_addf() as an expensive function for > convenience, but never timed

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Ian Kelling
On Mon, Oct 10, 2016, at 12:08 PM, Stefan Beller wrote: > Well it is found in 2.9 and later. Currently the base footer is > opt-in, e.g. you'd > need to convince people to run `git config format.useAutoBase true` or to > manually add the base to the patch via `format-patch --base=`. Nice. Another

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:20:50PM +0200, Dennis Kaarsemaker wrote: > On Sun, 2016-10-09 at 15:34 +0300, Mantas Mikulėnas wrote: > > This is based on the existing gnome-keyring helper, but instead of > > libgnome-keyring (which was specific to GNOME and is deprecated), it > > uses libsecret which

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 02:00 schrieb Jeff King: > On Sat, Oct 08, 2016 at 05:38:47PM +0200, René Scharfe wrote: > >> Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs >> instead of taking detours through find_unique_abbrev() and its static >> buffer. This is shorter in most cases

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Dennis Kaarsemaker
On Sun, 2016-10-09 at 15:34 +0300, Mantas Mikulėnas wrote: > This is based on the existing gnome-keyring helper, but instead of > libgnome-keyring (which was specific to GNOME and is deprecated), it > uses libsecret which can support other implementations of XDG Secret > Service API. > > Passes

Re: [PATCH v1 0/2] convert: stream and early out

2016-10-10 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > An optimization when autocrlf is used and the binary/text detection is run. > Or git ls-files --eol is run to analyze the content of files or blobs. This looks like a worthwhile thing to do. Please sign-off the patches when

Re: [PATCH v1 2/2] convert.c: stream and early out

2016-10-10 Thread Junio C Hamano
tbo...@web.de writes: > -static void gather_stats(const char *buf, unsigned long size, struct > text_stat *stats) > +static void gather_stats_partly(const char *buf, unsigned long len, > + struct text_stat *stats, unsigned earlyout) > { I think it is OK not to

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 09:59:17PM +0200, René Scharfe wrote: > > > Shouldn't we have an "else" here? > > > > I'm not sure what you mean; can you write it out? > > > - if (skip_prefix(begin, "auto,", )) { > > + > > + if (!skip_prefix(begin, "always,", )) { > >

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 19:42 schrieb Jeff King: On Mon, Oct 10, 2016 at 07:09:12PM +0200, René Scharfe wrote: diff --git a/pretty.c b/pretty.c index 25efbca..73e58b5 100644 --- a/pretty.c +++ b/pretty.c @@ -965,22 +965,31 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */

Re: [PATCH 1/2] submodule: ignore trailing slash on superproject URL

2016-10-10 Thread Dennis Kaarsemaker
[And now with CC to the list, sorry Stefan] On Mon, 2016-10-10 at 10:56 -0700, Stefan Beller wrote: > Before 63e95beb0 (2016-04-15, submodule: port resolve_relative_url from > shell to C), it did not matter if the superprojects URL had a trailing > slash or not. It was just chopped off as one of

Re: [PATCH v10 13/14] convert: add filter..process option

2016-10-10 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > +# Count unique lines in two files and compare them. > +test_cmp_count () { > + for FILE in $@ > + do > + sort $FILE | uniq -c | sed "s/^[ ]*//" >$FILE.tmp > + cat $FILE.tmp >$FILE Unquoted references to $FILE bothers me. Are

[PATCHv2] documentation: improve submodule..{url, path} description

2016-10-10 Thread Stefan Beller
Unlike the url variable a user cannot override the the path variable, as it is part of the content together with the gitlink at the given path. To avoid confusion do not mention the .path variable in the config section and rely on the documentation provided in gitmodules[5]. Enhance the

RE: How to watch a mailing list & repo for patches which affect a certain area of code? [OT]

2016-10-10 Thread Jason Pyeron
> -Original Message- > From: Stefan Beller > Sent: Monday, October 10, 2016 15:08 > > On Mon, Oct 10, 2016 at 11:56 AM, Jason Pyeron wrote: > >> -Original Message- > >> From: Stefan Beller > >> Sent: Monday, October 10, 2016 14:43 > >> > >> +cc Xiaolong Ye

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Johannes Sixt
Am 10.10.2016 um 19:41 schrieb Junio C Hamano: I also notice that the problematic test uses "chmod 755"; don't we need POSIXPERM prerequisite on this test, too, I wonder? Good point. Without POSIXPERM the test demonstrate that, since chmod 755 is basically a noop, the following add --chmod=-x

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Jeff King writes: > On Mon, Oct 10, 2016 at 11:24:01AM -0700, Junio C Hamano wrote: > >> I no longer have preference either way myself, even though I was in >> favor of no-quotes simply because I had an alias to produce that >> format and was used to it. > > I'll admit that I

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Junio C Hamano
Stefan Beller writes: >> Does it mean "never appears in .git/config, and when it appears it >> will not be used at all"? If so we shouldn't even list it here. > > I meant: > Git wont put it into .git/config on its own. If you really wanted to have > it there, you need to do

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Junio C Hamano
Jeff King writes: > ... My main motive in switching to the > "alias.$cmd.key" syntax is that it fixes the ancient mistake of putting > arbitrary content into the key (just like pager.*, as we've discussed > elsewhere). Yup, we are on the same page. It's not too grave a mistake

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Stefan Beller
On Mon, Oct 10, 2016 at 11:56 AM, Jason Pyeron wrote: >> -Original Message- >> From: Stefan Beller >> Sent: Monday, October 10, 2016 14:43 >> >> +cc Xiaolong Ye >> >> On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: >> >>

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 11:52:14AM -0700, Junio C Hamano wrote: > > + By default, colors are shown only when enabled for log output (by > > + `color.diff`, `color.ui`, or `--color`, and respecting the `auto` > > + settings of the former if we are going to a terminal). `%C(auto,...)` > > + is

RE: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Jason Pyeron
> -Original Message- > From: Stefan Beller > Sent: Monday, October 10, 2016 14:43 > > +cc Xiaolong Ye > > On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: > >> -Original Message- > >> From: Ian Kelling > >> Sent: Sunday, October 09,

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Junio C Hamano
Jeff King writes: > So here's what a patch to do that would look like. I admit that "I can't > think of a good use" does not mean there _isn't_ one, but perhaps by > posting this, it might provoke other people to think on it, too. And if > nobody can come up with, maybe it's a

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Stefan Beller
+cc Xiaolong Ye On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: >> -Original Message- >> From: Ian Kelling >> Sent: Sunday, October 09, 2016 15:03 >> >> I've got patches in various projects, and I don't have time to keep up >> with the

Re: Feature request: use relative path in worktree config files

2016-10-10 Thread Junio C Hamano
Duy Nguyen writes: >> I think there are some pros and some cons for relative path and absolute >> path. >> Maybe append a "--relative" option with `git worktree add` ? >> >> I've converted all path to relative and all work with success. >> >> What do you think to append this

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Stefan Beller
On Mon, Oct 10, 2016 at 11:09 AM, Junio C Hamano wrote: > Stefan Beller writes: >> submodule..path:: >> + The path within this project for a submodule. This variable is >> + kept in the .gitmodules file. See linkgit:git-submodule[1] and >> +

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Jeff King
On Sun, Oct 09, 2016 at 03:34:17PM +0300, Mantas Mikulėnas wrote: > This is based on the existing gnome-keyring helper, but instead of > libgnome-keyring (which was specific to GNOME and is deprecated), it > uses libsecret which can support other implementations of XDG Secret > Service API.

Re: [PATCH v4 4/4] mergetool: honor -O

2016-10-10 Thread Junio C Hamano
David Aguilar writes: > Teach mergetool to pass "-O" down to `git diff` when > specified on the command-line. > > Helped-by: Johannes Sixt > Signed-off-by: David Aguilar > --- > Since v3: > > I missed one last piped invocation of "git

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 11:24:01AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Oct 07, 2016 at 11:56:38AM +0200, Heiko Voigt wrote: > > > >> The description for referencing commits looks as if it is contradicting > >> the example, since it is itself enclosed in

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Oct 07, 2016 at 11:56:38AM +0200, Heiko Voigt wrote: > >> The description for referencing commits looks as if it is contradicting >> the example, since it is itself enclosed in double quotes. Lets use >> single quotes around the description and include

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:52:26AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Having separate exec/shell boolean options just punts the overlap from > > the command key to those keys. If you have two mutually exclusive > > options, I think the best thing is a single

Re: git filter-branch --subdirectory-filter not working as expected, history of other folders is preserved

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 05:12:25PM +0100, Seaders Oloinsigh wrote: > Due to the structure of this repo, it looks like there are some > branches that never had anything to do with the android/ subdirectory, > so they're not getting wiped out. My branch is in a better state to > how I want it, but

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Heiko Voigt writes: > If you want to reference a previous commit in the history of a stable > -branch, use the format "abbreviated sha1 (subject, date)", > +branch, use the format 'abbreviated sha1 ("subject", date)', > with the subject enclosed in a pair of double-quotes,

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Jakub Narębski
W dniu 09.10.2016 o 21:03, Ian Kelling pisze: > I've got patches in various projects, and I don't have time to keep up > with the mailing list, but I'd like to help out with maintenance of that > code, or the functions/files it touches. People don't cc me. I figure I > could filter the list, test

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Junio C Hamano
Stefan Beller writes: > submodule..path:: > + The path within this project for a submodule. This variable is > + kept in the .gitmodules file. See linkgit:git-submodule[1] and > + linkgit:gitmodules[5] for details. What does it exactly mean to be "kept"? Does it

Re: [PATCH v2] gpg-interface: use more status letters

2016-10-10 Thread Junio C Hamano
Michael J Gruber writes: > Sorry, this got "lost in vacation". Before that, I was looking for an > easy way to test expired signatures, but gpg1 and gpg2 behave somewhat > differently in that respect (2 does not allow to create already expired > signatures). > > Is

[PATCH 1/2] submodule: ignore trailing slash on superproject URL

2016-10-10 Thread Stefan Beller
Before 63e95beb0 (2016-04-15, submodule: port resolve_relative_url from shell to C), it did not matter if the superprojects URL had a trailing slash or not. It was just chopped off as one of the first steps (The "remoteurl=${remoteurl%/}" near the beginning of resolve_relative_url(), which was

[PATCH 2/2] submodule: ignore trailing slash in relative url

2016-10-10 Thread Stefan Beller
This is similar to the previous patch, though no user reported a bug and I could not find a regressive behavior. However it is a good thing to be strict on the output and for that we always omit a trailing slash. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Junio C Hamano
Jeff King writes: > Having separate exec/shell boolean options just punts the overlap from > the command key to those keys. If you have two mutually exclusive > options, I think the best thing is a single option, like: > > type = > > and then it is obvious that a second

Re: git merge deletes my changes

2016-10-10 Thread Paul Smith
On Mon, 2016-10-10 at 10:19 +, Eduard Egorov wrote: > # ~/gitbuild/git-2.10.1/git merge -s subtree --squash ceph_ansible > > Can somebody confirm this please? Doesn't "merge -s subtree" really > merges branches? I think possibly you're not fully understanding what the --squash flag does...

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Junio C Hamano
Junio C Hamano writes: > ... > I also notice that the problematic test uses "chmod 755"; don't we > need POSIXPERM prerequisite on this test, too, I wonder? > > Thanks. > > -- >8 -- > t3700: fix broken test under !SANITY > > An "add --chmod=+x" test recently added by

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 07:09:12PM +0200, René Scharfe wrote: > > diff --git a/pretty.c b/pretty.c > > index 25efbca..73e58b5 100644 > > --- a/pretty.c > > +++ b/pretty.c > > @@ -965,22 +965,31 @@ static size_t parse_color(struct strbuf *sb, /* in > > UTF-8 */ > > > > if (!end) > >

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Junio C Hamano
Jeremy Huddleston Sequoia writes: > Actually, looks like that as just a rabbit hole. The real issue > looks to be because an earlier test drops down xfoo3 as a symlink, > which causes this test to fail due to the collision. I'll get out > a patch in a bit.

[PATCH v3 21/25] sequencer: remove overzealous assumption in rebase -i mode

2016-10-10 Thread Johannes Schindelin
The sequencer was introduced to make the cherry-pick and revert functionality available as library function, with the original idea being to extend the sequencer to also implement the rebase -i functionality. The test to ensure that all of the commands in the script are identical to the overall

[PATCH v3 22/25] sequencer: mark action_name() for translation

2016-10-10 Thread Johannes Schindelin
The definition of this function goes back all the way to 043a449 (sequencer: factor code out of revert builtin, 2012-01-11), long before a serious effort was made to translate all the error messages. It is slightly out of the context of the current patch series (whose purpose it is to

[PATCH v3 25/25] sequencer: mark all error messages for translation

2016-10-10 Thread Johannes Schindelin
There was actually only one error message that was not yet marked for translation. Signed-off-by: Johannes Schindelin --- sequencer.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v3 24/25] sequencer: start error messages consistently with lower case

2016-10-10 Thread Johannes Schindelin
Quite a few error messages touched by this developer during the work to speed up rebase -i started with an upper case letter, violating our current conventions. Instead of sneaking in this fix (and forgetting quite a few error messages), let's just have one wholesale patch fixing all of the error

[PATCH v3 23/25] sequencer: quote filenames in error messages

2016-10-10 Thread Johannes Schindelin
This makes the code consistent by fixing quite a couple of error messages. Suggested by Jakub Narębski. Signed-off-by: Johannes Schindelin --- sequencer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sequencer.c

[PATCH v3 12/25] sequencer: remember the onelines when parsing the todo file

2016-10-10 Thread Johannes Schindelin
The `git-rebase-todo` file contains a list of commands. Most of those commands have the form The is displayed primarily for the user's convenience, as rebase -i really interprets only the part. However, there are *some* places in interactive rebase where the is used to display

[PATCH v3 18/25] sequencer: do not try to commit when there were merge conflicts

2016-10-10 Thread Johannes Schindelin
The return value of do_recursive_merge() may be positive (indicating merge conflicts), or 0 (indicating success). It also may be negative, indicating a fatal error that requires us to abort. Now, if the return value indicates that there are merge conflicts, we should not try to commit those

[PATCH v3 19/25] sequencer: left-trim lines read from the script

2016-10-10 Thread Johannes Schindelin
Interactive rebase's scripts may be indented; we need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-by: Johannes Schindelin --- sequencer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sequencer.c

[PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-10 Thread Johannes Schindelin
In interactive rebases, we commit a little bit differently than the sequencer did so far: we heed the "author-script", the "message" and the "amend" files in the .git/rebase-merge/ subdirectory. Likewise, we may want to edit the commit message *even* when providing a file containing the suggested

  1   2   >