Repository navigation
Split Util::repositoryPassClimbsTo and ImitatePass::finishReencrypt - #2424
Conversation
Third batch for #2157 (lizard CCN 39 and 37). The code and its comments move into helpers: - util.cpp, file-local next to openFollowedRegularFile(): gitWalkStart() (the real path git walks from), passCeilingFor() (pass's GIT_CEILING_DIRECTORIES as git reads it), and the former lambdas isGitDirectory() and repositoryAt(), with the Found enum at namespace scope. - ImitatePass: reportFailedEntries(), settleAutoPushHold() (the removed- reader record and the auto-push hold, returning whether an entry is still read by someone removed), reportReencryptOutcome() (status line and the push after a run) and rememberUnexpected(). No behaviour change. repositoryPassClimbsTo 39 -> 12, finishReencrypt 37 -> 13; every new helper is below 15. Part of #2157. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anne Jan Brouwer <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
nogeenhenk
left a comment
There was a problem hiding this comment.
Reviewed at 3563ad6. The third refactor for #2157; as with #2417 and #2418 I checked that only the structure changes.
Util::repositoryPassClimbsTo:gitWalkStart()returns empty exactly where the old loop returned early (no part of the path exists), so the newstart.isEmpty()check adds no case;passCeilingFor(),isGitDirectory()andrepositoryAt()are the old code and lambdas unchanged, and the walk below them is identical.ImitatePass::finishReencrypt: the steps run in the old order.agreedRunis still read beforem_reencryptAgreedis cleared,settleAutoPushHold()returns thestillReadthe status line used, andrememberUnexpected()still runs after the agreed set is cleared, as before.- The only removed lines that do not come back are the renamed or reshaped declarations (
start, the lambdas, theFoundenum moved to namespace scope) and the failure report now readingfailedinstead ofresult.failed. Thetr()calls stay inImitatePass, so translations are unchanged.
Nothing to add.
Generated by Claude Code
Summary
Third batch for #2157; the code and comments move into helpers, no behaviour change.
Util::repositoryPassClimbsTo(CCN 39 → 12): file-local helpers in the existing non-Windows namespace next toopenFollowedRegularFile():gitWalkStart(), the real path git walks from (a store that does not exist yet: its nearest existing folder resolved, the rest appended);passCeilingFor(), pass'sGIT_CEILING_DIRECTORIESas git reads it;isGitDirectory()andrepositoryAt(), the former lambdas, withFoundat namespace scope.ImitatePass::finishReencrypt(CCN 37 → 13):reportFailedEntries();settleAutoPushHold(), the removed-reader record and the auto-push hold, which returns whether an entry in the run's folder is still read by someone removed;reportReencryptOutcome(), the status line and the push after a run;rememberUnexpected().agreedRunis still computed infinishReencrypt()beforem_reencryptAgreedis cleared, and passed on. The order of every step is unchanged.Test plan
make checkin a scratchHOME/GNUPGHOMEwith a Git identity: 36 suites, 0 failuresdoxygen Doxyfileprints no warningsclang-formatcleanuv tool run lizard src/util.cpp src/imitatepass.cpp: all touched functions below CCN 15Part of #2157.
🤖 Generated with Claude Code
Summary by CodeRabbit