Skip to content

feat: aliases-git v1.24.0 - add -NoVerify switch to push aliases - #272

Merged
szymonos merged 2 commits into
mainfrom
aliases-git-1232
Jul 23, 2026
Merged

feat: aliases-git v1.24.0 - add -NoVerify switch to push aliases#272
szymonos merged 2 commits into
mainfrom
aliases-git-1232

Conversation

@szymonos

@szymonos szymonos commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a -NoVerify switch to every aliases-git function that runs git push or git commit, appending --no-verify to skip the corresponding hooks (pre-push / pre-commit). Chosen over name-encoded variants (gpushnv, gcmsgnvp, ...) to avoid a combinatorial explosion of alias names - one orthogonal switch instead.
  • Semantics: the switch targets the last command in the chain. gcam -NoVerify skips the commit hook; gcamp -NoVerify skips the push hook; gcamp 'msg' --no-verify -NoVerify does both (raw --no-verify flows to the commit, switch to the push).
  • Centralized in the helper: Invoke-WriteExecCommand gained the -NoVerify switch and appends --no-verify after all arguments - the correct position for both git push and git commit -m 'msg' (must follow the message). Single-command aliases just declare the switch and splat; no per-function string-building.
  • Multi-command functions (gpushoat, gmgo, grbo, gbdo, gbdo!) keep embedding --no-verify on the specific push, since a blanket append would wrongly hit a sibling fetch/merge/branch --delete.
  • Combos/wrappers forward -NoVerify to the right sub-command (inner commit vs. push).
  • Bump aliases-git ModuleVersion 1.23.1 -> 1.24.0 (MINOR: new backward-compatible capability).
  • chore: bump dependencies - routine uv.lock refresh (certifi, platformdirs).

Test plan

  • make lint-diff - all pre-commit hooks green
  • Module parses clean ([Parser]::ParseFile) and imports without error
  • -WhatIf smoke tests across all categories confirm correct --no-verify placement:
    • gcmsg 'msg' -NoVerify -> git commit -m 'msg' --no-verify (after the message)
    • gpush -NoVerify -> git push --no-verify
    • gcamp 'msg' -NoVerify -> commit clean, git push --no-verify (last-in-chain)
    • gcamp 'msg' --no-verify -NoVerify -> both commit and push get --no-verify
    • gpushoat -NoVerify -> --no-verify on both push legs of the &&
  • Reviewer: sanity-check the helper-level append vs. the multi-command manual paths

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the aliases-git PowerShell module by adding a -NoVerify switch to push-related alias functions so callers can append git push --no-verify to skip pre-push hooks, and bumps the module version accordingly. It also refreshes a couple of Python lockfile dependencies.

Changes:

  • Add -NoVerify to core push aliases and commit+push combo aliases, forwarding the switch only to push invocations.
  • Extend -NoVerify support to helper-module push paths (merge/rebase flows and remote branch deletion helpers).
  • Bump aliases-git ModuleVersion to 1.24.0 and refresh uv.lock (certifi, platformdirs).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
uv.lock Refresh locked dependency versions (certifi, platformdirs).
modules/aliases-git/Functions/helper.ps1 Add -NoVerify handling to helper push/delete flows.
modules/aliases-git/Functions/alias.ps1 Add -NoVerify to push aliases and commit+push combos (forwarded to push only).
modules/aliases-git/aliases-git.psd1 Bump module version to 1.24.0.
Comments suppressed due to low confidence (1)

modules/aliases-git/Functions/helper.ps1:107

  • --no-verify is being appended after the branch/refspec (e.g. git push --delete <remote> <branch> --no-verify). In git push, options must come before the remote/refspecs; placing --no-verify after the branch is likely parsed as another refspec and can fail.
        $commands.Add("git push --delete $remote $Branch$($NoVerify ? ' --no-verify' : '')")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/aliases-git/Functions/helper.ps1
Comment thread modules/aliases-git/Functions/helper.ps1 Outdated
Comment thread modules/aliases-git/Functions/alias.ps1 Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Comment thread modules/aliases-git/Functions/internal.ps1

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Comment thread modules/aliases-git/Functions/internal.ps1
@szymonos
szymonos merged commit 53597a0 into main Jul 23, 2026
1 check passed
@szymonos
szymonos deleted the aliases-git-1232 branch July 23, 2026 06:04
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