Page MenuHomeFreeBSD

git-arc: Globally save and restore the git checkout head
ClosedPublic

Authored by markj on Feb 12 2021, 9:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 6, 7:50 AM
Unknown Object (File)
Wed, Jul 3, 2:33 AM
Unknown Object (File)
Mon, Jul 1, 1:00 AM
Unknown Object (File)
Sat, Jun 15, 7:51 AM
Unknown Object (File)
Fri, Jun 7, 12:46 PM
Unknown Object (File)
Jun 7 2024, 8:51 AM
Unknown Object (File)
May 14 2024, 3:21 AM
Unknown Object (File)
May 13 2024, 3:28 AM
Subscribers

Details

Summary

This script uses -e, so it's prone to exiting in awkward places. In
particular, if arc diff fails, the script just exits without restoring
the checkout.

Mitigate this for now by using a global variable to record the previous
checkout and use a trap handler to restore it in the face of errors. A
better solution might be to use arc diff's --head parameter but that
will require more testing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable