Skip to content

pop: discard backups after restoring; speed up pop and push --refresh - #3

Merged
dumbmoron merged 5 commits into
mainfrom
perf
Nov 18, 2026
Merged

dumbmoron merged 5 commits into
mainfrom
perf

Conversation

@dumbmoron

Copy link
Copy Markdown
Member

No description provided.

refresh -f on a stack without Index: lines could emit a file twice, once
from the fresh diff and once from the old patch. diff of a lower patch
now takes files changed by later patches from the next patch's backup,
which also works for stacks pushed by gnu quilt without q's metadata.
diff -z and refresh -z no longer trust an expected state recorded for a
different patch text, like after checking the patch file out again
pop restored each file by copying its backup through a userspace buffer
and never removed .pc/<patch>. the stale backups kept files the patch no
longer touches tracked, so a later refresh pulled upstream changes into
the patch and pop reverted them. pop, delete and a failed push now
rename backups into place (falling back to a copy), touch restored files
like quilt pop -t, and remove .pc/<patch> and .pc/.q/<patch>

the expected state also records dev, inode, size, mtime and ctime of the
patch file and each tracked file. a file whose stat still matches and is
older than the record itself (git's racy-clean rule) isn't read again,
and push --refresh keeps the copies when only the patch text changed.
on a 377 patch stack on macos, pop -a goes from ~2.0s to ~1.55s and
push -a --refresh from ~7.2s to ~5.5s
re-run with tools/benchmark.sh on the same 9950X
@dumbmoron
dumbmoron requested a review from wukko November 17, 2026 12:29
wukko
wukko previously approved these changes Nov 17, 2026
the compat job runs the stack tests against gnu quilt, which keeps no
.pc/.q metadata and leaves empty .pc/<dir> behind for nested patch
names. drop the .pc/.q asserts, and skip the nested backup directory
test there since removing those directories is q's own tidying
savannah's https frontend keeps returning 502 while its git:// endpoint
still works
@dumbmoron
dumbmoron merged commit 50a448d into main Nov 18, 2026
9 checks passed
@dumbmoron
dumbmoron deleted the perf branch November 18, 2026 09:44
@dumbmoron
dumbmoron restored the perf branch November 19, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants