From: martin.von.zweigbergk@gmail.com
To: git@vger.kernel.org, gitster@pobox.com
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Subject: [PATCH 4/5] rebase: remove unused rebase state 'prev_head'
Date: Wed, 3 Nov 2010 22:09:39 +0100 [thread overview]
Message-ID: <1288818580-7576-5-git-send-email-martin.von.zweigbergk@gmail.com> (raw)
In-Reply-To: <1288818580-7576-1-git-send-email-martin.von.zweigbergk@gmail.com>
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
The rebase state 'prev_head' is not used. Remove it.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
---
git-rebase.sh | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 2c812b2..a7428ea 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -60,7 +60,6 @@ read_state () {
if test -d "$merge_dir"
then
state_dir="$merge_dir"
- prev_head=$(cat "$merge_dir"/prev_head) &&
onto_name=$(cat "$merge_dir"/onto_name) &&
end=$(cat "$merge_dir"/end) &&
msgnum=$(cat "$merge_dir"/msgnum)
@@ -74,7 +73,6 @@ read_state () {
}
continue_merge () {
- test -n "$prev_head" || die "prev_head must be defined"
test -d "$merge_dir" || die "$merge_dir directory does not exist"
unmerged=$(git ls-files -u)
@@ -108,10 +106,6 @@ continue_merge () {
test -z "$GIT_QUIET" &&
GIT_PAGER='' git log --format=%s -1 "$cmt"
- prev_head=`git rev-parse HEAD^0`
- # save the resulting commit so we can read-tree on it later
- echo "$prev_head" > "$merge_dir/prev_head"
-
# onto the next patch:
msgnum=$(($msgnum + 1))
echo "$msgnum" >"$merge_dir/msgnum"
@@ -574,8 +568,6 @@ fi
mkdir -p "$merge_dir"
echo "$onto_name" > "$merge_dir/onto_name"
-prev_head=$orig_head
-echo "$prev_head" > "$merge_dir/prev_head"
echo "$head_name" > "$merge_dir/head-name"
echo "$onto" > "$merge_dir/onto"
echo "$orig_head" > "$merge_dir/orig-head"
--
1.7.3.rc1.4.g5879b6
next prev parent reply other threads:[~2010-11-04 3:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 21:09 [PATCH 0/5] Make git-rebase.sh more readable and easier to extend martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 1/5] rebase: clearer names for directory variables martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 2/5] rebase: refactor reading of state martin.von.zweigbergk
2010-11-03 21:09 ` [PATCH 3/5] rebase: read state outside loop martin.von.zweigbergk
2010-11-03 21:09 ` martin.von.zweigbergk [this message]
2010-11-03 21:09 ` [PATCH 5/5] rebase: read state explicitly in '--abort' martin.von.zweigbergk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288818580-7576-5-git-send-email-martin.von.zweigbergk@gmail.com \
--to=martin.von.zweigbergk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).