diff options
author | Thomas Rast <trast@student.ethz.ch> | 2011-12-20 22:42:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-20 14:01:41 -0800 |
commit | d577cd216e0adb9cbc726dddd1a0858b4ab4e6e3 (patch) | |
tree | 766be5bc433c73217293abefb1a39c4891f9a911 /Documentation | |
parent | 92c62a3f4f93432c0c82e3031a9e64e03ba290f7 (diff) | |
download | git-d577cd216e0adb9cbc726dddd1a0858b4ab4e6e3.tar.gz |
git-sh-setup: make require_clean_work_tree part of the interfacetr/doc-sh-setup
92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error
message, 2010-10-19) refactored git's own checking to a function in
git-sh-setup. This is a very useful thing for script writers, so
document it.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-sh-setup.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt index 3da241304b..76856633a1 100644 --- a/Documentation/git-sh-setup.txt +++ b/Documentation/git-sh-setup.txt @@ -62,6 +62,16 @@ require_work_tree:: if so. Used by scripts that require working tree (e.g. `checkout`). +require_clean_work_tree <action> [<hint>]:: + checks that the working tree and index associated with the + repository have no uncommitted changes to tracked files. + Otherwise it emits an error message of the form `Cannot + <action>: <reason>. <hint>`, and dies. Example: ++ +---------------- +require_clean_work_tree rebase "Please commit or stash them." +---------------- + get_author_ident_from_commit:: outputs code for use with eval to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit. |