X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-sh-setup.txt;h=a2f346ca710e03a7f5c65574659ac578ab8bf615;hb=eff7c32cfd12867000d6449d335fad0e7c9751f1;hp=053df505bc3aaa5e74c3a9266858eef0de1c2bd2;hpb=c3c7797e1d151417333296ab3720614c1e235094;p=git.git diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt index 053df505b..a2f346ca7 100644 --- a/Documentation/git-sh-setup.txt +++ b/Documentation/git-sh-setup.txt @@ -7,6 +7,7 @@ git-sh-setup - Common git shell script setup code SYNOPSIS -------- +[verse] '. "$(git --exec-path)/git-sh-setup"' DESCRIPTION @@ -58,9 +59,14 @@ cd_to_toplevel:: runs chdir to the toplevel of the working tree. require_work_tree:: - checks if the repository is a bare repository, and dies - if so. Used by scripts that require working tree - (e.g. `checkout`). + checks if the current directory is within the working tree + of the repository, and otherwise dies. + +require_work_tree_exists:: + checks if the working tree associated with the repository + exists, and otherwise dies. Often done before calling + cd_to_toplevel, which is impossible to do if there is no + working tree. get_author_ident_from_commit:: outputs code for use with eval to set the GIT_AUTHOR_NAME,