git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] git-sh-setup: move GIT_DIR initialization into a function
@ 2014-10-11  8:39 David Aguilar
  2014-10-11  8:39 ` [PATCH v3 2/3] mergetool: don't require a work tree for --tool-help David Aguilar
  0 siblings, 1 reply; 6+ messages in thread
From: David Aguilar @ 2014-10-11  8:39 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Charles Bailey

Signed-off-by: David Aguilar <davvid@gmail.com>
---
This is a new patch since the last round, prep for 2/3

 git-sh-setup.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 9447980..d968760 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -330,8 +330,7 @@ esac
 
 # Make sure we are in a valid repository of a vintage we understand,
 # if we require to be in a git repository.
-if test -z "$NONGIT_OK"
-then
+git_dir_init () {
 	GIT_DIR=$(git rev-parse --git-dir) || exit
 	if [ -z "$SUBDIRECTORY_OK" ]
 	then
@@ -346,6 +345,11 @@ then
 		exit 1
 	}
 	: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
+}
+
+if test -z "$NONGIT_OK"
+then
+	git_dir_init
 fi
 
 peel_committish () {
-- 
2.1.2.378.g89c0b73

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-15  6:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-11  8:39 [PATCH v3 1/3] git-sh-setup: move GIT_DIR initialization into a function David Aguilar
2014-10-11  8:39 ` [PATCH v3 2/3] mergetool: don't require a work tree for --tool-help David Aguilar
2014-10-11  8:39   ` [PATCH v3 3/3] difftool: don't assume that default sh is sane David Aguilar
2014-10-13 19:16   ` [PATCH v3 2/3] mergetool: don't require a work tree for --tool-help Junio C Hamano
2014-10-15  6:35     ` David Aguilar
2014-10-15  6:48       ` David Aguilar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).