| #!/bin/bash |
| # Copyright 2025 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| #### CATEGORY=Source |
| ### Run git commands in the Fuchsia tree. |
| ## |
| ## usage: fx git <args> |
| ## |
| ## This command delegates to the `git` binary found in the PATH. |
| ## |
| ## In a standard checkout, this will be the system git. |
| ## |
| ## In a Cog workspace (or other non-standard environment), `fx` may inject |
| ## a git-polyfill into the PATH (see scripts/cog/git-polyfill/README.md). |
| ## In that case, this command will invoke the polyfill, allowing `fx git` |
| ## to work transparently even when a real .git directory is missing. |
| |
| git "$@" |