diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-29 13:48:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-29 13:48:44 -0700 |
commit | ae893e097ecbcbd8c6bea50017eb8cedddc5eaba (patch) | |
tree | 1a6a2ef32e722900f16db62ac76a72e29aca880a /contrib/git-shell-commands/list | |
parent | Merge branch 'rr/fmt-merge-msg' (diff) | |
parent | shell: Display errors from improperly-formatted command lines (diff) | |
download | tgif-ae893e097ecbcbd8c6bea50017eb8cedddc5eaba.tar.xz |
Merge branch 'gb/shell-ext'
* gb/shell-ext:
shell: Display errors from improperly-formatted command lines
shell: Rewrite documentation and improve error message
Add sample commands for git-shell
Add interactive mode to git-shell for user-friendliness
Allow creation of arbitrary git-shell commands
Diffstat (limited to 'contrib/git-shell-commands/list')
-rwxr-xr-x | contrib/git-shell-commands/list | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/git-shell-commands/list b/contrib/git-shell-commands/list new file mode 100755 index 0000000000..6f89938821 --- /dev/null +++ b/contrib/git-shell-commands/list @@ -0,0 +1,10 @@ +#!/bin/sh + +print_if_bare_repo=' + if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true + then + printf "%s\n" "${1#./}" + fi +' + +find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null |