git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitk: do not show local changes for bare repositories
@ 2008-03-06 12:39 David Aguilar
  2008-03-06 23:07 ` Paul Mackerras
  2008-03-07  9:04 ` David Aguilar
  0 siblings, 2 replies; 5+ messages in thread
From: David Aguilar @ 2008-03-06 12:39 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

Launching gitk on a bare repository would previously show the
work tree as having removed all files.  We now test for bare
repositories before showing local changes.

Signed-off-by: David Aguilar <davvid@gmail.com>
---
 gitk |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index f1f21e9..cc4cde3 100755
--- a/gitk
+++ b/gitk
@@ -2843,9 +2843,9 @@ proc dohidelocalchanges {} {
 
 # spawn off a process to do git diff-index --cached HEAD
 proc dodiffindex {} {
-    global localirow localfrow lserial showlocalchanges
+    global localirow localfrow lserial showlocalchanges isbare
 
-    if {!$showlocalchanges} return
+    if {!$showlocalchanges || $isbare} return
     incr lserial
     set localfrow -1
     set localirow -1
@@ -8643,6 +8643,7 @@ set patchnum 0
 set localirow -1
 set localfrow -1
 set lserial 0
+set isbare [expr {[exec git rev-parse --is-bare-repository] == "true"}]
 setcoords
 makewindow
 # wait for the window to become visible
-- 
1.5.4.rc2.1105.gfc5f2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-10 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 12:39 [PATCH] gitk: do not show local changes for bare repositories David Aguilar
2008-03-06 23:07 ` Paul Mackerras
2008-03-07  9:04 ` David Aguilar
2008-03-08 11:14   ` Paul Mackerras
2008-03-10 10:54     ` [PATCH] gitk: do not show local changes when we there is no work tree David Aguilar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).