Jeff King <peff@xxxxxxxx> writes: I didn't know it was that easy (primarily because I didn't know zlib had a ready-to-eat interface to do this). > + if (!strcasecmp(ext, "tgz")) > + return "--format=tgz"; > + if (!strcasecmp(ext, "gz") && > + ext - 4 >= filename && > + !strcasecmp(ext - 4, "tar.gz")) Shouldn't this be if (!strcasecmp(ext, "gz") && filename < ext - 5 && !strcasecmp(ext - 5, ".tar.gz")) to exclude "hellotar.gz" and possibly ".tar.gz" ("<=" vs "<")? > diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh > index cff1b3e..faf2784 100755 > --- a/t/t5000-tar-tree.sh > +++ b/t/t5000-tar-tree.sh > @@ -26,6 +26,7 @@ commit id embedding: > > . ./test-lib.sh > UNZIP=${UNZIP:-unzip} > +GUNZIP=${GUNZIP:-gunzip} Just a personal preference but I find myself using "gzip -d" more often than "gunzip". -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html