{"thread":{"id":"54012","subject":"[PATCH] ci: fix inconsistent indentation","startedAt":"2020-08-10T08:37:44Z","lastAt":"2020-08-21T19:11:22Z","messageCount":4,"participants":["Adrian via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"403247","messageId":"pull.823.git.git.1597048659983.gitgitgadget@gmail.com","threadId":"54012","inReplyTo":null,"subject":"[PATCH] ci: fix inconsistent indentation","fromName":"Adrian via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-08-10T08:37:39Z","receivedAt":"2020-08-10T08:37:44Z","isPatch":true,"sender":{"key":"forbesa06@gmail.com","avatar":null},"body":"From: Adrian Moennich <adrian@planetcoding.net>\n\nSigned-off-by: Adrian Moennich <adrian@planetcoding.net>\n---\n    Fix inconsistent yaml indentation\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-823%2FThiefMaster%2Fpatch-1-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-823/ThiefMaster/patch-1-v1\nPull-Request: https://github.com/git/git/pull/823\n\n .github/workflows/main.yml | 56 +++++++++++++++++++-------------------\n 1 file changed, 28 insertions(+), 28 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 84a5dcff7a..5bd321e5e1 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -7,34 +7,34 @@ env:\n \n jobs:\n   ci-config:\n-      runs-on: ubuntu-latest\n-      outputs:\n-        enabled: ${{ steps.check-ref.outputs.enabled }}\n-      steps:\n-        - name: try to clone ci-config branch\n-          continue-on-error: true\n-          run: |\n-            git -c protocol.version=2 clone \\\n-              --no-tags \\\n-              --single-branch \\\n-              -b ci-config \\\n-              --depth 1 \\\n-              --no-checkout \\\n-              --filter=blob:none \\\n-              https://github.com/${{ github.repository }} \\\n-              config-repo &&\n-              cd config-repo &&\n-              git checkout HEAD -- ci/config\n-        - id: check-ref\n-          name: check whether CI is enabled for ref\n-          run: |\n-            enabled=yes\n-            if test -x config-repo/ci/config/allow-ref &&\n-               ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n-            then\n-              enabled=no\n-            fi\n-            echo \"::set-output name=enabled::$enabled\"\n+    runs-on: ubuntu-latest\n+    outputs:\n+      enabled: ${{ steps.check-ref.outputs.enabled }}\n+    steps:\n+      - name: try to clone ci-config branch\n+        continue-on-error: true\n+        run: |\n+          git -c protocol.version=2 clone \\\n+            --no-tags \\\n+            --single-branch \\\n+            -b ci-config \\\n+            --depth 1 \\\n+            --no-checkout \\\n+            --filter=blob:none \\\n+            https://github.com/${{ github.repository }} \\\n+            config-repo &&\n+            cd config-repo &&\n+            git checkout HEAD -- ci/config\n+      - id: check-ref\n+        name: check whether CI is enabled for ref\n+        run: |\n+          enabled=yes\n+          if test -x config-repo/ci/config/allow-ref &&\n+             ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n+          then\n+            enabled=no\n+          fi\n+          echo \"::set-output name=enabled::$enabled\"\n \n   windows-build:\n     needs: ci-config\n\nbase-commit: dc04167d378fb29d30e1647ff6ff51dd182bc9a3\n-- \ngitgitgadget\n"},{"id":"403276","messageId":"xmqq5z9qcvlt.fsf@gitster.c.googlers.com","threadId":"54012","inReplyTo":"pull.823.git.git.1597048659983.gitgitgadget@gmail.com","subject":"Re: [PATCH] ci: fix inconsistent indentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-10T16:29:50Z","receivedAt":"2020-08-10T16:29:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Adrian via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Adrian Moennich <adrian@planetcoding.net>\n>\n\nHere is a good place to explain what you consider consistent and\ninconsistent ...\n\n> Signed-off-by: Adrian Moennich <adrian@planetcoding.net>\n> ---\n\n... because ...\n\n>  jobs:\n>    ci-config:\n> -      runs-on: ubuntu-latest\n> -      outputs:\n> -        enabled: ${{ steps.check-ref.outputs.enabled }}\n> -      steps:\n> -        - name: try to clone ci-config branch\n\n... the above is being very consistent.  All the direct children of\njobs.ci-config like runs-on, outputs and steps are (1) indented more\nthan its parent (i.e. jobs.ci-config) and (2) indented by the same\namount relative to their parent (i.e. 4 spaces).\n\nApparently, that is enough \"consistency\" CI system wants to see.  If\nyou want to impose extra \"consistency\", that is fine, but you'd need\nto be more explicit about it.  Perhaps like\n\n    All other parts of this file indent children from their parent\n    by exactly two spaces, but direct children of \"jobs.ci-config\"\n    hierarchy were indented by four spaces.  While it is not an\n    error, let's be more consistent.\n\nor something?\n\n> -          continue-on-error: true\n> -          run: |\n> -            git -c protocol.version=2 clone \\\n> -              --no-tags \\\n> -              --single-branch \\\n> -              -b ci-config \\\n> -              --depth 1 \\\n> -              --no-checkout \\\n> -              --filter=blob:none \\\n> -              https://github.com/${{ github.repository }} \\\n> -              config-repo &&\n> -              cd config-repo &&\n> -              git checkout HEAD -- ci/config\n> -        - id: check-ref\n> -          name: check whether CI is enabled for ref\n> -          run: |\n> -            enabled=yes\n> -            if test -x config-repo/ci/config/allow-ref &&\n> -               ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n> -            then\n> -              enabled=no\n> -            fi\n> -            echo \"::set-output name=enabled::$enabled\"\n> +    runs-on: ubuntu-latest\n> +    outputs:\n> +      enabled: ${{ steps.check-ref.outputs.enabled }}\n> +    steps:\n> +      - name: try to clone ci-config branch\n> +        continue-on-error: true\n> +        run: |\n> +          git -c protocol.version=2 clone \\\n> +            --no-tags \\\n> +            --single-branch \\\n> +            -b ci-config \\\n> +            --depth 1 \\\n> +            --no-checkout \\\n> +            --filter=blob:none \\\n> +            https://github.com/${{ github.repository }} \\\n> +            config-repo &&\n> +            cd config-repo &&\n> +            git checkout HEAD -- ci/config\n> +      - id: check-ref\n> +        name: check whether CI is enabled for ref\n> +        run: |\n> +          enabled=yes\n> +          if test -x config-repo/ci/config/allow-ref &&\n> +             ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n> +          then\n> +            enabled=no\n> +          fi\n> +          echo \"::set-output name=enabled::$enabled\"\n>  \n>    windows-build:\n>      needs: ci-config\n>\n> base-commit: dc04167d378fb29d30e1647ff6ff51dd182bc9a3\n"},{"id":"404124","messageId":"pull.823.v2.git.git.1598002046754.gitgitgadget@gmail.com","threadId":"54012","inReplyTo":"pull.823.git.git.1597048659983.gitgitgadget@gmail.com","subject":"[PATCH v2] ci: fix inconsistent indentation","fromName":"Adrian via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-08-21T09:27:26Z","receivedAt":"2020-08-21T09:27:36Z","isPatch":true,"sender":{"key":"forbesa06@gmail.com","avatar":null},"body":"From: Adrian Moennich <adrian@planetcoding.net>\n\nWhile YAML allows different indentation styles as long as each block is\nconsistent, it is rather unusual to mix different indentations in a\nsingle file.  Therefor I unified the file to use two-space indentation\neverywhere.\n\nSigned-off-by: Adrian Moennich <adrian@planetcoding.net>\n---\n    Fix inconsistent yaml indentation\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-823%2FThiefMaster%2Fpatch-1-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-823/ThiefMaster/patch-1-v2\nPull-Request: https://github.com/git/git/pull/823\n\nRange-diff vs v1:\n\n 1:  5301e3842e ! 1:  d398122a6a ci: fix inconsistent indentation\n     @@ Metadata\n       ## Commit message ##\n          ci: fix inconsistent indentation\n      \n     +    While YAML allows different indentation styles as long as each block is\n     +    consistent, it is rather unusual to mix different indentations in a\n     +    single file.  Therefor I unified the file to use two-space indentation\n     +    everywhere.\n     +\n          Signed-off-by: Adrian Moennich <adrian@planetcoding.net>\n      \n       ## .github/workflows/main.yml ##\n\n\n .github/workflows/main.yml | 56 +++++++++++++++++++-------------------\n 1 file changed, 28 insertions(+), 28 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 44e0fe5839..30425404eb 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -7,34 +7,34 @@ env:\n \n jobs:\n   ci-config:\n-      runs-on: ubuntu-latest\n-      outputs:\n-        enabled: ${{ steps.check-ref.outputs.enabled }}\n-      steps:\n-        - name: try to clone ci-config branch\n-          continue-on-error: true\n-          run: |\n-            git -c protocol.version=2 clone \\\n-              --no-tags \\\n-              --single-branch \\\n-              -b ci-config \\\n-              --depth 1 \\\n-              --no-checkout \\\n-              --filter=blob:none \\\n-              https://github.com/${{ github.repository }} \\\n-              config-repo &&\n-              cd config-repo &&\n-              git checkout HEAD -- ci/config\n-        - id: check-ref\n-          name: check whether CI is enabled for ref\n-          run: |\n-            enabled=yes\n-            if test -x config-repo/ci/config/allow-ref &&\n-               ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n-            then\n-              enabled=no\n-            fi\n-            echo \"::set-output name=enabled::$enabled\"\n+    runs-on: ubuntu-latest\n+    outputs:\n+      enabled: ${{ steps.check-ref.outputs.enabled }}\n+    steps:\n+      - name: try to clone ci-config branch\n+        continue-on-error: true\n+        run: |\n+          git -c protocol.version=2 clone \\\n+            --no-tags \\\n+            --single-branch \\\n+            -b ci-config \\\n+            --depth 1 \\\n+            --no-checkout \\\n+            --filter=blob:none \\\n+            https://github.com/${{ github.repository }} \\\n+            config-repo &&\n+            cd config-repo &&\n+            git checkout HEAD -- ci/config\n+      - id: check-ref\n+        name: check whether CI is enabled for ref\n+        run: |\n+          enabled=yes\n+          if test -x config-repo/ci/config/allow-ref &&\n+             ! config-repo/ci/config/allow-ref '${{ github.ref }}'\n+          then\n+            enabled=no\n+          fi\n+          echo \"::set-output name=enabled::$enabled\"\n \n   windows-build:\n     needs: ci-config\n\nbase-commit: 675a4aaf3b226c0089108221b96559e0baae5de9\n-- \ngitgitgadget\n"},{"id":"404192","messageId":"xmqqimdb95m6.fsf@gitster.c.googlers.com","threadId":"54012","inReplyTo":"pull.823.v2.git.git.1598002046754.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] ci: fix inconsistent indentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-08-21T19:11:13Z","receivedAt":"2020-08-21T19:11:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}