{"thread":{"id":"42078","subject":"[PATCH v1 0/2] git-p4: fix Git LFS pointer parsing","startedAt":"2016-04-19T20:08:48Z","lastAt":"2016-04-24T16:50:50Z","messageCount":13,"participants":["larsxschneider@gmail.com","Junio C Hamano","Lars Schneider","Sebastian Schuberth","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"283840","messageId":"1461096530-82448-1-git-send-email-larsxschneider@gmail.com","threadId":"42078","inReplyTo":null,"subject":"[PATCH v1 0/2] git-p4: fix Git LFS pointer parsing","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-19T20:08:48Z","receivedAt":"2016-04-19T20:08:48Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nTravis-CI uses 'brew' to always install the latest available version of\nGit LFS on the OS X build machines (on Linux the version is sticky).\nA change in Git LFS 1.2.0 [1] breaks the git-p4 LFS integration [2].\n\nThis mini series updates Travis-CI to the latest Git-LFS and Perforce\nversions on Linux and Mac and makes git-p4 work with the latest Git LFS\nagain.\n\nThanks,\nLars\n\n[1] https://github.com/github/git-lfs/pull/1105\n[2] https://travis-ci.org/git/git/jobs/124047942\n\nLars Schneider (2):\n  travis-ci: update Git-LFS and P4 to the latest version\n  git-p4: fix Git LFS pointer parsing\n\n .travis.yml              | 4 ++--\n Documentation/git-p4.txt | 3 ++-\n git-p4.py                | 6 +++---\n 3 files changed, 7 insertions(+), 6 deletions(-)\n\n--\n2.5.1\n"},{"id":"283842","messageId":"1461096530-82448-2-git-send-email-larsxschneider@gmail.com","threadId":"42078","inReplyTo":"1461096530-82448-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v1 1/2] travis-ci: update Git-LFS and P4 to the latest version","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-19T20:08:49Z","receivedAt":"2016-04-19T20:08:49Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n .travis.yml | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 78e433b..4acf617 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -22,8 +22,8 @@ addons:\n env:\n   global:\n     - DEVELOPER=1\n-    - P4_VERSION=\"15.2\"\n-    - GIT_LFS_VERSION=\"1.1.0\"\n+    - P4_VERSION=\"16.1\"\n+    - GIT_LFS_VERSION=\"1.2.0\"\n     - DEFAULT_TEST_TARGET=prove\n     - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n     - GIT_TEST_OPTS=\"--verbose --tee\"\n-- \n2.5.1\n"},{"id":"283841","messageId":"1461096530-82448-3-git-send-email-larsxschneider@gmail.com","threadId":"42078","inReplyTo":"1461096530-82448-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-19T20:08:50Z","receivedAt":"2016-04-19T20:08:50Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nGit LFS 1.2.0 removed a line from the output of the 'git lfs pointer'\ncommand [1] which broke the parsing of this output. Adjust the parser\nto the new output and add minimum Git LFS version to the docs.\n\n[1] https://github.com/github/git-lfs/pull/1105\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n Documentation/git-p4.txt | 3 ++-\n git-p4.py                | 6 +++---\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\nindex 88ba42b..b862cb9 100644\n--- a/Documentation/git-p4.txt\n+++ b/Documentation/git-p4.txt\n@@ -522,7 +522,8 @@ git-p4.largeFileSystem::\n \tthat large file systems do not support the 'git p4 submit' command.\n \tOnly Git LFS is implemented right now (see https://git-lfs.github.com/\n \tfor more information). Download and install the Git LFS command line\n-\textension to use this option and configure it like this:\n+\textension (minimum version 1.2.0) to use this option and configure it\n+\tlike this:\n +\n -------------\n git config       git-p4.largeFileSystem GitLFS\ndiff --git a/git-p4.py b/git-p4.py\nindex 527d44b..d2be574 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -1064,8 +1064,8 @@ class GitLFS(LargeFileSystem):\n         if pointerProcess.wait():\n             os.remove(contentFile)\n             die('git-lfs pointer command failed. Did you install the extension?')\n-        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n-        oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n+        oidEntry = [i for i in pointerFile.split('\\n') if i.startswith('oid')]\n+        oid = oidEntry[0].split(' ')[1].split(':')[1]\n         localLargeFile = os.path.join(\n             os.getcwd(),\n             '.git', 'lfs', 'objects', oid[:2], oid[2:4],\n@@ -1073,7 +1073,7 @@ class GitLFS(LargeFileSystem):\n         )\n         # LFS Spec states that pointer files should not have the executable bit set.\n         gitMode = '100644'\n-        return (gitMode, pointerContents, localLargeFile)\n+        return (gitMode, pointerFile, localLargeFile)\n\n     def pushFile(self, localLargeFile):\n         uploadProcess = subprocess.Popen(\n--\n2.5.1\n"},{"id":"283845","messageId":"xmqqtwixz6i4.fsf@gitster.mtv.corp.google.com","threadId":"42078","inReplyTo":"1461096530-82448-3-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-19T20:30:11Z","receivedAt":"2016-04-19T20:30:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"larsxschneider@gmail.com writes:\n\n> From: Lars Schneider <larsxschneider@gmail.com>\n>\n> Git LFS 1.2.0 removed a line from the output of the 'git lfs pointer'\n> command [1] which broke the parsing of this output. Adjust the parser\n> to the new output and add minimum Git LFS version to the docs.\n\nHmph, adjust to operate with both, or drop the support for the old\none?\n\n\n\n>\n> [1] https://github.com/github/git-lfs/pull/1105\n>\n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n>  Documentation/git-p4.txt | 3 ++-\n>  git-p4.py                | 6 +++---\n>  2 files changed, 5 insertions(+), 4 deletions(-)\n>\n> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n> index 88ba42b..b862cb9 100644\n> --- a/Documentation/git-p4.txt\n> +++ b/Documentation/git-p4.txt\n> @@ -522,7 +522,8 @@ git-p4.largeFileSystem::\n>  \tthat large file systems do not support the 'git p4 submit' command.\n>  \tOnly Git LFS is implemented right now (see https://git-lfs.github.com/\n>  \tfor more information). Download and install the Git LFS command line\n> -\textension to use this option and configure it like this:\n> +\textension (minimum version 1.2.0) to use this option and configure it\n> +\tlike this:\n>  +\n>  -------------\n>  git config       git-p4.largeFileSystem GitLFS\n> diff --git a/git-p4.py b/git-p4.py\n> index 527d44b..d2be574 100755\n> --- a/git-p4.py\n> +++ b/git-p4.py\n> @@ -1064,8 +1064,8 @@ class GitLFS(LargeFileSystem):\n>          if pointerProcess.wait():\n>              os.remove(contentFile)\n>              die('git-lfs pointer command failed. Did you install the extension?')\n> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n> -        oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n> +        oidEntry = [i for i in pointerFile.split('\\n') if i.startswith('oid')]\n> +        oid = oidEntry[0].split(' ')[1].split(':')[1]\n>          localLargeFile = os.path.join(\n>              os.getcwd(),\n>              '.git', 'lfs', 'objects', oid[:2], oid[2:4],\n> @@ -1073,7 +1073,7 @@ class GitLFS(LargeFileSystem):\n>          )\n>          # LFS Spec states that pointer files should not have the executable bit set.\n>          gitMode = '100644'\n> -        return (gitMode, pointerContents, localLargeFile)\n> +        return (gitMode, pointerFile, localLargeFile)\n>\n>      def pushFile(self, localLargeFile):\n>          uploadProcess = subprocess.Popen(\n> --\n> 2.5.1\n"},{"id":"283847","messageId":"A6FD8E93-63E8-49EE-838D-2AF3FD3910D4@gmail.com","threadId":"42078","inReplyTo":"xmqqtwixz6i4.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-19T20:54:08Z","receivedAt":"2016-04-19T20:54:08Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 19 Apr 2016, at 22:30, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> larsxschneider@gmail.com writes:\n> \n>> From: Lars Schneider <larsxschneider@gmail.com>\n>> \n>> Git LFS 1.2.0 removed a line from the output of the 'git lfs pointer'\n>> command [1] which broke the parsing of this output. Adjust the parser\n>> to the new output and add minimum Git LFS version to the docs.\n> \n> Hmph, adjust to operate with both, or drop the support for the old\n> one?\nI dropped the support for the older version to keep the code as simple as possible (plus it would be cumbersome to test with an outdated Git LFS version). Since it is probably a niche feature I thought that might be acceptable.\n\nThanks,\nLars\n\n>> \n>> [1] https://github.com/github/git-lfs/pull/1105\n>> \n>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n>> ---\n>> Documentation/git-p4.txt | 3 ++-\n>> git-p4.py                | 6 +++---\n>> 2 files changed, 5 insertions(+), 4 deletions(-)\n>> \n>> diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt\n>> index 88ba42b..b862cb9 100644\n>> --- a/Documentation/git-p4.txt\n>> +++ b/Documentation/git-p4.txt\n>> @@ -522,7 +522,8 @@ git-p4.largeFileSystem::\n>>    that large file systems do not support the 'git p4 submit' command.\n>>    Only Git LFS is implemented right now (see https://git-lfs.github.com/\n>>    for more information). Download and install the Git LFS command line\n>> -    extension to use this option and configure it like this:\n>> +    extension (minimum version 1.2.0) to use this option and configure it\n>> +    like this:\n>> +\n>> -------------\n>> git config       git-p4.largeFileSystem GitLFS\n>> diff --git a/git-p4.py b/git-p4.py\n>> index 527d44b..d2be574 100755\n>> --- a/git-p4.py\n>> +++ b/git-p4.py\n>> @@ -1064,8 +1064,8 @@ class GitLFS(LargeFileSystem):\n>>         if pointerProcess.wait():\n>>             os.remove(contentFile)\n>>             die('git-lfs pointer command failed. Did you install the extension?')\n>> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n>> -        oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n>> +        oidEntry = [i for i in pointerFile.split('\\n') if i.startswith('oid')]\n>> +        oid = oidEntry[0].split(' ')[1].split(':')[1]\n>>         localLargeFile = os.path.join(\n>>             os.getcwd(),\n>>             '.git', 'lfs', 'objects', oid[:2], oid[2:4],\n>> @@ -1073,7 +1073,7 @@ class GitLFS(LargeFileSystem):\n>>         )\n>>         # LFS Spec states that pointer files should not have the executable bit set.\n>>         gitMode = '100644'\n>> -        return (gitMode, pointerContents, localLargeFile)\n>> +        return (gitMode, pointerFile, localLargeFile)\n>> \n>>     def pushFile(self, localLargeFile):\n>>         uploadProcess = subprocess.Popen(\n>> --\n>> 2.5.1\n"},{"id":"283849","messageId":"xmqqh9exz4xq.fsf@gitster.mtv.corp.google.com","threadId":"42078","inReplyTo":"A6FD8E93-63E8-49EE-838D-2AF3FD3910D4@gmail.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-19T21:04:01Z","receivedAt":"2016-04-19T21:04:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n>> On 19 Apr 2016, at 22:30, Junio C Hamano <gitster@pobox.com> wrote:\n>> \n>> larsxschneider@gmail.com writes:\n>> \n>>> From: Lars Schneider <larsxschneider@gmail.com>\n>>> \n>>> Git LFS 1.2.0 removed a line from the output of the 'git lfs pointer'\n>>> command [1] which broke the parsing of this output. Adjust the parser\n>>> to the new output and add minimum Git LFS version to the docs.\n>> \n>> Hmph, adjust to operate with both, or drop the support for the old\n>> one?\n\n> I dropped the support for the older version to keep the code as\n> simple as possible (plus it would be cumbersome to test with an\n> outdated Git LFS version). Since it is probably a niche feature I\n> thought that might be acceptable.\n\nIt is bad enough that clients need to be adjusted at all in the\nfirst place, but I would have found it very troubling if the\nproblematic change to LFS thing were made in such a way that it\nmakes backward compatible adjustment on the client code impossible.\n\nBut it seems that you could read their output and strip a line that\nbegins with a known substring to make it compatible with both?\n\n\"git P4\" itself may be niche and using it with the LFS thing may\neven be more so, but in Git land, traditionally we take the backward\ncompatibility seriously.  If it is not too much work, I'd prefer to\nsee this done the right way.\n\nThanks.\n"},{"id":"283917","messageId":"CAHGBnuOuFYvf=CSyCLbhn7pyq4jsqH+p+xV9rxAtU1y3r+qjzw@mail.gmail.com","threadId":"42078","inReplyTo":"xmqqh9exz4xq.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2016-04-20T08:32:38Z","receivedAt":"2016-04-20T08:32:38Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Tue, Apr 19, 2016 at 11:04 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> I dropped the support for the older version to keep the code as\n>> simple as possible (plus it would be cumbersome to test with an\n>> outdated Git LFS version). Since it is probably a niche feature I\n>> thought that might be acceptable.\n>\n> It is bad enough that clients need to be adjusted at all in the\n> first place, but I would have found it very troubling if the\n> problematic change to LFS thing were made in such a way that it\n> makes backward compatible adjustment on the client code impossible.\n\nIf clients rely on output targeted at human consumption it's not\nsurprising that these clients need to be adjusted from time to time.\nWhat's troubling is not the change to git-lfs, but the very un-generic\nway git-p4 is implemented.\n\n-- \nSebastian Schuberth\n"},{"id":"283951","messageId":"xmqqy488wb4p.fsf@gitster.mtv.corp.google.com","threadId":"42078","inReplyTo":"CAHGBnuOuFYvf=CSyCLbhn7pyq4jsqH+p+xV9rxAtU1y3r+qjzw@mail.gmail.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-20T15:30:46Z","receivedAt":"2016-04-20T15:30:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> If clients rely on output targeted at human consumption it's not\n> surprising that these clients need to be adjusted from time to time.\n> What's troubling is not the change to git-lfs, but the very un-generic\n> way git-p4 is implemented.\n\nSounds like the subcommand they are using is not meant for\nscripting?  What is the kosher way to get at the information they\ncan use that is a supported interface for scripters?\n"},{"id":"283954","messageId":"CAHGBnuOAsKNDc7UBN=1r867KxpRSr_RG+EPFhCL+gJbbQo9rdg@mail.gmail.com","threadId":"42078","inReplyTo":"xmqqy488wb4p.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1 2/2] git-p4: fix Git LFS pointer parsing","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2016-04-20T15:40:26Z","receivedAt":"2016-04-20T15:40:26Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Wed, Apr 20, 2016 at 5:30 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> If clients rely on output targeted at human consumption it's not\n>> surprising that these clients need to be adjusted from time to time.\n>> What's troubling is not the change to git-lfs, but the very un-generic\n>> way git-p4 is implemented.\n>\n> Sounds like the subcommand they are using is not meant for\n> scripting?  What is the kosher way to get at the information they\n> can use that is a supported interface for scripters?\n\nThe \"pointer\" subcommand indeed is listed under \"Low level commands\"\nby \"git lfs\" (without any arguments), and as such it probably can be\nconsidered for scripting use. However, before my fix in [1] the\nsubcommand was printing both output targeted at humans and output\ntargeted at scripts to stdout. After my fix, only output targeted at\nscript goes to stdout, and output targeted at humans goes to stderr.\n\n[1] https://github.com/github/git-lfs/pull/1105\n\n-- \nSebastian Schuberth\n"},{"id":"284241","messageId":"1461498621-25422-1-git-send-email-szeder@ira.uka.de","threadId":"42078","inReplyTo":"1461096530-82448-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH] t9824: fix broken &&-chain in a subshell","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-04-24T11:50:21Z","receivedAt":"2016-04-24T11:50:21Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n\nAs far as I can tell after eyeballing the test script, this was the\nonly case where the &&-chain was broken.\n\n t/t9824-git-p4-git-lfs.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh\nindex 0b664a377c45..64f8d18216d4 100755\n--- a/t/t9824-git-p4-git-lfs.sh\n+++ b/t/t9824-git-p4-git-lfs.sh\n@@ -265,7 +265,7 @@ test_expect_success 'Add big files to repo and store files in LFS based on compr\n \t\t# We only import HEAD here (\"@all\" is missing!)\n \t\tgit p4 clone --destination=\"$git\" //depot &&\n \n-\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\"\n+\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\" &&\n \t\ttest_file_count_in_dir \".git/lfs/objects\" 1 &&\n \n \t\tcat >expect <<-\\EOF &&\n-- \n2.8.1.99.g5d5236f\n"},{"id":"284341","messageId":"78046710-31FD-43D8-820E-95D56564C3F5@gmail.com","threadId":"42078","inReplyTo":"1461498621-25422-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH] t9824: fix broken &&-chain in a subshell","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-24T16:29:26Z","receivedAt":"2016-04-24T16:29:26Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 24 Apr 2016, at 13:50, SZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n> ---\n> \n> As far as I can tell after eyeballing the test script, this was the\n> only case where the &&-chain was broken.\n> \n> t/t9824-git-p4-git-lfs.sh | 2 +-\n> 1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh\n> index 0b664a377c45..64f8d18216d4 100755\n> --- a/t/t9824-git-p4-git-lfs.sh\n> +++ b/t/t9824-git-p4-git-lfs.sh\n> @@ -265,7 +265,7 @@ test_expect_success 'Add big files to repo and store files in LFS based on compr\n> \t\t# We only import HEAD here (\"@all\" is missing!)\n> \t\tgit p4 clone --destination=\"$git\" //depot &&\n> \n> -\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\"\n> +\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\" &&\nThanks! I believe I remember some script/flag to detect broken &&-chains.\nDo I imagine that or can anyone point me to it?\n\nThanks,\nLars\n\n\n> \t\ttest_file_count_in_dir \".git/lfs/objects\" 1 &&\n> \n> \t\tcat >expect <<-\\EOF &&\n> -- \n> 2.8.1.99.g5d5236f\n> \n"},{"id":"284342","messageId":"20160424183729.Horde.yxK_t3vqDHiCc6kvoXJqwst@webmail.informatik.kit.edu","threadId":"42078","inReplyTo":"78046710-31FD-43D8-820E-95D56564C3F5@gmail.com","subject":"Re: [PATCH] t9824: fix broken &&-chain in a subshell","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-04-24T16:37:29Z","receivedAt":"2016-04-24T16:37:29Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Lars Schneider <larsxschneider@gmail.com>:\n\n> On 24 Apr 2016, at 13:50, SZEDER Gábor <szeder@ira.uka.de> wrote:\n>\n>> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n>> ---\n>>\n>> As far as I can tell after eyeballing the test script, this was the\n>> only case where the &&-chain was broken.\n>>\n>> t/t9824-git-p4-git-lfs.sh | 2 +-\n>> 1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh\n>> index 0b664a377c45..64f8d18216d4 100755\n>> --- a/t/t9824-git-p4-git-lfs.sh\n>> +++ b/t/t9824-git-p4-git-lfs.sh\n>> @@ -265,7 +265,7 @@ test_expect_success 'Add big files to repo and  \n>> store files in LFS based on compr\n>> \t\t# We only import HEAD here (\"@all\" is missing!)\n>> \t\tgit p4 clone --destination=\"$git\" //depot &&\n>>\n>> -\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\"\n>> +\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\" &&\n> Thanks! I believe I remember some script/flag to detect broken &&-chains.\n> Do I imagine that or can anyone point me to it?\n\nIt was introduced in bb79af9d0970 (t/test-lib: introduce --chain-lint\noption, 2015-03-20) and is enabled by default.  Unfortunately, it\ncan't \"see\" inside subshells, that's why it couldn't detect this case.\n\n\n>> \t\ttest_file_count_in_dir \".git/lfs/objects\" 1 &&\n>>\n>> \t\tcat >expect <<-\\EOF &&\n>> --\n>> 2.8.1.99.g5d5236f\n>>\n"},{"id":"284343","messageId":"06ED366B-E957-4908-A5A9-E59838F3666A@gmail.com","threadId":"42078","inReplyTo":"20160424183729.Horde.yxK_t3vqDHiCc6kvoXJqwst@webmail.informatik.kit.edu","subject":"Re: [PATCH] t9824: fix broken &&-chain in a subshell","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-24T16:50:50Z","receivedAt":"2016-04-24T16:50:50Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 24 Apr 2016, at 18:37, SZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> \n> Quoting Lars Schneider <larsxschneider@gmail.com>:\n> \n>> On 24 Apr 2016, at 13:50, SZEDER Gábor <szeder@ira.uka.de> wrote:\n>> \n>>> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n>>> ---\n>>> \n>>> As far as I can tell after eyeballing the test script, this was the\n>>> only case where the &&-chain was broken.\n>>> \n>>> t/t9824-git-p4-git-lfs.sh | 2 +-\n>>> 1 file changed, 1 insertion(+), 1 deletion(-)\n>>> \n>>> diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh\n>>> index 0b664a377c45..64f8d18216d4 100755\n>>> --- a/t/t9824-git-p4-git-lfs.sh\n>>> +++ b/t/t9824-git-p4-git-lfs.sh\n>>> @@ -265,7 +265,7 @@ test_expect_success 'Add big files to repo and\n>>> store files in LFS based on compr\n>>> \t\t# We only import HEAD here (\"@all\" is missing!)\n>>> \t\tgit p4 clone --destination=\"$git\" //depot &&\n>>> \n>>> -\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\"\n>>> +\t\ttest_file_in_lfs file6.bin 13 \"content 6 bin 39 bytes XXXXXYYYYYZZZZZ\" &&\n>> Thanks! I believe I remember some script/flag to detect broken &&-chains.\n>> Do I imagine that or can anyone point me to it?\n> \n> It was introduced in bb79af9d0970 (t/test-lib: introduce --chain-lint\n> option, 2015-03-20) and is enabled by default.  Unfortunately, it\n> can't \"see\" inside subshells, that's why it couldn't detect this case.\n\nThat explains it. Thank you!\n\n- Lars\n"}]}