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@xxxxxxxxx> --- Documentation/git-sh-setup.txt | 6 ------ git-sh-setup.sh | 8 -------- 2 files changed, 14 deletions(-) diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt index 2a28361cf66..1d8c87e9b2f 100644 --- a/Documentation/git-sh-setup.txt +++ b/Documentation/git-sh-setup.txt @@ -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. diff --git a/git-sh-setup.sh b/git-sh-setup.sh index a2a28982b6d..363c0096842 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -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 -- 2.33.0.814.gb82868f05f3