Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-05-02 20:13:34 +0300
committerJunio C Hamano <gitster@pobox.com>2023-05-02 20:13:34 +0300
commit4ca12e10e6fbda68adcb32e78497dc261e94734d (patch)
treea3d02454b0479a96d5f1a6021529ce4e0bd5cf91 /contrib/completion
parent48d89b51b3bb8a60580c36731b96a7206ce1e5b9 (diff)
parent197152098a257998b14e04b85b28216bd68f5b9c (diff)
Merge branch 'ek/completion-use-read-r-to-read-literally'
The completion script used to use bare "read" without the "-r" option to read the contents of various state files, which risked getting confused with backslashes in them. This has been corrected. * ek/completion-use-read-r-to-read-literally: completion: suppress unwanted unescaping of `read`
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-prompt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 76ee4ab1e5..2c030050ae 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -298,7 +298,7 @@ __git_ps1_colorize_gitstring ()
# variable, in that order.
__git_eread ()
{
- test -r "$1" && IFS=$'\r\n' read "$2" <"$1"
+ test -r "$1" && IFS=$'\r\n' read -r "$2" <"$1"
}
# see if a cherry-pick or revert is in progress, if the user has committed a