[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-prompt, cf. contrib

[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

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

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

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

[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

[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

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

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

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

[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 $@.

[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

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 >> > > ---

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
|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

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,

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

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 msys-git

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 <g...@drmicha.warpmail.net> writes: > >> git-prompt has various describe styles, among them "describe" (by >> annotated tags) and "default" (by exact match with any tag). >

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

2017-03-15 Thread Junio C Hamano
Michael J Gruber <g...@drmicha.warpmail.net> 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, annotate

[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 <g...@drmicha.warpmail.net> ---

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 >> ---

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

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

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: ---

[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 @@

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

2015-03-21 Thread SZEDER Gábor
Quoting Cody Taylor cody.tay...@maternityneighborhood.com: SZEDER Gábor sze...@ira.uka.de 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

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

2015-03-15 Thread SZEDER Gábor
Hi, Quoting Junio C Hamano gits...@pobox.com: Cody A Taylor cody.tay...@maternityneighborhood.com 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

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

2015-03-15 Thread Junio C Hamano
SZEDER Gábor sze...@ira.uka.de writes: Hi, Quoting Junio C Hamano gits...@pobox.com: Cody A Taylor cody.tay...@maternityneighborhood.com 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.

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

2015-03-15 Thread Cody Taylor
SZEDER Gábor sze...@ira.uka.de 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

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

2015-03-13 Thread Junio C Hamano
Cody A Taylor cody.tay...@maternityneighborhood.com writes: From c861d5cb401110ce7d86b76c1eaa8e89e80f484e Mon Sep 17 00:00:00 2001 From: Cody A Taylor codemiste...@yahoo.com Date: Thu, 12 Mar 2015 20:36:44 -0400 Subject: [PATCH] git prompt: Use toplevel to find untracked files. All

[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 codemiste...@yahoo.com 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

[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 codemiste...@yahoo.com 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

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

2015-01-14 Thread Tony Finch
Signed-off-by: Tony Finch d...@dotat.at --- 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 +++

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

2015-01-14 Thread Tony Finch
SZEDER Gábor sze...@ira.uka.de 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.finch d...@dotat.at

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

2015-01-14 Thread SZEDER Gábor
Hi, Quoting Tony Finch d...@dotat.at: Signed-off-by: Tony Finch d...@dotat.at --- 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

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

2015-01-13 Thread SZEDER Gábor
Hi, Quoting Tony Finch d...@dotat.at: 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) $? \$ '

[PATCH] git-prompt: preserve command exit status

2014-12-22 Thread Tony Finch
Signed-off-by: Tony Finch d...@dotat.at --- 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 +++

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

2014-12-22 Thread Junio C Hamano
Tony Finch d...@dotat.at writes: Signed-off-by: Tony Finch d...@dotat.at --- 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 ---

[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 v2] git-prompt: preserve value of $? inside shell prompt

2014-12-22 Thread Junio C Hamano
Tony Finch d...@dotat.at 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

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

2014-12-22 Thread Tony Finch
Junio C Hamano gits...@pobox.com 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

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 p...@peff.net 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

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 p...@peff.net 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 they would

[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 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

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

2013-06-28 Thread Junio C Hamano
SZEDER Gábor sze...@ira.uka.de 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

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

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

2013-06-25 Thread Eduardo R. D'Avila
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 -- t/t9903-bash-prompt.sh

[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 erdav...@gmail.com --- 254

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 erdav...@gmail.com 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

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

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

2013-06-22 Thread Eduardo D'Avila
2013/6/22 SZEDER Gábor sze...@ira.uka.de: 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

[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 erdav...@gmail.com --- 254

[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.sh: do

[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 erdav...@gmail.com --- 254

[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 erdav...@gmail.com --- 250

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

2013-06-16 Thread Junio C Hamano
Eduardo R. D'Avila erdav...@gmail.com 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.

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 that the user's login shell

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 github where, upon attempting to get a prompt

Re: Git prompt

2013-02-10 Thread Sitaram Chamarty
On Mon, Feb 11, 2013 at 4:24 AM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net 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

[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 ande...@mit.edu --- contrib/completion/git-prompt.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/contrib/completion/git-prompt.sh

Re: [PATCH] git-prompt: Document GIT_PS1_DESCRIBE_STYLE

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

[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 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

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 sven.strickr...@tu-clausthal.de 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.