I would do similar but include the commit timestamp and/or words from the subject to help locate the code if the commit id can't be retrieved.
Rebasing and other means of moving patches (email etc, adding signed-off-by) can cause the original commit id to become invalid, and eventually unretrievable.
Rebasing and other means of moving patches (email etc, adding signed-off-by) can cause the original commit id to become invalid, and eventually unretrievable.