[coreboot-gerrit] Change in coreboot[master]: util/gitconfig: Replace subshells with braces

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


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


Change subject: util/gitconfig: Replace subshells with braces
......................................................................

util/gitconfig: Replace subshells with braces

The check for `user.name` and `user.email` being set is done in `gitconfig.sh`
and it uses two subshells where none is actually needed. Stream redirection can
be consolidated.

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



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/23250/1

diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh
index 47981ed..07f4b42 100755
--- a/util/gitconfig/gitconfig.sh
+++ b/util/gitconfig/gitconfig.sh
@@ -52,9 +52,9 @@
 git config alias.sup-destroy "!git submodule deinit --all --force; \
 git submodule update --init --checkout"
 
-(git config --includes user.name >/dev/null \
-	&& git config --includes user.email >/dev/null) \
-	|| (printf "Please configure your name and email in git:\n\n\
+{ 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"; \
-exit 1)
+exit 1; }

-- 
To view, visit https://review.coreboot.org/23250
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: Ia1d19eb3c11f9d11f030dcc179bc175956cd7116
Gerrit-Change-Number: 23250
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/c657ec91/attachment.html>


More information about the coreboot-gerrit mailing list