Johannes Schindelin wrote: > On Tue, 9 Aug 2005, John Ellson wrote: >>How can we cat the latest committed state of a file to stdout? >> >>I hacked this: >> >> #!/bin/bash >> ID=`git-ls-files -s | grep $1 | cut -d ' ' -f 2` > > > and now: > > git-cat-file blob $ID
Still not pretty. How about this? #!/bin/sh git-ls-tree HEAD "$@" | while read mode type hash filename; do [ "$type" = "blob" ] && git-cat-file blob "$hash" done Rene - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html