The flag to filter for branches was renamed in git 2.46.0 [1] from
`-h` to `-b`. This causes previous versions of git to fail when running
ls-remote.
To be compatible across a version upgrade, a second git call would be
required to retrieve the version and determine the correct flag.
However, the filter feature is not used yet and can also be solved by
specifying the absolute ref path within the recipe. Therefore, this
change removes ls-remote's filter flags.
[1] https://git-scm.com/docs/git-ls-remote/2.42.0
R=machenbach@chromium.org, gavinmak@google.com
Bug: none
Change-Id: I840fb3ac56daf47c798d5c32f00de841b8db2771
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6028418
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Call `git ls-remote` to determine the head revision for a branch, or
the revision for a tag. The method is useful for bots which do not
require a checkout.
Bug: none
Change-Id: Ibc01d1fb9c2714bd4d719159dbdaf3d7684ea1e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6012563
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>