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)
Tue, Sep 30, 1:41 AM
Unknown Object (File)
Mon, Sep 29, 11:14 PM
Unknown Object (File)
Aug 22 2025, 11:14 PM
Unknown Object (File)
Aug 11 2025, 2:14 PM
Unknown Object (File)
Aug 5 2025, 6:02 PM
Unknown Object (File)
Aug 5 2025, 3:48 PM
Unknown Object (File)
Aug 1 2025, 5:50 PM
Unknown Object (File)
Jul 26 2025, 12:56 PM
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