{"thread":{"id":"43821","subject":"[PATCH] git-gui: gui.autoexplore makes explorer to pop up automatically after picking","startedAt":"2008-09-24T22:07:02Z","lastAt":"2008-09-24T22:07:02Z","messageCount":1,"participants":["Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299069","messageId":"1222294022-14632-1-git-send-email-pasky@suse.cz","threadId":"43821","inReplyTo":null,"subject":"[PATCH] git-gui: gui.autoexplore makes explorer to pop up automatically after picking","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-09-24T22:07:02Z","receivedAt":"2008-09-24T22:07:02Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Especially for Windows users used to work with the Windows Explorer,\nit is very useful when after picking a repository (either opening\na local one or initializing/cloning a new one) in the \"intro\" window,\nthe explorer view of the working copy pops up along the standard\nGit GUI window, so that the users can, well, actually work with\nthe repository.\n\nThis patch has been sponsored by Novartis.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n\n---\n Documentation/config.txt |    4 ++++\n git-gui/git-gui.sh       |    6 ++++++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex bea867d..4f53584 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -767,6 +767,10 @@ All gitcvs variables except for 'gitcvs.usecrlfattr' and\n is one of \"ext\" and \"pserver\") to make them apply only for the given\n access method.\n \n+gui.autoexplore::\n+\tWhether to automatically open explorer window when a repository\n+\tis picked within linkgit:git-gui[1]. The default value is \"false\".\n+\n gui.commitmsgwidth::\n \tDefines how wide the commit message window is in the\n \tlinkgit:git-gui[1]. \"75\" is the default.\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex a64d34d..668aa49 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -959,6 +959,7 @@ citool {\n ##\n ## repository setup\n \n+set picked 0\n if {[catch {\n \t\tset _gitdir $env(GIT_DIR)\n \t\tset _prefix {}\n@@ -970,6 +971,7 @@ if {[catch {\n \tload_config 1\n \tapply_config\n \tchoose_repository::pick\n+\tset picked 1\n }\n if {![file isdirectory $_gitdir] && [is_Cygwin]} {\n \tcatch {set _gitdir [exec cygpath --windows $_gitdir]}\n@@ -3213,3 +3215,7 @@ after 1 do_rescan\n if {[is_enabled multicommit]} {\n \tafter 1000 hint_gc\n }\n+\n+if {$picked && [is_config_true gui.autoexplore]} {\n+\tdo_explore\n+}\n-- \ntg: (be2e370..) t/git-gui/autoexplore (depends on: t/git-gui/explore)\n"}]}