aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-29 02:52:06 -0500
committerShawn O. Pearce <spearce@spearce.org>2007-01-29 02:52:06 -0500
commitc94dd1c8c2da1601c83443292b4ab34be3ab3358 (patch)
tree405386d5e72ba1d0c4df4c777dc30a31a54bf5c7
parent3eddda98435f67ffb0afc8baf4bfb51ed8160f2c (diff)
downloadgit-c94dd1c8c2da1601c83443292b4ab34be3ab3358.tar.gz
git-c94dd1c8c2da1601c83443292b4ab34be3ab3358.tar.xz
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>
-rwxr-xr-xgit-gui.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 9892ec32a..fc74d9e6e 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2951,13 +2951,13 @@ proc reset_hard_wait {fd} {
set next_browser_id 0
-proc new_browser {} {
+proc new_browser {commit} {
global next_browser_id cursor_ptr
global browser_commit browser_status browser_stack browser_path browser_busy
set w .browser[incr next_browser_id]
set w_list $w.list.l
- set browser_commit($w_list) HEAD
+ set browser_commit($w_list) $commit
set browser_status($w_list) {Starting...}
set browser_stack($w_list) {}
set browser_path($w_list) $browser_commit($w_list):
@@ -4714,7 +4714,7 @@ menu .mbar.repository
.mbar.repository add command \
-label {Browse Current Branch} \
- -command new_browser \
+ -command {new_browser $current_branch} \
-font font_ui
.mbar.repository add separator