{"thread":{"id":"341","subject":"[PATCH] cg-diff: Always refresh the cache before diffing","startedAt":"2005-04-26T23:01:57Z","lastAt":"2005-04-26T23:01:57Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"1824","messageId":"20050426230157.GC28560@diku.dk","threadId":"341","inReplyTo":null,"subject":"[PATCH] cg-diff: Always refresh the cache before diffing","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-04-26T23:01:57Z","receivedAt":"2005-04-26T23:01:57Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Call update-cache --refresh before calling diff-cache so only modified\nfiles are included in the diff.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n---\ncommit 580058cf4cbb6c95e5e84480499ca1c635d99376\ntree 57a559984564e31e79db28d9ad62b8ea3a55dda1\nparent 74f5ad9d566408b4d352570ccde67ece0f2650a7\nauthor Jonas Fonseca <fonseca@diku.dk> 1114555427 +0200\ncommitter Jonas Fonseca <fonseca@diku.dk> 1114555427 +0200\n\n cg-diff |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletion(-)\n\nIndex: cg-diff\n===================================================================\n--- 7a6c485bceed70459c1855ab3c4d8ddfdeeb65d1/cg-diff  (mode:100755 sha1:b0c3e7389c06718c789e40b9a4fdce0afcb17917)\n+++ 57a559984564e31e79db28d9ad62b8ea3a55dda1/cg-diff  (mode:100755 sha1:aecb9add527a72238f00c0581bf615625fec8663)\n@@ -63,12 +63,14 @@\n \t\texport GIT_INDEX_FILE=$(mktemp -t gitdiff.XXXXXX)\n \t\tcp .git/index $GIT_INDEX_FILE\n \t\tread-tree -m $(tree-id \"$id1\")\n-\t\tupdate-cache --refresh\n \t\ttree=$(tree-id \"$id1\")\n \telse\n \t\ttree=$(tree-id)\n \tfi\n \n+\t# Ensure to only diff modified files\n+\tupdate-cache --refresh\n+\n \t# FIXME: Update ret based on what did we match. And take \"$@\"\n \t# to account after all.\n \tret=\n\n\n-- \nJonas Fonseca\n"}]}