summaryrefslogtreecommitdiff
path: root/sys/src/cmd/aux/cddb.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-07-17 00:10:44 +0000
committerOri Bernstein <ori@eigenstate.org>2021-07-17 00:10:44 +0000
commit2204634275cbb3337cfc7cc994b57f9aa4017d0d (patch)
tree37184084a99927c14e83df7993459014ac9786c5 /sys/src/cmd/aux/cddb.c
parentfad1b3f7f77f08764f0e32f8ce18bee16da3aa69 (diff)
downloadplan9front-2204634275cbb3337cfc7cc994b57f9aa4017d0d.tar.xz
git/fetch: ensure we clean packfiles on failure
When pulling into a git repository that is group writable as a non-owner, the pack file is left in place because we do not have permission to remove it. We also leave it behind if we bail out early due to an error, or due to only listing the changes. This pushes down the creation of the file, and cleans it up on error. thanks to Anthony Martin for spotting the bug. git/fetch: ensure we clean packfiles on failure When pulling into a git repository that is group writable as a non-owner, the pack file is left in place because we do not have permission to remove it. We also leave it behind if we bail out early due to an error, or due to only listing the changes. This pushes down the creation of the file, and cleans it up on error. Also, while we're here, clean up index caching, and ensure we close the fd in all cases. thanks to Anthony Martin for spotting the bug.
Diffstat (limited to 'sys/src/cmd/aux/cddb.c')
0 files changed, 0 insertions, 0 deletions