@@ -52,12 +52,6 @@ require_work_tree::
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.
-
require_clean_work_tree <action> [<hint>]::
checks that the working tree and index associated with the
repository have no uncommitted changes to tracked files.
@@ -122,14 +122,6 @@ cd_to_toplevel () {
}
}
-require_work_tree_exists () {
- if test "z$(git rev-parse --is-bare-repository)" != zfalse
- then
- program_name=$0
- die "$(eval_gettext "fatal: \$program_name cannot be used without a working tree.")"
- fi
-}
-
require_work_tree () {
test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true || {
program_name=$0
The last code that used the require_work_tree_exists() function went away in d03ebd411c6 (rebase: remove the rebase.useBuiltin setting, 2019-03-18), let's remove it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- Documentation/git-sh-setup.txt | 6 ------ git-sh-setup.sh | 8 -------- 2 files changed, 14 deletions(-)