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>
Petr Baudis committed
Sep 24, 2008 at 22:44 UTC
adcbd431e7ae3c6356c50fa2559ac06ddb970008
1 file changed
+2
-1
lib/remote_add.tcl
+2
-1
@@ -144,8 +144,9 @@ method _add {} {
144
if {[info exists env(GIT_SSH)]} {
145
set ssh $env(GIT_SSH)
146
}
147
- lappend cmds [list exec $ssh $host git --git-dir=$path init --bare]
147
+ lappend cmds [list exec $ssh $host mkdir -p $location && git --git-dir=$path init --bare]
148
} elseif { ! [regexp {://} $location xx] } {
149
+ lappend cmds [list exec mkdir -p $location]
150
lappend cmds [list exec git --git-dir=$location init --bare]
151
} else {
152
tk_messageBox \