Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
contrib/git-resurrect.sh: do not write \t for HT in sed scripts
author
Junio C Hamano
<gitster@pobox.com>
Sat, 1 Apr 2017 04:08:30 +0000
(21:08 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 1 Apr 2017 04:08:30 +0000
(21:08 -0700)
Just like we did in
0d1d6e50
("t/t7003: replace \t with literal tab
in sed expression", 2010-08-12), avoid writing "\t" for HT in sed
scripts, which is not portable.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/git-resurrect.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
e1ff064
)
diff --git
a/contrib/git-resurrect.sh
b/contrib/git-resurrect.sh
index c364dda696912037cfafdb5e182b6e58f99e0a7e..3b78ffd079ee787c59901979148b7f1da98c026b 100755
(executable)
--- a/
contrib/git-resurrect.sh
+++ b/
contrib/git-resurrect.sh
@@
-24,13
+24,13
@@
n,dry-run don't recreate the branch"
. git-sh-setup
search_reflog () {
-
sed -ne 's~^\([^ ]*\) .*\t
checkout: moving from '"$1"' .*~\1~p' \
+
sed -ne 's~^\([^ ]*\) .*
checkout: moving from '"$1"' .*~\1~p' \
< "$GIT_DIR"/logs/HEAD
}
search_reflog_merges () {
git rev-parse $(
- sed -ne 's~^[^ ]* \([^ ]*\) .*
\t
merge '"$1"':.*~\1^2~p' \
+ sed -ne 's~^[^ ]* \([^ ]*\) .*
merge '"$1"':.*~\1^2~p' \
< "$GIT_DIR"/logs/HEAD
)
}