git-gui: Display the current branch name in browsers.
Rather than using HEAD for the current branch, use the actual name of the current branch in the browser. This way the user knows what a browser is browsing if they open up different browsers while on different branches. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Jan 29, 2007 at 02:52 UTC
c94dd1c8c2da1601c83443292b4ab34be3ab3358
1 file changed
+3
-3
git-gui.sh
+3
-3
@@ -2951,13 +2951,13 @@ proc reset_hard_wait {fd} {
2951
2952
set next_browser_id 0
2953
2954
-proc new_browser {} {
2954
+proc new_browser {commit} {
2955
global next_browser_id cursor_ptr
2956
global browser_commit browser_status browser_stack browser_path browser_busy
2957
2958
set w .browser[incr next_browser_id]
2959
set w_list $w.list.l
2960
- set browser_commit($w_list) HEAD
2960
+ set browser_commit($w_list) $commit
2961
set browser_status($w_list) {Starting...}
2962
set browser_stack($w_list) {}
2963
set browser_path($w_list) $browser_commit($w_list):
@@ -4714,7 +4714,7 @@ menu .mbar.repository
4714
4715
.mbar.repository add command \
4716
-label {Browse Current Branch} \
4717
- -command new_browser \
4717
+ -command {new_browser $current_branch} \
4718
-font font_ui
4719
.mbar.repository add separator
4720