summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-15 19:06:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-15 19:06:48 (GMT)
commit754e66b7a0bec277c319a4d6105024d210f47066 (patch)
tree891737371e4d34eab84e01add8da1a839da1e5e7 /git-rebase--interactive.sh
parent849865733fc667789d0e57edd1ac2ee1f38499a3 (diff)
parent57f2b6b25868e32a25181b2a345b5bab3e3ba78f (diff)
downloadgit-754e66b7a0bec277c319a4d6105024d210f47066.zip
git-754e66b7a0bec277c319a4d6105024d210f47066.tar.gz
git-754e66b7a0bec277c319a4d6105024d210f47066.tar.bz2
Merge branch 'jc/rebase-i-commit-msg-fix'
* jc/rebase-i-commit-msg-fix: rebase-i: do not get fooled by a log message ending with backslash rebase-i: style fix
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 6b86abc..31e6860 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -263,10 +263,10 @@ pick_one_preserving_merges () {
then
if test "$fast_forward" = t
then
- cat "$DOTEST"/current-commit | while read current_commit
+ while read current_commit
do
git rev-parse HEAD > "$REWRITTEN"/$current_commit
- done
+ done <"$DOTEST"/current-commit
rm "$DOTEST"/current-commit ||
die "Cannot write current commit's replacement sha1"
fi
@@ -440,9 +440,9 @@ record_in_rewritten() {
echo "$oldsha1" >> "$REWRITTEN_PENDING"
case "$(peek_next_command)" in
- squash|s|fixup|f)
+ squash|s|fixup|f)
;;
- *)
+ *)
flush_rewritten_pending
;;
esac
@@ -450,7 +450,7 @@ record_in_rewritten() {
do_next () {
rm -f "$MSG" "$AUTHOR_SCRIPT" "$AMEND" || exit
- read command sha1 rest < "$TODO"
+ read -r command sha1 rest < "$TODO"
case "$command" in
'#'*|''|noop)
mark_action_done
@@ -591,7 +591,7 @@ do_rest () {
# skip picking commits whose parents are unchanged
skip_unnecessary_picks () {
fd=3
- while read command sha1 rest
+ while read -r command sha1 rest
do
# fd=3 means we skip the command
case "$fd,$command,$(git rev-parse --verify --quiet $sha1^)" in
@@ -644,13 +644,13 @@ rearrange_squash () {
test -s "$1.sq" || return
used=
- while read pick sha1 message
+ while read -r pick sha1 message
do
case " $used" in
*" $sha1 "*) continue ;;
esac
echo "$pick $sha1 $message"
- while read squash action msg
+ while read -r squash action msg
do
case "$message" in
"$msg"*)
@@ -890,7 +890,8 @@ first and then run 'git rebase --continue' again."
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
--abbrev=7 --reverse --left-right --topo-order \
$REVISIONS | \
- sed -n "s/^>//p" | while read shortsha1 rest
+ sed -n "s/^>//p" |
+ while read -r shortsha1 rest
do
if test t != "$PRESERVE_MERGES"
then