Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-868

Skara should ignore .gitconfig and /etc/gitconfig

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9
    • Component/s: cli
    • Labels:
      None

      Description

      Many git users are configuring init.defaultBranch to some value other than "master", usually "main", perhaps by adding to /etc/gitconfig

      ```
      [init]
      defaultBranch = main
      ```

      This causes many tests to fail, e.g.

      ```
      RepositoryTests > [1] GIT FAILED
          org.opentest4j.AssertionFailedError: expected: <[master]> but was: <[main]>
      ```

      When I reset this with e.g.
      git config --global init.defaultBranch master; sh gradlew :vcs:test
      the results for :vcs:test go from

      281 tests completed, 33 failed, 11 skipped
      to
      281 tests completed, 11 failed, 11 skipped

      Likewise, you can surely repro using

      ```
      git config --global init.defaultBranch main
      ```

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ihse Magnus Ihse Bursie
              Reporter:
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: