Repository navigation
fix(git-push): only include new changes since last push - #144
Merged
Merged
Conversation
atomic git push was re-counting every atomic change in the view each time, producing commits like "20 Atomic changes" that grew with every push. It also capped the synthesized message at 20 entries and made redundant load_change calls for messages already loaded via headers. Changes: - Track the last pushed Atomic-State by walking git history (first-parent mainline) for a matching Atomic-View trailer, then use that state to find the position in the view's history. Only changes after that position are included in the commit body and Atomic-Changes trailer. - Atomic-State always carries the latest view state so the next push can find this commit as its starting point. - synthesize_message now reads from the already-loaded HistoryEntry headers instead of making redundant load_change calls, and the .take(20) cap is removed since the new-change set is naturally bounded. - Atomic-Changes trailer lists only the new change hashes (no more (+N earlier) truncation). - Added parse_trailer helper + tests. - Direct git commits (no Atomic trailers) are skipped by the history walk.
geekgonecrazy
force-pushed
the
fix/git-push-incremental-changes
branch
from
August 2, 2026 00:52
38775e0 to
80fe0c4
Compare
vinceblock99
approved these changes
Aug 2, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
atomic git pushwas re-counting every atomic change in the view each time it ran, producing commits like20 Atomic changesthat grew with every push. It also didn't carry change messages over reliably — it capped at 20 entries and made redundantload_changecalls for messages already loaded via headers.You can see this clearly in the rocketchat-tui repo — each push shows "7 Atomic changes", "8 Atomic changes"... up to "20 Atomic changes", with the same messages repeating and accumulating.
Solution
Incremental change tracking
find_last_pushed_state()walks git history (first-parent mainline) to find the most recent commit with a matchingAtomic-Viewtrailer, then parses itsAtomic-State(a Merkle hash).start_idx— only changes after that position are included in the commit body andAtomic-Changestrailer.Atomic-Statealways carries the latest view state so the next push can find this commit as its starting point.Change messages
synthesize_message()now reads from the already-loadedHistoryEntry::message()(viaload_headers(true)) instead of making redundantrepo.load_change()calls..take(20)cap is removed — all new changes' messages are included (naturally bounded by what's new since the last push).Additional improvements
Atomic-Changestrailer lists only the new change hashes (no more(+N earlier)truncation)."Working copy changes".parse_trailer()helper + tests.Testing
cargo clippyclean (no new warnings)cargo buildclean