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

[PATCH] adjust git-deltafy-script to the new diff-tree output format

From
Nicolas Pitre <nico@cam.org>
Date
May 24, 2005, 01:58 UTC
Message-ID
<Pine.LNX.4.62.0505232122390.16151@localhost.localdomain>

Also prevent 'sort' from sorting on the sha1 which was screwing the history listing.

Signed-off-by: Nicolas Pitre <nico@cam.org>
diff --git a/git-deltafy-script b/git-deltafy-script
--- a/git-deltafy-script
+++ b/git-deltafy-script
@@ -23,8 +23,9 @@ curr_file=""
 
 git-rev-list HEAD |
 git-diff-tree -r --stdin |
-sed -n '/^\*/ s/^.*->\(.\{41\}\)\(.*\)$/\2 \1/p' | sort | uniq |
-while read file sha1; do
+awk '/^:/ { if ($5 == "M" || $5 == "N") print $4, $6 }' |
+LC_ALL=C sort -s -k 2 | uniq |
+while read sha1 file; do
 	if [ "$file" == "$curr_file" ]; then
 		list="$list $sha1"
 	else
Message 1 of 1 in “adjust git-deltafy-script to the new diff-tree output format”
  1. adjust git-deltafy-script to the new diff-tree output formatNicolas Pitre, May 24, 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.