[coreboot-gerrit] Change in coreboot[master]: util/gitconfig: Replace printf with heredoc

Alex Thiessen (Code Review) gerrit at coreboot.org
Sun Jan 14 00:31:37 CET 2018


Alex Thiessen has uploaded this change for review. ( https://review.coreboot.org/23251


Change subject: util/gitconfig: Replace printf with heredoc
......................................................................

util/gitconfig: Replace printf with heredoc

The `gitconfig.sh` script contains a call to `printf` with a lengthy argument
where no format string is used at all. Replace it with a heredoc for better
readability.

Change-Id: I42dbaa570ab9661991fa5d9b4577c9aed05c2981
Signed-off-by: Alex Thiessen <alex.thiessen+coreboot at gmail.com>
---
M util/gitconfig/gitconfig.sh
1 file changed, 6 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/23251/1

diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh
index 07f4b42..42f613e 100755
--- a/util/gitconfig/gitconfig.sh
+++ b/util/gitconfig/gitconfig.sh
@@ -54,7 +54,10 @@
 
 { git config --includes user.name \
 	&& git config --includes user.email; } >/dev/null \
-	|| { printf "Please configure your name and email in git:\n\n\
- git config --global user.name \"Your Name Comes Here\"\n\
- git config --global user.email your.email at example.com\n"; \
+	|| { cat <<-EOMSG
+		Please configure your name and email in git:
+
+		 git config --global user.name "Your Name Comes Here"
+		 git config --global user.email your.email at example.com
+EOMSG
 exit 1; }

-- 
To view, visit https://review.coreboot.org/23251
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42dbaa570ab9661991fa5d9b4577c9aed05c2981
Gerrit-Change-Number: 23251
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180113/93402d79/attachment-0001.html>


More information about the coreboot-gerrit mailing list