Skip to content
  • Karel Koci's avatar
    8a79817c
    helpers/generate_common.sh: use HEAD instead of master · 8a79817c
    Karel Koci authored and Josef Schlehofer's avatar Josef Schlehofer committed
    The master is not default for all repositories and there are some
    existing repositories that migrated to the different default branch
    name. The git provides instead generic alias HEAD for current branch
    that on remote is resolved to the default branch and thus to master or
    what it is called in that project. The issue is that while HEAD works
    when we fetch we can't use it for checkout because it references the
    local HEAD in that case. We have to use FETCH_HEAD instead as that is
    the reference git gives to head fetched from the remote server.
    8a79817c
    helpers/generate_common.sh: use HEAD instead of master
    Karel Koci authored and Josef Schlehofer's avatar Josef Schlehofer committed
    The master is not default for all repositories and there are some
    existing repositories that migrated to the different default branch
    name. The git provides instead generic alias HEAD for current branch
    that on remote is resolved to the default branch and thus to master or
    what it is called in that project. The issue is that while HEAD works
    when we fetch we can't use it for checkout because it references the
    local HEAD in that case. We have to use FETCH_HEAD instead as that is
    the reference git gives to head fetched from the remote server.
Loading