mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
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>
This commit is contained in:
parent
0d4044123c
commit
adcbd431e7
|
@ -144,8 +144,9 @@ method _add {} {
|
||||||
if {[info exists env(GIT_SSH)]} {
|
if {[info exists env(GIT_SSH)]} {
|
||||||
set ssh $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] } {
|
} elseif { ! [regexp {://} $location xx] } {
|
||||||
|
lappend cmds [list exec mkdir -p $location]
|
||||||
lappend cmds [list exec git --git-dir=$location init --bare]
|
lappend cmds [list exec git --git-dir=$location init --bare]
|
||||||
} else {
|
} else {
|
||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
|
|
Loading…
Reference in a new issue