-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: set deterministic change id and add lore link to commits
Problem: Non-deterministic change ids mean we get duplicate changes uploaded to Gerrit for the same patch if the Bridge gets restarted. When issue #14 is implemented, this will not matter as much, but there's still a chance for updates not to be persisted in the DB. Solution: Use a deterministic change id, i.e. "I" + <commit sha of v1>. If we try and create a Gerrit change for the same patch, I'm assuming the collision with the pre-existing change id will prevent us from doing so. Alternative: As noted in the file, we could consider using a `applypatch-msg` hook. But we can do more if we edit the commit directly from Python, since we have access to more information, e.g. the lore link. Add in a "Lore-Link" footer while we're here to demonstrate this. This iteration of the code is essentially a direct translation of what I had originally prototyped in bash for the hook.
- Loading branch information
Showing
2 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters