Commit 17352fb
Chris McDonnell
Add fallback to detecting main branches for fresh repositories
All other attempts to determine the main branch fail on a fresh
repository right after `git init` because there are no actual commits
that these branches point to.
This does return `master` instead a full name like `refs/heads/master`
which I don't think is an issue, but might be?1 parent d1d2bb2 commit 17352fb
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
| |||
0 commit comments