Petr Baudis wrote: >But a patch for cg-add processing directories recursively would be great >anyway... ;-) > > > Okay, okay, what about this one: [Cogito PATCH] Add directories recursively with cg-add Signed-off-by: Jochen Roemling <jochen@roemling.net> --- a/cg-add +++ b/cg-add @@ -10,12 +10,11 @@ [ "$1" ] || die "usage: cg-add FILE..." -for file in "$@"; do - if [ -f "$file" ] || [ -h "$file" ]; then - echo "Adding file $file" - else - die "$file does not exist" - fi -done +TMPFILE="${TMP:-/tmp}/$(basename $0).$$.tmp" -git-update-cache --add -- "$@" +find $@ -type f > $TMPFILE || die "not all files do exist, nothing added" + +cat $TMPFILE | awk '{print "Adding file " $0}' +cat $TMPFILE | xargs git-update-cache --add -- + +rm -f $TMPFILE - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Mon May 30 06:23:20 2005
This archive was generated by hypermail 2.1.8 : 2005-05-30 06:23:22 EST