diff options
author | Mike Frysinger <vapier@google.com> | 2019-11-11 04:34:16 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2019-11-12 03:44:33 +0000 |
commit | f4545126197781beb03bb0fd47e7f24ce5af6ca8 (patch) | |
tree | c648d5a0a508281c146d1db1f21960f8107342d4 /git_refs.py | |
parent | b466854bed4348a210fec5870023c1a44cd830b5 (diff) | |
download | git-repo-f4545126197781beb03bb0fd47e7f24ce5af6ca8.tar.gz |
sync: make .git init more robust
Hitting Ctrl-C in the middle of this func will leave the .git in a
bad state that requires manual recovery. The code tries to catch
all exceptions and recover by deleting the incomplete .git dir, but
it omits KeyboardInterrupt which Exception misses.
We could add that to the recovery path, but we can make this more
robust with a different approach: set up everything in .git.tmp/
and only move it to .git/ once we've fully initialized it.
Change-Id: I0f5b97f2e19fc39cffc3e5e23993a2da7220f4e3
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/244733
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_refs.py')
0 files changed, 0 insertions, 0 deletions