summaryrefslogtreecommitdiff
path: root/git-deltafy-script
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-05-24 01:58:00 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-24 02:17:06 (GMT)
commit587e49405be6c4053a69ee8a938660125aa1b51f (patch)
tree2c55508ef55d9f87d6a8e09c053096696d255b8d /git-deltafy-script
parentb1c006dd651fce55e25a7b06d00382cfdc1a3f91 (diff)
downloadgit-587e49405be6c4053a69ee8a938660125aa1b51f.zip
git-587e49405be6c4053a69ee8a938660125aa1b51f.tar.gz
git-587e49405be6c4053a69ee8a938660125aa1b51f.tar.bz2
[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 <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'git-deltafy-script')
-rw-r--r--git-deltafy-script5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-deltafy-script b/git-deltafy-script
index c23f215..f63cf07 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