From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: gitster@pobox.com
Cc: git@vger.kernel.org, remi.lespinet@ensimag.grenoble-inp.fr,
guillaume.pages@ensimag.grenoble-inp.fr,
louis--alexandre.stuber@ensimag.grenoble-inp.fr,
antoine.delaite@ensimag.grenoble-inp.fr, sunshine@sunshineco.com,
Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH 1/3] fixup! git rebase -i: add static check for commands and SHA-1
Date: Tue, 30 Jun 2015 11:19:19 +0200 [thread overview]
Message-ID: <1435655961-31263-2-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1435655961-31263-1-git-send-email-Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
git-rebase--interactive.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index ec4a068..9041d15 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -871,8 +871,7 @@ check_bad_cmd_and_sha () {
while read -r line
do
IFS=' '
- set x $line
- shift
+ set -- $line
command=$1
sha1=$2
@@ -881,8 +880,7 @@ check_bad_cmd_and_sha () {
# Doesn't expect a SHA-1
;;
pick|p|drop|d|reword|r|edit|e|squash|s|fixup|f)
- check_commit_sha $sha1 "$line"
- if test $? -ne 0
+ if ! check_commit_sha $sha1 "$line"
then
retval=1
fi
@@ -988,8 +986,7 @@ check_todo_list () {
;;
esac
- check_bad_cmd_and_sha <"$todo"
- if test $? -ne 0
+ if ! check_bad_cmd_and_sha <"$todo"
then
raise_error=t
fi
--
2.5.0.rc0.10.g7792c2a
next prev parent reply other threads:[~2015-06-30 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 20:20 rebase -i: drop, missing commits and static checks Galan Rémi
2015-06-29 20:20 ` [PATCHv7 1/3] git-rebase -i: add command "drop" to remove a commit Galan Rémi
2015-06-29 20:20 ` [PATCHv7 2/3] git rebase -i: warn about removed commits Galan Rémi
2015-06-29 20:20 ` [PATCHv7 3/3] git rebase -i: add static check for commands and SHA-1 Galan Rémi
2015-06-30 9:19 ` [PATCH 0/3] rebase -i: drop, missing commits and static checks Matthieu Moy
2015-06-30 9:19 ` Matthieu Moy [this message]
2015-06-30 9:19 ` [PATCH 2/3] fixup! git rebase -i: warn about removed commits Matthieu Moy
2015-06-30 9:19 ` [PATCH 3/3] " Matthieu Moy
2015-06-30 15:06 ` [PATCH 0/3] rebase -i: drop, missing commits and static checks Remi Galan Alfonso
2015-06-30 15:39 ` Matthieu Moy
2015-06-30 16:16 ` Junio C Hamano
2015-06-30 17:02 ` Remi Galan Alfonso
2015-06-30 17:03 ` Matthieu Moy
2015-06-30 17:09 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435655961-31263-2-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--cc=antoine.delaite@ensimag.grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=guillaume.pages@ensimag.grenoble-inp.fr \
--cc=louis--alexandre.stuber@ensimag.grenoble-inp.fr \
--cc=remi.lespinet@ensimag.grenoble-inp.fr \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).