diff options
author | Jeff King <peff@peff.net> | 2020-09-10 21:50:37 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2020-09-11 12:27:35 +0300 |
commit | eb678253e00a730eba6c1596dd167e34f6682513 (patch) | |
tree | 2707f10cbdd4cc45cbca9b16551df5e1dbac45cc /lib | |
parent | a72b90076bc19a1b377e35e8f3a9622fda64025b (diff) |
tasks/index: prefer "HEAD" over "master"
When there are no tags, we look for documentation in the hard-coded
master branch. This is unlikely for git.git, but presumably triggers for
translation repos. We should be more flexible and just use HEAD in this
case, which will do the right thing if the translation repos switch
their default branch.
Note that we don't to do anything clever here like we did for the
"book2" case. We're already using the commit API for the remote index,
so we're free to just look up the name "HEAD". And likewise the local
case is just running Git commands, so that name is fine.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/index.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/index.rake b/lib/tasks/index.rake index 98a161c5..bbb0e2ad 100644 --- a/lib/tasks/index.rake +++ b/lib/tasks/index.rake @@ -304,7 +304,7 @@ def github_index_doc(index_fun, repo) tags = tags.select { |t| t.name == tagname } end else - tags=[Struct.new(:name).new("heads/master")] + tags=[Struct.new(:name).new("HEAD")] end tags.collect do |tag| # extract metadata @@ -340,7 +340,7 @@ def local_index_doc(index_fun) tags = tags.select { |t| t == tagname } end else - tags=["master"] + tags=["HEAD"] end tags.collect do |tag| # extract metadata |