{"thread":{"id":"52905","subject":"[PATCH] git-p4: reverse large file detection order","startedAt":"2020-02-28T15:16:03Z","lastAt":"2020-02-28T15:16:03Z","messageCount":1,"participants":["Sam Hocevar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"392661","messageId":"20200228150710.ikgijcxlft5wjl3h@hocevar.net","threadId":"52905","inReplyTo":null,"subject":"[PATCH] git-p4: reverse large file detection order","fromName":"Sam Hocevar","fromEmail":"sam@hocevar.net","sentAt":"2020-02-28T15:07:10Z","receivedAt":"2020-02-28T15:16:03Z","isPatch":true,"sender":{"key":"sam@hocevar.net","avatar":"https://avatars.githubusercontent.com/u/245089?v=4"},"body":"It is more efficient to first check for a file's extension against\ngit-p4.largeFileExtensions before git-p4.largeFileCompressedThreshold\nbecause the latter test may trigger a costly compression task.\n\nSigned-off-by: Sam Hocevar <sam@hocevar.net>\n---\n git-p4.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git git-p4.py git-p4.py\nindex 40d9e7c594..a54970aa74 100755\n--- git-p4.py\n+++ git-p4.py\n@@ -1197,7 +1197,7 @@ def processContent(self, git_mode, relPath, contents):\n         \"\"\"Processes the content of git fast import. This method decides if a\n            file is stored in the large file system and handles all necessary\n            steps.\"\"\"\n-        if self.exceedsLargeFileThreshold(relPath, contents) or self.hasLargeFileExtension(relPath):\n+        if self.hasLargeFileExtension(relPath) or self.exceedsLargeFileThreshold(relPath, contents):\n             contentTempFile = self.generateTempFile(contents)\n             (pointer_git_mode, contents, localLargeFile) = self.generatePointer(contentTempFile)\n             if pointer_git_mode:\n-- \n2.25.1\n"}]}