Skip to content

Commit

Permalink
git-gui: mkdir -p when initializing new remote repository
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Petr Baudis authored and Shawn O. Pearce committed Sep 30, 2008
1 parent 0d40441 commit adcbd43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/remote_add.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit adcbd43

Please sign in to comment.