summaryrefslogtreecommitdiffstats
path: root/git_command.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-11-18 15:53:17 -0500
committerMike Frysinger <vapier@google.com>2022-08-22 19:34:46 +0000
commit07d21e6bde9bd7efdfb8f25f2ed23f023daa5c1f (patch)
tree0302f2c7f2352c949329cc1764ad23899f4dc303 /git_command.py
parent076d54652e0025e1360f66e483926477b910b02e (diff)
downloadgit-repo-07d21e6bde9bd7efdfb8f25f2ed23f023daa5c1f.tar.gz
project: initialize new manifests in temp dirs
If initializing the manifest fails for any reason, don't leave it in a half complete state. This can cause problems if/when the user tries to reinit because different codepaths will be taken. For example, if we initialize manifests.git and don't finish probing the remote to see what default branch it uses, we end up always using "master" even if that isn't what the remote uses. To avoid all of this, use .tmp dirs when initializing, and rename to the final path only after we complete all the right steps. We should roll this out to all projects we clone, but start with the manifest project for now. Bug: https://crbug.com/gerrit/13526 Bug: https://crbug.com/gerrit/15805 Change-Id: I0214338de69ee11e090285c6b0b211052804af06 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343539 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_command.py')
0 files changed, 0 insertions, 0 deletions