Merge branch 'jn/maint-pull-rebase-error-message' into maint
[gitweb.git] / git-sh-setup.sh
index 80acb7de729f2f824043b592ce110479d4334a06..aa07cc3d188df9744d50d8e0487c86a2cb30b1ac 100755 (executable)
@@ -44,6 +44,15 @@ die() {
        exit 1
 }
 
+GIT_QUIET=
+
+say () {
+       if test -z "$GIT_QUIET"
+       then
+               printf '%s\n' "$*"
+       fi
+}
+
 if test -n "$OPTIONS_SPEC"; then
        usage() {
                "$0" -h
@@ -105,6 +114,14 @@ git_editor() {
        eval "${GIT_EDITOR:=vi}" '"$@"'
 }
 
+sane_grep () {
+       GREP_OPTIONS= LC_ALL=C grep "$@"
+}
+
+sane_egrep () {
+       GREP_OPTIONS= LC_ALL=C egrep "$@"
+}
+
 is_bare_repository () {
        git rev-parse --is-bare-repository
 }