git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] Enable 'check for copy and renames' (-C) also when path filtering

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Aug 16, 2006, 09:06 UTC
Message-ID
<e5bfff550608160206w606008ddv2da42ce49e98fa2b@mail.gmail.com>

It seems that -C option of git-diff-tree it works only if the whole changeset is retrieved.

>From git repository:
- Ask for all

$git diff-tree -r -p -C 5d4a600 5d4a60033543e063bc9d77ca957de0187fb58fb3

diff --git a/Makefile b/Makefile
index 132c9cf..4fd62bc 100644
--- a/Makefile
+++ b/Makefile
@@ -177,7 +177,7 @@ PROGRAMS = \
  	git-convert-objects$X git-fetch-pack$X git-fsck-objects$X \

            ----cut----

diff --git a/pack-objects.c b/builtin-pack-objects.c
similarity index 100%                          <-------  similarity and
rename from pack-objects.c              <--------  rename info shown
rename to builtin-pack-objects.c      <--------  only in this case
index 861c7f0..2301cd5 100644
--- a/pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1,3 +1,4 @@
+#include "builtin.h"
 #include "cache.h"


- Ask for pack-objects.c only

$git diff-tree  -r -p -C 5d4a600 -- pack-objects.c
5d4a60033543e063bc9d77ca957de0187fb58fb3
diff --git a/pack-objects.c b/pack-objects.c
deleted file mode 100644
index 861c7f0..0000000
--- a/pack-objects.c
+++ /dev/null
@@ -1,1376 +0,0 @@
-#include "cache.h"
-#include "object.h"


- Ask for builtin-pack-objects.conly

$git diff-tree  -r -p -C 5d4a600 -- builtin-pack-objects.c
5d4a60033543e063bc9d77ca957de0187fb58fb3
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
new file mode 100644
index 0000000..2301cd5
--- /dev/null
+++ b/builtin-pack-objects.c
@@ -0,0 +1,1376 @@
+#include "builtin.h"
+#include "cache.h"
+#include "object.h"

Showing rename info also when filtering on a specified path could be
useful to retrieve a single file history following renames.

Thanks
Marco
Next: Junio C Hamano
Message 1 of 4 in “[RFC] Enable 'check for copy and renames' (-C) also when path filtering”
  1. Marco CostalbaAug 16, 2006
  2. Junio C HamanoAug 16, 2006
  3. Marco CostalbaAug 16, 2006
  4. Junio C HamanoAug 16, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.