Skara should ignore .gitconfig and /etc/gitconfig

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 0.9
    • Affects Version/s: None
    • Component/s: 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
      ```

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

              Created:
              Updated:
              Resolved: