summaryrefslogtreecommitdiff
path: root/util/gitconfig
diff options
context:
space:
mode:
authorAlex Thiessen <alex.thiessen.de+coreboot@gmail.com>2018-01-13 19:27:45 +0000
committerPatrick Georgi <pgeorgi@google.com>2018-01-22 12:34:02 +0000
commit7c7181fc96264fd9cf04c22ac980a42225b3b148 (patch)
treed5ea6400ff723b0304f723ec84c8809d9a9a84f7 /util/gitconfig
parent7459eeb18a2edfa098a189d8e1f9ab2a58a053e4 (diff)
downloadcoreboot-7c7181fc96264fd9cf04c22ac980a42225b3b148.tar.xz
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.de+coreboot@gmail.com> Reviewed-on: https://review.coreboot.org/23250 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/gitconfig')
-rwxr-xr-xutil/gitconfig/gitconfig.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh
index 08451c177f..c2c4a69bbd 100755
--- a/util/gitconfig/gitconfig.sh
+++ b/util/gitconfig/gitconfig.sh
@@ -59,9 +59,9 @@ git submodule update --init --checkout"
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@example.com\n"; \
-exit 1)
+exit 1; }