summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-12-03 13:53:58 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-12-03 13:53:58 -0800
commit957f5db74fcf2a00260c8bdef4bf147b1b990914 (patch)
tree293baa7d48d5c9428b2ffc232519f875d4cd5770 /git-rebase--interactive.sh
parentMerge branch 'rj/maint-cygwin-count-objects' into maint (diff)
parentProtect scripted Porcelains from GREP_OPTIONS insanity (diff)
downloadtgif-957f5db74fcf2a00260c8bdef4bf147b1b990914.tar.xz
Merge branch 'rs/work-around-grep-opt-insanity' into maint
* rs/work-around-grep-opt-insanity: Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool()
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 9b1e899e27..3853b513b5 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -106,8 +106,8 @@ mark_action_done () {
sed -e 1q < "$TODO" >> "$DONE"
sed -e 1d < "$TODO" >> "$TODO".new
mv -f "$TODO".new "$TODO"
- count=$(grep -c '^[^#]' < "$DONE")
- total=$(($count+$(grep -c '^[^#]' < "$TODO")))
+ count=$(sane_grep -c '^[^#]' < "$DONE")
+ total=$(($count+$(sane_grep -c '^[^#]' < "$TODO")))
if test "$last_count" != "$count"
then
last_count=$count
@@ -147,7 +147,7 @@ die_abort () {
}
has_action () {
- grep '^[^#]' "$1" >/dev/null
+ sane_grep '^[^#]' "$1" >/dev/null
}
pick_one () {
@@ -736,7 +736,7 @@ first and then run 'git rebase --continue' again."
git rev-list $REVISIONS |
while read rev
do
- if test -f "$REWRITTEN"/$rev -a "$(grep "$rev" "$DOTEST"/not-cherry-picks)" = ""
+ if test -f "$REWRITTEN"/$rev -a "$(sane_grep "$rev" "$DOTEST"/not-cherry-picks)" = ""
then
# Use -f2 because if rev-list is telling us this commit is
# not worthwhile, we don't want to track its multiple heads,
@@ -744,7 +744,7 @@ first and then run 'git rebase --continue' again."
# be rebasing on top of it
git rev-list --parents -1 $rev | cut -d' ' -s -f2 > "$DROPPED"/$rev
short=$(git rev-list -1 --abbrev-commit --abbrev=7 $rev)
- grep -v "^[a-z][a-z]* $short" <"$TODO" > "${TODO}2" ; mv "${TODO}2" "$TODO"
+ sane_grep -v "^[a-z][a-z]* $short" <"$TODO" > "${TODO}2" ; mv "${TODO}2" "$TODO"
rm "$REWRITTEN"/$rev
fi
done