Code

git-gui: Ensure submodule path is quoted properly
[git.git] / lib / remote_add.tcl
index 89e88eeb49b0e2bf0dd568f12d847760ec488409..fb29422aa7b9bacb78d33026b825d19ab3399e95 100644 (file)
@@ -130,9 +130,9 @@ method _add {} {
        switch -- $opt_action {
        fetch {
                set c [console::new \
-                       [mc "fetch %s" $remote] \
-                       [mc "Fetching the %s" $remote]]
-               console::exec $c [list git fetch --all $name]
+                       [mc "fetch %s" $name] \
+                       [mc "Fetching the %s" $name]]
+               console::exec $c [list git fetch $name]
        }
        push {
                set cmds [list]
@@ -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 \