Bug 40079: make `fetch: if_needed` fetch existing branches

Currently, fetch: if_needed will avoid doing a fetch if git_hash can be resolved to a valid git revision. If git_hash is a hash or a tag, there is no need to do a fetch, since those are not supposed to be changing after a fetch. However, a branch is expected to change, so doing a fetch in this case is useful.

How tested

I tested the following:

  • ran ~/rbm/rbm showconf --target torbrowser-linux-x86_64 --target alpha firefox version and saw that a git fetch is being run on the first time (with an outdated git clone) and not the following times
  • after commenting the line fetch: 1 in the nightly target in rbm.conf, ran ~/rbm/rbm showconf --target torbrowser-linux-x86_64 --target nightly firefox version and saw that a git fetch is being run each time.

/closes #40079 (closed)

Merge request reports

Loading