git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/5] git-gui: mkdir -p when initializing new remote repository

From
pasky@suse.cz <pasky@suse.cz>
Date
Sep 24, 2008, 20:44 UTC
Message-ID
<20080924204616.697813413@suse.cz>
In-Reply-To
<20080924204358.144077183@suse.cz>

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.

This patch has been sponsored by Novartis.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 git-gui/lib/remote_add.tcl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl
index 89e88ee..8e3ad16 100644
--- a/git-gui/lib/remote_add.tcl
+++ b/git-gui/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 \
-- 
tg: (f30d624..) t/git-gui/remote-mkdir (depends on: t/git-gui/remote-add)
Previous: Petr BaudisNext: Petr Baudis
Message 8 of 20 in “git-gui: Remotes manipulation enhancements”
  1. 0/5 git-gui: Remotes manipulation enhancementspasky@suse.cz, Sep 24, 2008
  2. 1/5 git-gui: Clarify the Remote -> Delete... actionpasky@suse.cz, Sep 24, 2008
  3. 2/5 git-gui: Squash populate_{push,fetch}_menu to populate_remotes_menupasky@suse.cz, Sep 24, 2008
  4. 3/5 git-gui: Add support for adding remotespasky@suse.cz, Sep 24, 2008
  5. git-gui: Fix fetching from remotes when adding themPetr Baudis, Sep 24, 2008
  6. 4/5 git-gui: Add support for removing remotespasky@suse.cz, Sep 24, 2008
  7. Fix removing non-pushable remotesPetr Baudis, Sep 24, 2008
  8. 5/5 git-gui: mkdir -p when initializing new remote repositorypasky@suse.cz, Sep 24, 2008
  9. On Sponsor NoticesPetr Baudis, Sep 24, 2008
  10. Heikki OrsilaSep 24, 2008
  11. Martin LanghoffSep 24, 2008
  12. Petr BaudisSep 24, 2008
  13. Martin LanghoffSep 24, 2008
  14. Nicolas PitreSep 25, 2008
  15. Petr BaudisSep 25, 2008
  16. Nicolas PitreSep 25, 2008
  17. Petr BaudisSep 25, 2008
  18. Shawn O. PearceSep 25, 2008
  19. Andreas EricssonSep 25, 2008
  20. A.J. RossiniSep 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.