summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8809d69)
raw | patch | inline | side by side (parent: 8809d69)
author | David Aguilar <davvid@gmail.com> | |
Mon, 10 Mar 2008 10:54:56 +0000 (03:54 -0700) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Tue, 11 Mar 2008 09:22:39 +0000 (20:22 +1100) |
Launching gitk on a bare repository or a .git directory
would previously show the work tree as having removed all
files. We now inhibit showing local changes when gitk
is not launched from within a work tree.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
would previously show the work tree as having removed all
files. We now inhibit showing local changes when gitk
is not launched from within a work tree.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 5a78a916e48fff5bd43b5bf32d8a25f7c87022ff..5d9f589f02946f7c821ae9a563e8f917f7faf28a 100755 (executable)
--- a/gitk
+++ b/gitk
proc updatecommits {} {
global viewdata curview phase displayorder ordertok idpending
global children commitrow selectedline thickerline showneartags
proc updatecommits {} {
global viewdata curview phase displayorder ordertok idpending
global children commitrow selectedline thickerline showneartags
+ global isworktree
+
+ set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}]
if {$phase ne {}} {
stop_rev_list
if {$phase ne {}} {
stop_rev_list
# spawn off a process to do git diff-index --cached HEAD
proc dodiffindex {} {
global localirow localfrow lserial showlocalchanges
# spawn off a process to do git diff-index --cached HEAD
proc dodiffindex {} {
global localirow localfrow lserial showlocalchanges
+ global isworktree
- if {!$showlocalchanges} return
+ if {!$showlocalchanges || !$isworktree} return
incr lserial
set localfrow -1
set localirow -1
incr lserial
set localfrow -1
set localirow -1
set localirow -1
set localfrow -1
set lserial 0
set localirow -1
set localfrow -1
set lserial 0
+set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}]
setcoords
makewindow
# wait for the window to become visible
setcoords
makewindow
# wait for the window to become visible