summaryrefslogtreecommitdiff
path: root/Documentation/git-commit-tree.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2011-06-21 21:25:25 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-06-22 11:12:35 -0700
commit08716b3c11f4899c1be046eca735761b30ca686d (patch)
treeb7a6ae9a16f127580fc14d140fb34c72897ad3ce /Documentation/git-commit-tree.txt
parentarchive: move file extension format-guessing lower (diff)
downloadtgif-08716b3c11f4899c1be046eca735761b30ca686d.tar.xz
archive: refactor file extension format-guessing
Git-archive will guess a format from the output filename if no format is explicitly given. The current function just hardcodes "zip" to the zip format, and leaves everything else NULL (which will default to tar). Since we are about to add user-specified formats, we need to be more flexible. The new rule is "if a filename ends with a dot and the name of a format, it matches that format". For the existing "tar" and "zip" formats, this is identical to the current behavior. For new user-specified formats, this will do what the user expects if they name their formats appropriately. Because we will eventually start matching arbitrary user-specified extensions that may include dots, the strrchr search for the final dot is not sufficient. We need to do an actual suffix match with each extension. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit-tree.txt')
0 files changed, 0 insertions, 0 deletions