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

[PATCH 0/1] Diff-helper update

From
Junio C Hamano <junkio@cox.net>
Date
May 18, 2005, 06:28 UTC
Message-ID
<7v3bslqc94.fsf@assigned-by-dhcp.cox.net>

This is just a cover letter but the next patch implements the rename detection I told you about.

The output from the patched version is attached at the end of this message as a demonstration.

My plan is to get the documentation and the framework in place with this patch first. The basic strategy is to hold created and deleted files while we parse the incoming diff-tree output, and match them up at the end, looking for usefully similar pair.

The similarity evaluator included in this round of patch detects exact renames only, which is not very useful in practice, but that would be improved in the later round. It will probably be done with the same deltify code Nico is using.

$ git-diff-tree -r \
    13ab4462d2aefb252d7c916bd537151856b7c967 \
    99665af5c0be0fe4319b39183e84917993153576 | ./git-diff-helper -r
diff -git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -45,7 +45,7 @@ with a '-p' option, they do not produce 
 instead they produce a patch file.
 ...
diff -git a/diff.h b/diff.h
--- a/diff.h
+++ b/diff.h
@@ -17,7 +17,7 @@ extern void diff_change(unsigned mode1, 
 
 extern void diff_unmerge(const char *path);
 
-/* These are for diff-tree-helper */
+/* These are for diff-helper */
 
 struct diff_spec {
 	unsigned char blob_sha1[20];
diff -git a/diff-tree-helper.c b/diff-helper.c
rename old diff-tree-helper.c
rename new diff-helper.c
diff -git a/Documentation/git-diff-tree-helper.txt b/Documentation/git-diff-helper.txt
rename old Documentation/git-diff-tree-helper.txt
rename new Documentation/git-diff-helper.txt
Next: Linus Torvalds
Message 1 of 13 in “Diff-helper update”
  1. 0/1 Diff-helper updateJunio C Hamano, May 18, 2005
  2. Linus TorvaldsMay 18, 2005
  3. Junio C HamanoMay 18, 2005
  4. Linus TorvaldsMay 18, 2005
  5. Linus TorvaldsMay 18, 2005
  6. Thomas GlanzmannMay 18, 2005
  7. Junio C HamanoMay 18, 2005
  8. Linus TorvaldsMay 18, 2005
  9. Junio C HamanoMay 18, 2005
  10. Junio C HamanoMay 19, 2005
  11. [preview] diff-helper rename detection.Junio C Hamano, May 19, 2005
  12. Linus TorvaldsMay 19, 2005
  13. Junio C HamanoMay 19, 2005

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.