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
F166530955: D28631.id83791.diff
Fri, Aug 14, 2:47 AM
F166507402: D28631.id83791.diff
Thu, Aug 13, 9:03 PM
F166471227: D28631.id84207.diff
Thu, Aug 13, 6:35 PM
F166420353: D28631.id84207.diff
Thu, Aug 13, 12:29 PM
Unknown Object (File)
Wed, Aug 12, 5:33 PM
Unknown Object (File)
Tue, Aug 11, 11:42 PM
Unknown Object (File)
Mon, Jul 20, 11:26 PM
Unknown Object (File)
Jul 8 2026, 5:10 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