[PATCH 1/1] git-prompt: improve cherry-pick/revert detection

2019-07-01 Thread Phillip Wood via GitGitGadget
From: Phillip Wood If the user commits or resets a conflict resolution in the middle of a sequence of cherry-picks or reverts then CHERRY_PICK_HEAD/REVERT_HEAD will be removed and so in the absence of those files we need to check .git/sequencer/todo to see if there is a cherry-pick or revert in p

[PATCH 0/1] git-prompt: improve cherry-pick/revert detection

2019-07-01 Thread Phillip Wood via GitGitGadget
Fix the detection of in-progress cherry-picks and reverts when the user commits or resets a conflict resolution in the middle of a sequence of picks/reverts. Phillip Wood (1): git-prompt: improve cherry-pick/revert detection contrib/completion/git-prompt.sh | 37

[PATCH 0/1] Improve instructions around how to set git-prompt preference variables.

2019-06-05 Thread Edward D'Souza via GitGitGadget
When I first tried to use the git-prompt.sh script, I followed the instructions at the top of the file and everything worked, except for the "GIT_PS1_SHOWDIRTYSTATE" preference. Even though I had it set to true, I wasn't seeing the "()" and "(+)" in my shell prompt. After a few hours of poking arou

[PATCH v4 2/2] git-prompt: fix reading files with windows line endings

2017-12-05 Thread Robert Abel
/to/repo (BARE:master This patch fixes the issue by changing the internal field separator variable IFS to $'\r\n' before using the read builtin command. Note that ANSI-C Quoting/POSIX Quoting ($'...') is supported by bash as well as zsh, which are the current targets of git

[PATCH v4 1/2] git-prompt: make __git_eread intended use explicit

2017-12-05 Thread Robert Abel
__git_eread is used to read a single line of a given file (if it exists) into a single variable stripping the EOL. This patch removes the unused capability to split file contents into tokens by passing multiple variable names. Add a comment and explicitly use $2 instead of misleading $@ as argument

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-05 Thread Robert Abel
Dear Junio, I'm amazed at how much time and energy you spend on correcting these essentially non-issues in my git commit messages for a quadruple-liner code change. I'll resend both patches one last time addressing the grave issue of the informative mention of multi-line files. Regards, Robert

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-05 Thread Junio C Hamano
Robert Abel writes: > On 05 Dec 2017 01:27, Junio C Hamano wrote: >> I know all of the above, but I think you misunderstood the point I >> wanted to raise, so let me try again. The thing is, none of what >> you just wrote changes the fact that lack of callers that want to do >> "multi-line" is I

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-04 Thread Robert Abel
Hi Junio, On 05 Dec 2017 01:27, Junio C Hamano wrote: > I know all of the above, but I think you misunderstood the point I > wanted to raise, so let me try again. The thing is, none of what > you just wrote changes the fact that lack of callers that want to do > "multi-line" is IRRELEVANT. I dis

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-04 Thread Junio C Hamano
Robert Abel writes: > Hi Junio, > > On 04 Dec 2017 18:58, Junio C Hamano wrote: >> Robert Abel writes: >>> __git_eread is used to read a single line of a given file (if it exists) >>> into a variable without the EOL. All six current users of __git_eread >>> use it that way and don't expect multi

[PATCH v3 1/2] git-prompt: make __git_eread intended use explicit

2017-12-04 Thread Robert Abel
__git_eread is used to read a single line of a given file (if it exists) into a single variable without the EOL. All six current users of __git_eread use it that way and don't expect multi-line content. Therefore, this patch removes the unused capability to split file conents into tokens by passin

[PATCH v3 2/2] git-prompt: fix reading files with windows line endings

2017-12-04 Thread Robert Abel
If any of the files read by __git_eread have \r\n line endings, read will only strip \n, leaving \r. This results in an ugly prompt, where instead of user@pc MINGW64 /path/to/repo (BARE:master) the last parenthesis is printed over the beginning of the prompt like )ser@pc MINGW64 /path/to

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-04 Thread Robert Abel
Hi Junio, On 04 Dec 2017 18:58, Junio C Hamano wrote: > Robert Abel writes: >> __git_eread is used to read a single line of a given file (if it exists) >> into a variable without the EOL. All six current users of __git_eread >> use it that way and don't expect multi-line content. > > Changing $@

Re: [PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-04 Thread Junio C Hamano
Robert Abel writes: > __git_eread is used to read a single line of a given file (if it exists) > into a variable without the EOL. All six current users of __git_eread > use it that way and don't expect multi-line content. Changing $@ to $2 does not change whether this is about "multi-line" or no

Re: [PATCH v2 2/2] git-prompt: fix reading files with windows line endings

2017-12-04 Thread Johannes Schindelin
Hi Robert, 1/2 looks very good. On Sat, 2 Dec 2017, Robert Abel wrote: > If any of the files read by __git_eread have \r\n line endings, read > will only strip \n, leaving \r. This results in an ugly prompt, where > instead of > > user@pc MINGW64 /path/to/repo (BARE:master) > > the last pa

[PATCH v2 1/2] git-prompt: make __git_eread intended use explicit

2017-12-01 Thread Robert Abel
__git_eread is used to read a single line of a given file (if it exists) into a variable without the EOL. All six current users of __git_eread use it that way and don't expect multi-line content. Thus, add a comment and explicitly use $2 instead of shifting the args down and using $@. Signed-off-

[PATCH v2 2/2] git-prompt: fix reading files with windows line endings

2017-12-01 Thread Robert Abel
If any of the files read by __git_eread have \r\n line endings, read will only strip \n, leaving \r. This results in an ugly prompt, where instead of user@pc MINGW64 /path/to/repo (BARE:master) the last parenthesis is printed over the beginning of the prompt like )ser@pc MINGW64 /path/to

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-12-01 Thread Johannes Schindelin
Hi Robert, On Thu, 30 Nov 2017, Robert Abel wrote: > On 30 Nov 2017 16:21, Johannes Schindelin wrote: > > On Thu, 30 Nov 2017, Robert Abel wrote: > >> So reading a dummy variable along with the actual content variable > >> works for git-prompt

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-30 Thread SZEDER Gábor
On Thu, Nov 30, 2017 at 2:51 AM, Johannes Schindelin wrote: > On Thu, 30 Nov 2017, SZEDER Gábor wrote: > >> > > diff --git a/contrib/completion/git-prompt.sh >> > > b/contrib/completion/git-prompt.sh >> > > index c6cbef38c2..71a64e7959 100644 >> > > --- a/contrib/completion/git-prompt.sh >> > > +

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-30 Thread Robert Abel
Hi Johannes, On 30 Nov 2017 16:21, Johannes Schindelin wrote: > On Thu, 30 Nov 2017, Robert Abel wrote: >> So reading a dummy variable along with the actual content variable >> works for git-prompt: >> >> __git_eread () >> { >> local f="

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-30 Thread Johannes Schindelin
Hi Robert, On Thu, 30 Nov 2017, Robert Abel wrote: > So reading a dummy variable along with the actual content variable > works for git-prompt: > > __git_eread () > { > local f="$1" > local dummy > shift > test -r &quo

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread Robert Abel
|foo: 123 456.| 000d 62 61 72 3a 20|bar: | 0005 Notice the 0d at the end of foo, which didn't get trimmed. So reading a dummy variable along with the actual content variable works for git-prompt: __git_eread () { local f="$1" local dummy shift test -r "$f" && IFS=$'\r\n' read "$@" dummy < "$f" } I feel like this would be the most readable solution thus far. Regards, Robert

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread Johannes Schindelin
Hi Gábor, On Thu, 30 Nov 2017, SZEDER Gábor wrote: > > > diff --git a/contrib/completion/git-prompt.sh > > > b/contrib/completion/git-prompt.sh > > > index c6cbef38c2..71a64e7959 100644 > > > --- a/contrib/completion/git-prompt.sh > > > +++ b/contrib/completion/git-prompt.sh > > > @@ -282,7 +282

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread SZEDER Gábor
> > diff --git a/contrib/completion/git-prompt.sh > > b/contrib/completion/git-prompt.sh > > index c6cbef38c2..71a64e7959 100644 > > --- a/contrib/completion/git-prompt.sh > > +++ b/contrib/completion/git-prompt.sh > > @@ -282,7 +282,7 @@ __git_eread () > > { > > local f="$1" > > shift >

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread Johannes Schindelin
Hi Robert, On Wed, 29 Nov 2017, Robert Abel wrote: > On 29 Nov 2017 15:27, Johannes Schindelin wrote: > > > Or maybe keep with the Bash construct, but guarded behind a test that we > > area actually running in Bash? Something like > > > > test -z "$BASH" || IFS=$' \t\r\n' > > Actually, this

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread Robert Abel
Hi Johannes, On 29 Nov 2017 15:27, Johannes Schindelin wrote: >> diff --git a/contrib/completion/git-prompt.sh >> b/contrib/completion/git-prompt.sh >> index c6cbef38c2..71a64e7959 100644 >> --- a/contrib/completion/git-prompt.sh >> +++ b/contrib/completion/git-prompt.sh >> @@ -282,7 +282,7 @@ __

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread Johannes Schindelin
Hi Robert, On Tue, 28 Nov 2017, Robert Abel wrote: > If any of the files read by __git_eread have \r\n line endings, read > will only strip \n, leaving \r. This results in an ugly prompt, where > instead of > > user@pc MINGW64 /path/to/repo (BARE:master) > > the last parenthesis is printed

[PATCH] git-prompt: fix reading files with windows line endings

2017-11-28 Thread Robert Abel
If any of the files read by __git_eread have \r\n line endings, read will only strip \n, leaving \r. This results in an ugly prompt, where instead of user@pc MINGW64 /path/to/repo (BARE:master) the last parenthesis is printed over the beginning of the prompt like )ser@pc MINGW64 /path/to

git-prompt: fix reading files with windows line endings

2017-11-28 Thread Robert Abel
I noticed today that my git prompt using msys-git on Windows got a bit broken. After investigating I found that the git-prompt doesn't handle the case when __git_eread reads Windows line endings \r\n. It will only strip \n, leaving the \r. I noticed this when I created a repository with msy

Re: [PATCH 2/3] git-prompt: add a describe style for any tags

2017-03-17 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 15.03.2017 20:25: > Michael J Gruber writes: > >> git-prompt has various describe styles, among them "describe" (by >> annotated tags) and "default" (by exact match with any tag). >> >> Add a mode "tag&quo

Re: [PATCH 2/3] git-prompt: add a describe style for any tags

2017-03-15 Thread Junio C Hamano
Michael J Gruber writes: > git-prompt has various describe styles, among them "describe" (by > annotated tags) and "default" (by exact match with any tag). > > Add a mode "tag" that describes by any tag, annotated or not. > > Signed-off-by: M

[PATCH 2/3] git-prompt: add a describe style for any tags

2017-03-15 Thread Michael J Gruber
git-prompt has various describe styles, among them "describe" (by annotated tags) and "default" (by exact match with any tag). Add a mode "tag" that describes by any tag, annotated or not. Signed-off-by: Michael J Gruber --- contrib/completion/git-prompt

Re: [PATCH] git-prompt: make colors available in custom prompts

2016-05-02 Thread Andreas Schwab
Simon Oosthoek writes: > Hi Andrew > > sorry, I only noticed your request this morning... > > On 22/04/16 07:00, Andrew Schwartzmeyer wrote: >> diff --git a/contrib/completion/git-prompt.sh >> b/contrib/completion/git-prompt.sh >> index f18aedc73..ffe79168c 100644 >> --- a/contrib/completion/git

Re: [PATCH] git-prompt: make colors available in custom prompts

2016-05-01 Thread Simon Oosthoek
, you can have colors in your custom Git prompt function, no problem. Signed-off-by: Andrew Schwartzmeyer --- contrib/completion/git-prompt.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh

Re: [PATCH] There was a little inconsistancy in git prompt

2016-04-12 Thread Todd Zullinger
Hi Rudy, I think the commit subject should include a bit more detail. Ideally, the subject would start with 'bash prompt: ' to make it clear what area the commit involves. Then you would want to describe what inconsistency is being fixed (and why). Rudy YAYON wrote: --- contrib/completion

[PATCH] There was a little inconsistancy in git prompt

2016-04-12 Thread Rudy YAYON
--- contrib/completion/git-prompt.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 07b52be..18be99f 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -194,1

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-21 Thread SZEDER Gábor
Quoting Cody Taylor : SZEDER Gábor writes: Somehow I had a hard time making sense out of "when the current working directory was not a parent of the untracked file". Perhaps "when the untracked files are outside of the current working directory" would be easier to grok? That description do

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-15 Thread Cody Taylor
SZEDER Gábor writes: > Somehow I had a hard time making sense out of "when the current working > directory was not a parent of the untracked file". Perhaps "when the > untracked files are outside of the current working directory" would be > easier to grok? That description doesn't cover all case

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-15 Thread Junio C Hamano
SZEDER Gábor writes: > Hi, > > Quoting Junio C Hamano : > >> Cody A Taylor writes: >>> The __git_ps1() prompt function would not show an untracked >>> state when the current working directory was not a parent of >>> the untracked file. >> >> Good find, and nicely explained. > > Somehow I had a h

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-15 Thread SZEDER Gábor
Hi, Quoting Junio C Hamano : > Cody A Taylor writes: >> The __git_ps1() prompt function would not show an untracked >> state when the current working directory was not a parent of >> the untracked file. > > Good find, and nicely explained. Somehow I had a hard time making sense out of "when the

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-12 Thread Junio C Hamano
Cody A Taylor writes: > From c861d5cb401110ce7d86b76c1eaa8e89e80f484e Mon Sep 17 00:00:00 2001 > From: Cody A Taylor > Date: Thu, 12 Mar 2015 20:36:44 -0400 > Subject: [PATCH] git prompt: Use toplevel to find untracked files. All of the above four lines are unwanted in the e-mail b

[PATCH v2] git prompt: Use toplevel to find untracked files.

2015-03-12 Thread Cody A Taylor
>From c861d5cb401110ce7d86b76c1eaa8e89e80f484e Mon Sep 17 00:00:00 2001 From: Cody A Taylor Date: Thu, 12 Mar 2015 20:36:44 -0400 Subject: [PATCH] git prompt: Use toplevel to find untracked files. The __git_ps1() prompt function would not show an untracked state when the current work

[PATCH] git prompt: Use toplevel to find untracked files.

2015-03-12 Thread Cody A Taylor
>From 3e4e22e93bf07355b40ba0abcb3a15c4941cfee7 Mon Sep 17 00:00:00 2001 From: Cody A Taylor Date: Thu, 12 Mar 2015 20:36:44 -0400 Subject: [PATCH] git prompt: Use toplevel to find untracked files. The __git_ps1() prompt function would not show an untracked state when the current work

Re: [PATCH] git-prompt: preserve value of $? in all cases

2015-01-14 Thread SZEDER Gábor
Hi, Quoting Tony Finch : Signed-off-by: Tony Finch --- contrib/completion/git-prompt.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 3c3fc6d..3e70e74 100644 --- a/contrib/completion/git-

[PATCH] git-prompt: preserve value of $? in all cases

2015-01-14 Thread Tony Finch
Signed-off-by: Tony Finch --- contrib/completion/git-prompt.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 3c3fc6d..3e70e74 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/complet

Re: [PATCH v2] git-prompt: preserve value of $? inside shell prompt

2015-01-14 Thread Tony Finch
SZEDER Gábor wrote: > > Makes sense, but the patch doesn't cover all cases, because > __git_ps1() can exit early Thanks for looking at the patch. I feel quite silly for missing the other return points :-( Follow-up patch on the way... Tony. -- f.anthony.n.finchhttp://dotat.at/ Faeroes, Sout

Re: [PATCH v2] git-prompt: preserve value of $? inside shell prompt

2015-01-13 Thread SZEDER Gábor
Hi, Quoting Tony Finch : If you have a prompt which displays the command exit status, __git_ps1 without this change corrupts it, although it has the correct value in the parent shell: ~/src/git (master) 0 $ set | grep ^PS1 PS1='\w$(__git_ps1) $? \$ ' ~/src/git (master) 0

Re: [PATCH v2] git-prompt: preserve value of $? inside shell prompt

2014-12-22 Thread Tony Finch
Junio C Hamano wrote: > > Yes. I wouldn't have spent 20 minutes experimenting with various > hypothetical use cases if the above were there in the first place. Sorry for wasting your time, and thanks for reviewing the patch. (I am so used to having $? in my prompt it took me ages to find and ex

Re: [PATCH v2] git-prompt: preserve value of $? inside shell prompt

2014-12-22 Thread Junio C Hamano
Tony Finch writes: > If you have a prompt which displays the command exit status, > __git_ps1 without this change corrupts it, although it has > the correct value in the parent shell: > > ~/src/git (master) 0 $ set | grep ^PS1 > PS1='\w$(__git_ps1) $? \$ ' > ~/src/git (master) 0

[PATCH v2] git-prompt: preserve value of $? inside shell prompt

2014-12-22 Thread Tony Finch
If you have a prompt which displays the command exit status, __git_ps1 without this change corrupts it, although it has the correct value in the parent shell: ~/src/git (master) 0 $ set | grep ^PS1 PS1='\w$(__git_ps1) $? \$ ' ~/src/git (master) 0 $ false ~/src/git (

Re: [PATCH] git-prompt: preserve command exit status

2014-12-22 Thread Junio C Hamano
Tony Finch writes: > Signed-off-by: Tony Finch > --- > contrib/completion/git-prompt.sh | 4 > 1 file changed, 4 insertions(+) > > diff --git a/contrib/completion/git-prompt.sh > b/contrib/completion/git-prompt.sh > index c5473dc..5fe69d0 100644 > --- a/contrib/completion/git-prompt.sh >

[PATCH] git-prompt: preserve command exit status

2014-12-22 Thread Tony Finch
Signed-off-by: Tony Finch --- contrib/completion/git-prompt.sh | 4 1 file changed, 4 insertions(+) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c5473dc..5fe69d0 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@

Re: [PATCH 1/5] git-prompt: do not look for refs/stash in $GIT_DIR

2014-08-25 Thread Jeff King
On Sun, Aug 24, 2014 at 08:22:41PM +0700, Gábor Szeder wrote: > On Aug 23, 2014 12:26 PM, Jeff King wrote: > > Since dd0b72c (bash prompt: use bash builtins to check stash > > state, 2011-04-01), git-prompt checks whether we have a > > stash by looking for $GIT_DIR/

Re: [PATCH 1/5] git-prompt: do not look for refs/stash in $GIT_DIR

2014-08-24 Thread Gábor Szeder
Hi, On Aug 23, 2014 12:26 PM, Jeff King wrote: > Since dd0b72c (bash prompt: use bash builtins to check stash > state, 2011-04-01), git-prompt checks whether we have a > stash by looking for $GIT_DIR/refs/stash. Generally external > programs should never do this, because the

[PATCH 1/5] git-prompt: do not look for refs/stash in $GIT_DIR

2014-08-22 Thread Jeff King
Since dd0b72c (bash prompt: use bash builtins to check stash state, 2011-04-01), git-prompt checks whether we have a stash by looking for $GIT_DIR/refs/stash. Generally external programs should never do this, because they would miss packed-refs. That commit claims that packed-refs does not pack

Re: [PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-28 Thread Junio C Hamano
SZEDER Gábor writes: > On Thu, Jun 27, 2013 at 10:31:57PM -0300, Eduardo R. D'Avila wrote: >> The merged result is ok! > > Yeah, it look good, thanks. Thanks, both, for double checking (and thank you for preparing the pre-merged results). -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-28 Thread SZEDER Gábor
Hi, On Thu, Jun 27, 2013 at 10:31:57PM -0300, Eduardo R. D'Avila wrote: > The merged result is ok! Yeah, it look good, thanks. Gábor -- 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.kern

Re: [PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-27 Thread Eduardo R. D'Avila
Hi Junio, The merged result is ok! Thanks, Eduardo -- 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 v2 0/5] git-prompt: cleaning and improvement

2013-06-27 Thread Junio C Hamano
Queued, and merged to 'pu' without the previous merge with the older iteration. If you two can double check the merged result, it would be very much appreciated. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

[PATCH v2 1/5] t9903: add tests for git-prompt pcmode

2013-06-25 Thread Eduardo R. D'Avila
git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having these tests enables an upcoming refactor in a safe way. Signed-off-by: Eduardo R. D'Avila --- 254 0 t/t9903-

[PATCH v2 0/5] git-prompt: cleaning and improvement

2013-06-25 Thread Eduardo R. D'Avila
'Avila (5): t9903: add tests for git-prompt pcmode git-prompt.sh: refactor colored prompt code t9903: remove redundant tests git-prompt.sh: do not print duplicate clean color code git-prompt.sh: add missing information in comments contrib/completion/git-prompt.sh | 111 +

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-24 Thread SZEDER Gábor
On Sat, Jun 22, 2013 at 01:32:38PM -0300, Eduardo D'Avila wrote: > These tests where important to make sure that I wouldn't break anything during > the refactorization. Having them pass before *and* after refactorization > guarantees that nothing was broken (except for some subtle case that might

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-23 Thread Junio C Hamano
"Eduardo D'Avila" writes: > However, I agree that they became redundant. > > Would it make sense to include a patch that only removes the zsh > tests, after the refactorization? I think that would be a sensible thing to do. In any case, Szeder seems to be giving a good guidance on patches in th

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-22 Thread Eduardo D'Avila
2013/6/22 SZEDER Gábor : > On Thu, Jun 20, 2013 at 11:25:26PM -0300, Eduardo R. D'Avila wrote: >> git-prompt.sh lacks tests for PROMPT_COMMAND mode. >> >> Add tests for: >> * pcmode prompt without colors >> * pcmode prompt with colors for bash >> * pcmode prompt with colors for zsh >> >> Having the

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-22 Thread SZEDER Gábor
Hi, On Thu, Jun 20, 2013 at 11:25:26PM -0300, Eduardo R. D'Avila wrote: > git-prompt.sh lacks tests for PROMPT_COMMAND mode. > > Add tests for: > * pcmode prompt without colors > * pcmode prompt with colors for bash > * pcmode prompt with colors for zsh > > Having these tests enables an upcoming

[PATCH 0/4] git-prompt: cleaning and improvement

2013-06-20 Thread Eduardo R. D'Avila
-control.git/228308 . Some of the patches could still be used, so I'm reposting them with an additional one to add some missing information in usage comments. Eduardo R. D'Avila (4): t9903: add tests for git-prompt pcmode git-prompt.sh: refactor colored prompt code git-prompt.

[PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-20 Thread Eduardo R. D'Avila
git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having these tests enables an upcoming refactor in a safe way. Signed-off-by: Eduardo R. D'Avila --- 254 0 t/t9903-

[PATCH v2 1/3] t9903: add tests for git-prompt pcmode

2013-06-17 Thread Eduardo R. D'Avila
git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having these tests enables an upcoming refactor in a safe way. Signed-off-by: Eduardo R. D'Avila --- 254 0 t/t9903-

Re: [PATCH/RFC 1/3] t9903: add tests for git-prompt pcmode

2013-06-16 Thread Junio C Hamano
"Eduardo R. D'Avila" writes: > git-prompt.sh lacks tests for PROMPT_COMMAND mode. > > Add tests for: > * pcmode prompt without colors > * pcmode prompt with colors for bash > * pcmode prompt with colors for zsh > > Having these tests enables an upcoming refactor in > a safe way. > > Signed-off-by

[PATCH/RFC 1/3] t9903: add tests for git-prompt pcmode

2013-06-16 Thread Eduardo R. D'Avila
git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having these tests enables an upcoming refactor in a safe way. Signed-off-by: Eduardo R. D'Avila --- 250 0 t/t9903-

Re: Git prompt

2013-02-10 Thread Sitaram Chamarty
On Mon, Feb 11, 2013 at 4:24 AM, Junio C Hamano wrote: > Jeff King writes: > >> On Sun, Feb 10, 2013 at 01:25:38PM -0800, Jonathan Nieder wrote: >> >>> Ethan Reesor wrote: >>> >>> > I have a git user set up on my server. It's prompt is set to

Re: Git prompt

2013-02-10 Thread Junio C Hamano
Jeff King writes: > On Sun, Feb 10, 2013 at 01:25:38PM -0800, Jonathan Nieder wrote: > >> Ethan Reesor wrote: >> >> > I have a git user set up on my server. It's prompt is set to >> > git-prompt and it's git-shell-commands is empty. >> [.

Re: Git prompt

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 01:25:38PM -0800, Jonathan Nieder wrote: > Ethan Reesor wrote: > > > I have a git user set up on my server. It's prompt is set to > > git-prompt and it's git-shell-commands is empty. > [...] > > How do I make the git user work like git

Re: Git prompt

2013-02-10 Thread Ethan Reesor
That would be perfect. (And I did mean I set the login shell to git-prompt. Additionally, the git user does not have permissions to run any other shell.) However, when I remove the git-shell-commands directory I get (on the local end): fatal: Interactive git shell is not enabled. hint: ~/git

Re: Git prompt

2013-02-10 Thread Jonathan Nieder
Ethan Reesor wrote: > I have a git user set up on my server. It's prompt is set to > git-prompt and it's git-shell-commands is empty. [...] > How do I make the git user work like github where, upon attempting to > get a prompt, the connection is closed? I assume you mean

[PATCH 3/3] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users

2012-12-17 Thread Sven Strickroth
git-svn reads usernames and other user queries from an interactive terminal. This cause GUIs (w/o STDIN connected) to hang waiting forever for git-svn to complete (http://code.google.com/p/tortoisegit/issues/detail?id=967). This change extends the Git::prompt helper, so that it can also be used

Re: [PATCH] git-prompt: Document GIT_PS1_DESCRIBE_STYLE

2012-12-11 Thread Junio C Hamano
Anders Kaseorg writes: > GIT_PS1_DESCRIBE_STYLE was introduced in v1.6.3.2~35. Document it in the > header comments. > > Signed-off-by: Anders Kaseorg > --- Thanks. > contrib/completion/git-prompt.sh | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/contrib/completion/git-pr

[PATCH] git-prompt: Document GIT_PS1_DESCRIBE_STYLE

2012-12-11 Thread Anders Kaseorg
GIT_PS1_DESCRIBE_STYLE was introduced in v1.6.3.2~35. Document it in the header comments. Signed-off-by: Anders Kaseorg --- contrib/completion/git-prompt.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index bf

[PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users

2012-11-11 Thread Sven Strickroth
git-svn reads usernames and other user queries from an interactive terminal. This cause GUIs (w/o STDIN connected) to hang waiting forever for git-svn to complete (http://code.google.com/p/tortoisegit/issues/detail?id=967). This change extends the Git::prompt helper, so that it can also be used

Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users

2012-10-06 Thread Junio C Hamano
Sven Strickroth writes: > Am 04.01.2012 01:12 schrieb Junio C Hamano: >> Now "prompt" is no longer a method but is merely a helper function, so >> I've queued this (and 1/2 rewrite we discussed in a separate thread) to >> 'pu' after rewording the commit log message. >> >> Thanks. > > Is there a

Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users

2012-10-06 Thread Sven Strickroth
Am 04.01.2012 01:12 schrieb Junio C Hamano: > Now "prompt" is no longer a method but is merely a helper function, so > I've queued this (and 1/2 rewrite we discussed in a separate thread) to > 'pu' after rewording the commit log message. > > Thanks. Is there a reason why these changes did not get