diff mbox series

[5/9] git-sh-setup: remove unused require_work_tree_exists() function

Message ID patch-5.9-dc4dd7d1399-20210902T155758Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series remove dead shell code | expand

Commit Message

Ævar Arnfjörð Bjarmason Sept. 2, 2021, 4:01 p.m. UTC
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(-)
diff mbox series

Patch

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