All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Fonseca <fonseca@diku.dk>
To: pasky@ucw.cz
Cc: git@vger.kernel.org
Subject: [PATCH] cg-diff: Always refresh the cache before diffing
Date: Wed, 27 Apr 2005 01:01:57 +0200	[thread overview]
Message-ID: <20050426230157.GC28560@diku.dk> (raw)

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

                 reply	other threads:[~2005-04-26 22:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050426230157.GC28560@diku.dk \
    --to=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.