aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2008-09-24 22:44:03 +0200
committerShawn O. Pearce <spearce@spearce.org>2008-09-30 12:59:18 -0700
commitadcbd431e7ae3c6356c50fa2559ac06ddb970008 (patch)
tree8862f03e6309ca1f99adb5af514850565a15673a
parent0d4044123cb081bd690dece6505ffbcb8476e7ef (diff)
downloadgit-adcbd431e7ae3c6356c50fa2559ac06ddb970008.tar.gz
git-adcbd431e7ae3c6356c50fa2559ac06ddb970008.tar.xz
git-gui: mkdir -p when initializing new remote repository
This allows the user to create repositories with arbitrary paths on the server. The downside is that errorneously typed paths are not caught but instead created remotely; YMMV. Signed-off-by: Petr Baudis <petr.baudis@novartis.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--lib/remote_add.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/remote_add.tcl b/lib/remote_add.tcl
index 89e88eeb4..8e3ad166b 100644
--- a/lib/remote_add.tcl
+++ b/lib/remote_add.tcl
@@ -144,8 +144,9 @@ method _add {} {
if {[info exists env(GIT_SSH)]} {
set ssh $env(GIT_SSH)
}
- lappend cmds [list exec $ssh $host git --git-dir=$path init --bare]
+ lappend cmds [list exec $ssh $host mkdir -p $location && git --git-dir=$path init --bare]
} elseif { ! [regexp {://} $location xx] } {
+ lappend cmds [list exec mkdir -p $location]
lappend cmds [list exec git --git-dir=$location init --bare]
} else {
tk_messageBox \