Skip to content

[AIR-3026] qs: GetRootFolder is called in many places. Call it once#131

Merged
host6 merged 1 commit intountillpro:mainfrom
host6:AIR-3026-qs-GetRootFolder-is-called-in-many-places-Call-it-pr
Feb 23, 2026
Merged

[AIR-3026] qs: GetRootFolder is called in many places. Call it once#131
host6 merged 1 commit intountillpro:mainfrom
host6:AIR-3026-qs-GetRootFolder-is-called-in-many-places-Call-it-pr

Conversation

@host6
Copy link
Collaborator

@host6 host6 commented Feb 23, 2026

AIR-3026 qs: GetRootFolder is called in many places. Call it once
https://untill.atlassian.net/browse/AIR-3026

@augmentcode
Copy link

augmentcode bot commented Feb 23, 2026

🤖 Augment PR Summary

Summary: This PR reduces redundant repo-root discovery when setting up git hooks, avoiding repeated git rev-parse --show-toplevel subprocess calls.

Changes:

  • Refactors `gitcmds/hook.go` helpers to accept a precomputed rootDir instead of calling GetRootFolder() multiple times.
  • Updates call chains in local/global pre-commit hook setup and large-file-hook maintenance to resolve the root once per operation.
  • Simplifies local hook-path computation by passing the resolved root directory down.
  • Extends status parsing to handle the MD porcelain state alongside deletions.
  • Adds archived uspec documentation describing the motivation and implementation plan.

Technical Notes: Net effect is fewer GetRootFolder()/git invocations in common hook flows while keeping behavior otherwise consistent.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@host6 host6 merged commit 1aaafd5 into untillpro:main Feb 23, 2026
0 of 3 checks passed
@host6 host6 deleted the AIR-3026-qs-GetRootFolder-is-called-in-many-places-Call-it-pr branch February 23, 2026 09:17
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.

1 participant