git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/3] t7505: style fixes

From
PWPhillip Wood <phillip.wood@talktalk.net>
Date
Jan 24, 2018, 12:34 UTC
Message-ID
<20180124123422.10637-2-phillip.wood@talktalk.net>
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
Previous: Johannes SchindelinNext: Phillip Wood
Message 21 of 23 in “prepare-commit-msg hook no longer run for cherry-pick?”
  1. Dmitry TorokhovJan 5, 2018
  2. Dmitry TorokhovJan 10, 2018
  3. Junio C HamanoJan 10, 2018
  4. Dmitry TorokhovJan 10, 2018
  5. Junio C HamanoJan 10, 2018
  6. 0/2 sequencer: run 'prepare-commit-msg' hookPhillip Wood, Jan 19, 2018
  7. 1/2 t7505: Add tests for cherry-pick and rebase -i/-pPhillip Wood, Jan 19, 2018
  8. Eric SunshineJan 20, 2018
  9. 2/2 sequencer: run 'prepare-commit-msg' hookPhillip Wood, Jan 19, 2018
  10. 0/2 sequencer: run 'prepare-commit-msg' hook​Phillip Wood, Jan 23, 2018
  11. 1/2 t7505: Add tests for cherry-pick and rebase -i/-pPhillip Wood, Jan 23, 2018
  12. Junio C HamanoJan 23, 2018
  13. Junio C HamanoJan 23, 2018
  14. 2/2 sequencer: run 'prepare-commit-msg' hookPhillip Wood, Jan 23, 2018
  15. 0/3 sequencer: run 'prepare-commit-msg' hookPhillip Wood, Jan 24, 2018
  16. 3/3 sequencer: run 'prepare-commit-msg' hookPhillip Wood, Jan 24, 2018
  17. Ramsay JonesJan 24, 2018
  18. Junio C HamanoJan 24, 2018
  19. Phillip WoodJan 25, 2018
  20. Johannes SchindelinJan 29, 2018
  21. 1/3 t7505: style fixesPhillip Wood, Jan 24, 2018
  22. 2/3 t7505: Add tests for cherry-pick and rebase -i/-pPhillip Wood, Jan 24, 2018
  23. Eric SunshineJan 24, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.