Skip to content

Commit 00754b2

Browse files
committed
Merge branch 'tr/doc-sh-setup' into maint
* tr/doc-sh-setup: git-sh-setup: make require_clean_work_tree part of the interface
2 parents b42e81a + d577cd2 commit 00754b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Documentation/git-sh-setup.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ require_work_tree_exists::
6868
cd_to_toplevel, which is impossible to do if there is no
6969
working tree.
7070

71+
require_clean_work_tree <action> [<hint>]::
72+
checks that the working tree and index associated with the
73+
repository have no uncommitted changes to tracked files.
74+
Otherwise it emits an error message of the form `Cannot
75+
<action>: <reason>. <hint>`, and dies. Example:
76+
+
77+
----------------
78+
require_clean_work_tree rebase "Please commit or stash them."
79+
----------------
80+
7181
get_author_ident_from_commit::
7282
outputs code for use with eval to set the GIT_AUTHOR_NAME,
7383
GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.

0 commit comments

Comments
 (0)