diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-03-25 16:16:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-25 16:16:34 -0700 |
commit | a7f0fcb335cdd01a01e22fe80bc66c3eee2d9f38 (patch) | |
tree | 83a700dcda66f4985ef7603ff2448f2520c0fd0d /Documentation | |
parent | 46d8bf30e47c0426e83c9899f55703807eb3129b (diff) | |
parent | c2a7536354561279eec277021690bf0fe9200b7b (diff) | |
download | git-a7f0fcb335cdd01a01e22fe80bc66c3eee2d9f38.tar.gz |
Merge branch 'bb/sh-scripts-cleanup'
Shell scripts clean-up.
* bb/sh-scripts-cleanup: (22 commits)
git-quiltimport: avoid an unnecessary subshell
contrib/coverage-diff: avoid redundant pipelines
t/t9*: merge "grep | sed" pipelines
t/t8*: merge "grep | sed" pipelines
t/t5*: merge a "grep | sed" pipeline
t/t4*: merge a "grep | sed" pipeline
t/t3*: merge a "grep | awk" pipeline
t/t1*: merge a "grep | sed" pipeline
t/t9*: avoid redundant uses of cat
t/t8*: avoid redundant use of cat
t/t7*: avoid redundant use of cat
t/t6*: avoid redundant uses of cat
t/t5*: avoid redundant uses of cat
t/t4*: avoid redundant uses of cat
t/t3*: avoid redundant uses of cat
t/t1*: avoid redundant uses of cat
t/t0*: avoid redundant uses of cat
t/perf: avoid redundant use of cat
t/annotate-tests.sh: avoid redundant use of cat
t/lib-cvs.sh: avoid redundant use of cat
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/howto/update-hook-example.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt index 151ee84ceb..4e727deedd 100644 --- a/Documentation/howto/update-hook-example.txt +++ b/Documentation/howto/update-hook-example.txt @@ -100,7 +100,7 @@ info "The user is: '$username'" if test -f "$allowed_users_file" then - rc=$(cat $allowed_users_file | grep -v '^#' | grep -v '^$' | + rc=$(grep -Ev '^(#|$)' $allowed_users_file | while read heads user_patterns do # does this rule apply to us? @@ -138,7 +138,7 @@ info "'$groups'" if test -f "$allowed_groups_file" then - rc=$(cat $allowed_groups_file | grep -v '^#' | grep -v '^$' | + rc=$(grep -Ev '^(#|$)' $allowed_groups_file | while read heads group_patterns do # does this rule apply to us? |