From: Nicolas Pitre Date: Tue, 24 May 2005 01:58:00 +0000 (-0400) Subject: [PATCH] adjust git-deltafy-script to the new diff-tree output format X-Git-Tag: v0.99~477 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=587e49405be6c4053a69ee8a938660125aa1b51f;p=git.git [PATCH] adjust git-deltafy-script to the new diff-tree output format Also prevent 'sort' from sorting on the sha1 which was screwing the history listing. Signed-off-by: Nicolas Pitre Signed-off-by: Linus Torvalds --- diff --git a/git-deltafy-script b/git-deltafy-script index c23f21511..f63cf075e 100644 --- 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