Run update-indices; see only that commit get indexed.
Amend a, producing a'.
Run update-indices; recoil in horror as entire history gets reindexed all over again.
So basically what it's doing here is see that a, the last-indexed hash, is not an ancestor of a', so it goes all the way back to the beginning of the history.
What we would need to do here to make this entirely robust is make the indexer aware not only of the last-indexed hash, but actually maintain a stack of them. It would then need to effectively rollback the effect of a on the index and then re-apply a' on top of it. That should be possible in prod and in dev only because the "content" repo doesn't get replaced per-deploy; it's just one long-lived thing.
In addition to maintaining Redis-backed stack, may need to use reflog in order to figure out what actually happened.
Alternative solution: disallow amends on indexed commits (require separate commit on top).
Noticed this in local development testing:
a
.update-indices
; see only that commit get indexed.a
, producinga'
.update-indices
; recoil in horror as entire history gets reindexed all over again.So basically what it's doing here is see that
a
, the last-indexed hash, is not an ancestor ofa'
, so it goes all the way back to the beginning of the history.What we would need to do here to make this entirely robust is make the indexer aware not only of the last-indexed hash, but actually maintain a stack of them. It would then need to effectively rollback the effect of
a
on the index and then re-applya'
on top of it. That should be possible in prod and in dev only because the "content" repo doesn't get replaced per-deploy; it's just one long-lived thing.In addition to maintaining Redis-backed stack, may need to use reflog in order to figure out what actually happened.
Alternative solution: disallow amends on indexed commits (require separate commit on top).