From: Avery Pennarun Date: Sun, 4 Oct 2009 00:38:43 +0000 (-0400) Subject: Add a trivial hjoin, the reverse of hsplit. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=544cfc0a3a36aba9b1120f361e21b295a69c964c;p=packages%2Fb%2Fbup.git Add a trivial hjoin, the reverse of hsplit. --- diff --git a/Makefile b/Makefile index 0e36d1d..72733b3 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,16 @@ hsplit: hsplit.o hjoin: hjoin.sh -test: hsplit +test: hsplit hjoin ./hsplit tags1 ./hsplit tags2 - diff -u -U50 tags1 tags2 + diff -u -U50 tags1 tags2 || true + wc -c testfile1 testfile2 + wc -l tags1 tags2 + ./hjoin out1 + ./hjoin out2 + diff -u testfile1 out1 + diff -u testfile2 out2 %: %.o gcc -o $@ $< $(LDFLAGS) $(LIBS) diff --git a/hjoin.sh b/hjoin.sh new file mode 100755 index 0000000..b04ad43 --- /dev/null +++ b/hjoin.sh @@ -0,0 +1,4 @@ +#!/bin/sh +while read x junk; do + git cat-file -p "$x" +done