[PATCH 2/2] alias: Move checking code into a seperate function

2018-10-21 Thread Tim Schumacher
We can save a few indentations (and possibly brain cells of people that don't care about that code) by moving the code that checks for a looping alias (and that prints the error message if one is found) into a seperate function. This restores a lot of readablility to the run_argv() function as wel

[PATCH 1/2] alias: Rework comment about processing aliases

2018-10-21 Thread Tim Schumacher
The old comment's message wasn't really clear and it was in a weird location for it to talk about the alias handling process as a whole. Rephrase and move it to the top of the while() loop to make the message more clear. --- git.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)

2018-10-10 Thread Tim Schumacher
On 10.10.18 07:43, Junio C Hamano wrote: * ts/alias-of-alias (2018-09-17) 3 commits (merged to 'next' on 2018-10-09 at ac19b4730b) + t0014: introduce an alias testing suite + alias: show the call history when an alias is looping + alias: add support for aliases of an alias An alias th

Re: [RFC PATCH v4 1/3] Add support for nested aliases

2018-09-21 Thread Tim Schumacher
On 17.09.18 17:37, Junio C Hamano wrote: Tim Schumacher writes: On 08.09.18 15:28, Duy Nguyen wrote: On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher wrote: + /* +* It could be an alias -- this works around the insanity * of overriding &quo

[PATCH v5 3/3] t0014: Introduce an alias testing suite

2018-09-16 Thread Tim Schumacher
solution for loops using external commands, it should be enabled. Signed-off-by: Tim Schumacher --- Changes since v4: - Actually execute a command in the first two cases - Remove the "setup code" - Use i18ngrep to match the part of a message - Comment out the last test t/t0014-ali

[PATCH v5 2/3] Show the call history when an alias is looping

2018-09-16 Thread Tim Schumacher
h looped back to the entrypoint) with "==>". Signed-off-by: Tim Schumacher --- No changes since v4. git.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/git.c b/git.c index 15727c17f..a20eb4fa1 100644 --- a/git.c +++ b/git.c @@ -675,6 +675,7

[PATCH v5 1/3] Add support for nested aliases

2018-09-16 Thread Tim Schumacher
substituted previously. While we're at it, fix a styling issue just below the added code. Signed-off-by: Tim Schumacher --- Changes since v3: - Print the command that the user entered instead of the command which caused the loop (and a nicer, more explanatory error message)

Re: [RFC PATCH v4 1/3] Add support for nested aliases

2018-09-16 Thread Tim Schumacher
On 08.09.18 15:28, Duy Nguyen wrote: On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher wrote: + /* +* It could be an alias -- this works around the insanity * of overriding "git log" with "git show" by having

Re: [RFC PATCH v4 3/3] t0014: Introduce alias testing suite

2018-09-14 Thread Tim Schumacher
On 08.09.18 01:38, Eric Sunshine wrote: On Fri, Sep 7, 2018 at 6:44 PM Tim Schumacher wrote: Introduce a testing suite that is dedicated to aliases. For now, check only if nested aliases work and if looping aliases are detected successfully. The looping aliases check for mixed execution is

[RFC PATCH v4 3/3] t0014: Introduce alias testing suite

2018-09-07 Thread Tim Schumacher
Introduce a testing suite that is dedicated to aliases. For now, check only if nested aliases work and if looping aliases are detected successfully. The looping aliases check for mixed execution is there but expected to fail because there is no check in place yet. Signed-off-by: Tim Schumacher

[RFC PATCH v4 2/3] Show the call history when an alias is looping

2018-09-07 Thread Tim Schumacher
h looped back to the entrypoint) with "==>". Signed-off-by: Tim Schumacher --- I now went with Peff's suggested code and I added in an arrow that points away from the last command (which caused the loop). A "full" arrow (i.e. starts at the last command, goes upwards

[RFC PATCH v4 1/3] Add support for nested aliases

2018-09-07 Thread Tim Schumacher
substituted previously. While we're at it, fix a styling issue just below the added code. Signed-off-by: Tim Schumacher --- Changes since v3: - Print the command that the user entered instead of the command which caused the loop (and a nicer, more explanatory error message)

Re: [PATCH v3] Allow aliases that include other aliases

2018-09-06 Thread Tim Schumacher
On 06.09.18 20:40, Junio C Hamano wrote: Jeff King writes: On Thu, Sep 06, 2018 at 12:16:58PM +0200, Tim Schumacher wrote: @@ -691,17 +692,23 @@ static int run_argv(int *argcp, const char ***argv) /* .. then try the external ones */ execv_dashed_external

Re: [PATCH v3] Allow aliases that include other aliases

2018-09-06 Thread Tim Schumacher
On 06.09.18 16:57, Jeff King wrote: On Thu, Sep 06, 2018 at 04:01:39PM +0200, Ævar Arnfjörð Bjarmason wrote: If we don't have some test for these sort of aliasing loops that fails now, we really should add that in a 1/2 and fix it in this patch in 2/2. Yes, I'd agree that this is worth adding

[PATCH v3] Allow aliases that include other aliases

2018-09-06 Thread Tim Schumacher
Aliases can only contain non-alias git commands and their arguments, not other user-defined aliases. Resolving further (nested) aliases is prevented by breaking the loop after the first alias was processed. Git then fails with a command-not-found error. Allow resolving nested aliases by not breaki

Re: [RFC PATCH v2] Allow aliases that include other aliases

2018-09-05 Thread Tim Schumacher
On 05.09.18 19:34, Jeff King wrote: On Wed, Sep 05, 2018 at 10:54:27AM +0200, Tim Schumacher wrote: Aliases can only contain non-alias git commands and their arguments, not other user-defined aliases. Resolving further (nested) aliases is prevented by breaking the loop after the first alias

Re: [RFC PATCH v2] Allow aliases that include other aliases

2018-09-05 Thread Tim Schumacher
On 05.09.18 19:12, Junio C Hamano wrote: Tim Schumacher writes: @@ -691,17 +693,34 @@ static int run_argv(int *argcp, const char ***argv) /* .. then try the external ones */ execv_dashed_external(*argv); + /* Increase the array size and add the current

Re: [RFC PATCH v2] Allow aliases that include other aliases

2018-09-05 Thread Tim Schumacher
On 05.09.18 17:48, Duy Nguyen wrote: On Wed, Sep 5, 2018 at 10:56 AM Tim Schumacher wrote: Aliases can only contain non-alias git commands and their arguments, not other user-defined aliases. Resolving further (nested) aliases is prevented by breaking the loop after the first alias was

[RFC PATCH v2] Allow aliases that include other aliases

2018-09-05 Thread Tim Schumacher
Aliases can only contain non-alias git commands and their arguments, not other user-defined aliases. Resolving further (nested) aliases is prevented by breaking the loop after the first alias was processed. Git then fails with a command-not-found error. Allow resolving nested aliases by not breaki

[RFC PATCH] Allow aliases that include other aliases

2018-09-04 Thread Tim Schumacher
Aliases can only contain non-alias git commands and arguments, but not other user-defined aliases. Resolving nested aliases is prevented by breaking the loop after the first alias was processed, git then fails with a command-not-found error. Allow resolving nested aliases by not breaking the loop

Re: [PATCH v3] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-29 Thread Tim Schumacher
On 29.08.18 18:55, Jonathan Nieder wrote: Tim Schumacher wrote: Subject: doc: Don't echo sed command for manpage-base-url.xsl Cribbing from my review of v2: a description like Documentation/Makefile: make manpage-base-url.xsl generation quieter would make it more obvious what

[PATCH v3] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-29 Thread Tim Schumacher
Previously, the sed command for generating manpage-base-url.xsl was printed to the console when being run. Make the console output for this rule similiar to all the other rules by printing a short status message instead of the whole command. Signed-off-by: Tim Schumacher --- Documentation

[PATCH v2] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-29 Thread Tim Schumacher
Previously, the sed command for generating manpage-base-url.xsl was printed to the console when being run. Make the console output for this rule similiar to all the other rules by printing a short status message instead of the whole command. Signed-off-by: Tim Schumacher --- To Junio C Hamano

[PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Tim Schumacher
mand invocation without doing anything else. Signed-off-by: Tim Schumacher --- Documentation/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index a42dcfc74..45454e9b5 100644 --- a/Documentation/Makefile +++ b/Documen