| commit | 50c6226075258736c3e869242345a59ed7064da4 | [log] [tgz] |
|---|---|---|
| author | Kaushik Lingarkar <kaushikl@qti.qualcomm.com> | Mon Nov 03 19:58:26 2025 -0800 |
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Dec 05 10:35:46 2025 -0800 |
| tree | c7173b22519ed515e23c386e6a800be5d9603377 | |
| parent | 1e4b2887a760e84f3b453c9caadcae67b701eac9 [diff] |
Prevent leftover bare gitdirs after failed sync attempts The gitdir for a project may be left in a state with bare=true due to a previous failed sync. In this state, during a subsequent sync attempt, repo will skip initializing the gitdir (since the directory already exists) and directly attempt to checkout the worktree, which will fail because the project is bare. To reduce the chance of this happening, initialize the gitdir in a temp directory and move it once it is ready. Bug: 457478027 Change-Id: I4767494a3a54e7734174eae3a0d939fa9d174288 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/524203 Tested-by: Kaushik Lingarkar <kaushikl@qti.qualcomm.com> Commit-Queue: Kaushik Lingarkar <kaushikl@qti.qualcomm.com> Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.
Please use the repo-discuss mailing list or issue tracker for questions.
You can file a new bug report under the “repo” component.
Please do not e-mail individual developers for support. They do not have the bandwidth for it, and often times questions have already been asked on repo-discuss or bugs posted to the issue tracker. So please search those sites first.
Many distros include repo, so you might be able to install from there.
# Debian/Ubuntu. $ sudo apt-get install repo # Gentoo. $ sudo emerge dev-vcs/repo
You can install it manually as well as it's a single script.
$ mkdir -p ~/.bin $ PATH="${HOME}/.bin:${PATH}" $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo $ chmod a+rx ~/.bin/repo