@matheusbsbs / matheus-bagliano / commits / c7965afd3d
Fork 0

Avoid one-or-more (\+) non BRE in sed scripts.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Sep 1, 2007 at 02:17 UTC c7965afd3dac7b9b6c1d4da27d3757e7d41aa060
2 files changed +2 -5
git-rebase--interactive.sh
+1 -1
@@ -190,7 +190,7 @@ nth_string () {
190
191 make_squash_message () {
192 if test -f "$SQUASH_MSG"; then
193 - COUNT=$(($(sed -n "s/^# This is [^0-9]*\([0-9]\+\).*/\1/p" \
193 + COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \
194 < "$SQUASH_MSG" | tail -n 1)+1))
195 echo "# This is a combination of $COUNT commits."
196 sed -n "2,\$p" < "$SQUASH_MSG"
git-rebase.sh
+1 -4
@@ -69,13 +69,10 @@ continue_merge () {
69 die "$RESOLVEMSG"
70 fi
71 printf "Committed: %0${prec}d " $msgnum
72 - git rev-list --pretty=oneline -1 HEAD | \
73 - sed 's/^[a-f0-9]\+ //'
72 else
73 printf "Already applied: %0${prec}d " $msgnum
76 - git rev-list --pretty=oneline -1 "$cmt" | \
77 - sed 's/^[a-f0-9]\+ //'
74 fi
75 + git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
76
77 prev_head=`git rev-parse HEAD^0`
78 # save the resulting commit so we can read-tree on it later