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

Skara should ignore .gitconfig and /etc/gitconfig

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 0.9
    • None
    • cli
    • None

      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
      ```

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

              Created:
              Updated:
              Resolved: