Skip to content
Permalink
Browse files

contrib/git-resurrect.sh: do not write \t for HT in sed scripts

Just like we did in 0d1d6e5 ("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>
  • Loading branch information...
gitster committed Apr 1, 2017
1 parent e1ff064 commit fba275dc93319ffa31ecebe015f8cda671fcf0e5
Showing with 2 additions and 2 deletions.
  1. +2 −2 contrib/git-resurrect.sh
@@ -24,13 +24,13 @@ n,dry-run don't recreate the branch"
. git-sh-setup

search_reflog () {
sed -ne 's~^\([^ ]*\) .*\tcheckout: 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~^[^ ]* \([^ ]*\) .*\tmerge '"$1"':.*~\1^2~p' \
sed -ne 's~^[^ ]* \([^ ]*\) .* merge '"$1"':.*~\1^2~p' \
< "$GIT_DIR"/logs/HEAD
)
}

0 comments on commit fba275d

Please sign in to comment.
You can’t perform that action at this time.