From 2e46b74cf85ba4399d58d18fa073907bfeed23b6 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 8 Aug 2018 11:35:28 -0700 Subject: [PATCH] Make the default checkout root be under HOME) --- cmd/git-sync/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/git-sync/main.go b/cmd/git-sync/main.go index 8dafe40..04737e2 100644 --- a/cmd/git-sync/main.go +++ b/cmd/git-sync/main.go @@ -46,7 +46,7 @@ var flRev = flag.String("rev", envString("GIT_SYNC_REV", "HEAD"), var flDepth = flag.Int("depth", envInt("GIT_SYNC_DEPTH", 0), "use a shallow clone with a history truncated to the specified number of commits") -var flRoot = flag.String("root", envString("GIT_SYNC_ROOT", "/git"), +var flRoot = flag.String("root", envString("GIT_SYNC_ROOT", envString("HOME", "")+"/git"), "the root directory for git operations") var flDest = flag.String("dest", envString("GIT_SYNC_DEST", ""), "the name at which to publish the checked-out files under --root (defaults to leaf dir of --repo)")