Merge branch 'jc/require-work-tree-exists'
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 17:31:47 +0000 (10:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 17:31:47 +0000 (10:31 -0700)
* jc/require-work-tree-exists:
require-work-tree wants more than what its name says

1  2 
Documentation/git-sh-setup.txt
index 053df505bc3aaa5e74c3a9266858eef0de1c2bd2,1f02c4b6ea3680c01618bbe5ef6a861a14149f41..27fd8ba854698dcd31f5348ddc00a607abb64965
@@@ -58,14 -58,28 +58,19 @@@ cd_to_toplevel:
        runs chdir to the toplevel of the working tree.
  
  require_work_tree::
-       checks if the repository is a bare repository, and dies
-       if so.  Used by scripts that require working tree
-       (e.g. `checkout`).
+       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.
  
  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.
  
 -
 -Author
 -------
 -Written by Linus Torvalds <torvalds@osdl.org>
 -
 -Documentation
 ---------------
 -Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 -
  GIT
  ---
  Part of the linkgit:git[1] suite