git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood@talktalk.net>
To: Git Mailing List <git@vger.kernel.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Ramsay Jones <ramsay@ramsayjones.plus.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: [PATCH v3 1/3] t7505: style fixes
Date: Wed, 24 Jan 2018 12:34:20 +0000	[thread overview]
Message-ID: <20180124123422.10637-2-phillip.wood@talktalk.net> (raw)
In-Reply-To: <20180124123422.10637-1-phillip.wood@talktalk.net>

From: Phillip Wood <phillip.wood@dunelm.org.uk>

Fix the indentation and style of the hook script in preparation for
further changes.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 t/t7505-prepare-commit-msg-hook.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index b13f72975ecce17887c4c8275c6935d78d4b09a0..cef709555eb9c3e3dec0016909a17ce7cf32650a 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -31,15 +31,17 @@ mkdir -p "$HOOKDIR"
 echo "#!$SHELL_PATH" > "$HOOK"
 cat >> "$HOOK" <<'EOF'
 
-if test "$2" = commit; then
-  source=$(git rev-parse "$3")
+if test "$2" = commit
+then
+	source=$(git rev-parse "$3")
 else
-  source=${2-default}
+	source=${2-default}
 fi
-if test "$GIT_EDITOR" = :; then
-  sed -e "1s/.*/$source (no editor)/" "$1" > msg.tmp
+if test "$GIT_EDITOR" = :
+then
+	sed -e "1s/.*/$source (no editor)/" "$1" >msg.tmp
 else
-  sed -e "1s/.*/$source/" "$1" > msg.tmp
+	sed -e "1s/.*/$source/" "$1" >msg.tmp
 fi
 mv msg.tmp "$1"
 exit 0
-- 
2.15.1


  reply	other threads:[~2018-01-24 12:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 18:48 prepare-commit-msg hook no longer run for cherry-pick? Dmitry Torokhov
2018-01-10  0:39 ` Dmitry Torokhov
2018-01-10  2:24   ` Junio C Hamano
2018-01-10 19:25     ` Dmitry Torokhov
2018-01-10 21:14       ` Junio C Hamano
2018-01-19 14:19       ` [PATCH 0/2] sequencer: run 'prepare-commit-msg' hook Phillip Wood
2018-01-19 14:19         ` [PATCH 1/2] t7505: Add tests for cherry-pick and rebase -i/-p Phillip Wood
2018-01-20  0:48           ` Eric Sunshine
2018-01-19 14:19         ` [PATCH 2/2] sequencer: run 'prepare-commit-msg' hook Phillip Wood
2018-01-23 10:24       ` [PATCH v2 0/2] sequencer: run 'prepare-commit-msg' hook​ Phillip Wood
2018-01-23 10:24         ` [PATCH v2 1/2] t7505: Add tests for cherry-pick and rebase -i/-p Phillip Wood
2018-01-23 18:41           ` Junio C Hamano
2018-01-23 18:41           ` Junio C Hamano
2018-01-23 10:24         ` [PATCH v2 2/2] sequencer: run 'prepare-commit-msg' hook Phillip Wood
2018-01-24 12:34       ` [PATCH v3 0/3] " Phillip Wood
2018-01-24 12:34         ` Phillip Wood [this message]
2018-01-24 12:34         ` [PATCH v3 2/3] t7505: Add tests for cherry-pick and rebase -i/-p Phillip Wood
2018-01-24 18:39           ` Eric Sunshine
2018-01-24 12:34         ` [PATCH v3 3/3] sequencer: run 'prepare-commit-msg' hook Phillip Wood
2018-01-24 18:51           ` Ramsay Jones
2018-01-24 18:59             ` Junio C Hamano
2018-01-25 16:33               ` Phillip Wood
2018-01-29 23:06           ` Johannes Schindelin

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=20180124123422.10637-2-phillip.wood@talktalk.net \
    --to=phillip.wood@talktalk.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ramsay@ramsayjones.plus.com \
    --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).