summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f747133)
raw | patch | inline | side by side (parent: f747133)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 25 Jan 2007 00:08:49 +0000 (19:08 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 25 Jan 2007 05:25:31 +0000 (00:25 -0500) |
Just as we show the amount of disk space taken by the loose objects,
its interesting to know how much space is taken by the packs directory.
So show that in our Database Statistics dialog.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
its interesting to know how much space is taken by the packs directory.
So show that in our Database Statistics dialog.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 842fccc9f8c6ebc1510e052242e447b59454e949..79f980c470707ca74c95503df9c334541c66200e 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
}
close $fd
+ set packed_sz 0
+ foreach p [glob -directory [gitdir objects pack] \
+ -type f \
+ -nocomplain -- *] {
+ incr packed_sz [file size $p]
+ }
+ if {$packed_sz > 0} {
+ set stats(size-pack) [expr {$packed_sz / 1024}]
+ }
+
set w .stats_view
toplevel $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
{size {Disk space used by loose objects} { KiB}}
{in-pack {Number of packed objects}}
{packs {Number of packs}}
+ {size-pack {Disk space used by packed objects} { KiB}}
{prune-packable {Packed objects waiting for pruning}}
{garbage {Garbage files}}
} {