git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cg-diff: Always refresh the cache before diffing
@ 2005-04-26 23:01 Jonas Fonseca
  0 siblings, 0 replies; only message in thread
From: Jonas Fonseca @ 2005-04-26 23:01 UTC (permalink / raw)
  To: pasky; +Cc: git

Call update-cache --refresh before calling diff-cache so only modified
files are included in the diff.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

---
commit 580058cf4cbb6c95e5e84480499ca1c635d99376
tree 57a559984564e31e79db28d9ad62b8ea3a55dda1
parent 74f5ad9d566408b4d352570ccde67ece0f2650a7
author Jonas Fonseca <fonseca@diku.dk> 1114555427 +0200
committer Jonas Fonseca <fonseca@diku.dk> 1114555427 +0200

 cg-diff |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

Index: cg-diff
===================================================================
--- 7a6c485bceed70459c1855ab3c4d8ddfdeeb65d1/cg-diff  (mode:100755 sha1:b0c3e7389c06718c789e40b9a4fdce0afcb17917)
+++ 57a559984564e31e79db28d9ad62b8ea3a55dda1/cg-diff  (mode:100755 sha1:aecb9add527a72238f00c0581bf615625fec8663)
@@ -63,12 +63,14 @@
 		export GIT_INDEX_FILE=$(mktemp -t gitdiff.XXXXXX)
 		cp .git/index $GIT_INDEX_FILE
 		read-tree -m $(tree-id "$id1")
-		update-cache --refresh
 		tree=$(tree-id "$id1")
 	else
 		tree=$(tree-id)
 	fi
 
+	# Ensure to only diff modified files
+	update-cache --refresh
+
 	# FIXME: Update ret based on what did we match. And take "$@"
 	# to account after all.
 	ret=


-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-26 22:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26 23:01 [PATCH] cg-diff: Always refresh the cache before diffing Jonas Fonseca

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).