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

2017-12-05 Thread Robert Abel
/completion/git-prompt.sh. Signed-off-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 41a471957a..983e419d2b 100644 --- a/c

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

2017-12-05 Thread Robert Abel
$@ as argument to the read builtin command. Signed-off-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c6cbef38c2..41a471957a

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

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

2017-12-04 Thread Robert Abel
by passing multiple variable names. Add a comment and explicitly use $2 instead of $@ to read the file into one variable. Signed-off-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/completi

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

2017-12-04 Thread Robert Abel
/to/repo (BARE:master This patch fixes the issue by setting the IFS to $'\r\n' for the read operation. Note that ANSI-C Quoting ($'...') is supported by bash as well as zsh, which are the current targets of git-prompt.sh, cf. <20171130010811.17369-1-szeder@gmail.com>. Signed-off-by: Rober

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 <ra...@robertabel.eu> 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

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

2017-12-01 Thread Robert Abel
-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c6cbef38c..41a471957 100644 --- a/contrib/completion/git-prompt.sh

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

2017-12-01 Thread Robert Abel
/to/repo (BARE:master Signed-off-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 41a471957..983e419d2 100644 --- a/c

[PATCH] l10n: update de_DE translation

2017-12-01 Thread Robert Abel
Der-, die- and dasselbe and their declensions are spelt as one word in German. Signed-off-by: Robert Abel <ra...@robertabel.eu> --- po/de.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/de.po b/po/de.po index a05aca5f3..400262625 100644 --- a/po/de.po ++

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-29 Thread Robert Abel
Hi Johannes, On 30 Nov 2017 01:21, Johannes Schindelin wrote: > On Wed, 29 Nov 2017, Robert Abel wrote: >> This means that it should be okay to just do >> >>> test -r "$f" && IFS=" \t\r\n" read "$@" < "$f" > > I am

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

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

2017-11-28 Thread Robert Abel
/to/repo (BARE:master Signed-off-by: Robert Abel <ra...@robertabel.eu> --- contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c6cbef38c2..71a64e7959 100644 --- a/c

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,