[PR #378] Handle git aliases in hook processing #434

Closed
opened 2026-03-02 04:13:37 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/378

State: closed
Merged: No


Summary

  • resolve git aliases before dispatching hooks so aliased commands still trigger hook logic
  • expand aliases using git config (ignoring shell aliases) and prepend alias args to original args
  • add tests covering alias expansion and argument passthrough

Rationale

Commands invoked via git aliases (e.g., , ) were bypassing git-ai hooks. Resolving aliases to their underlying commands ensures hooks still run.

Changes

  • resolve alias definitions and rewrite parsed command/args prior to hook dispatch
  • ignore shell-style aliases
  • add unit tests for alias expansion behavior

Test Plan

  • unit tests added for alias expansion

Closes #377


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/378 **State:** closed **Merged:** No --- ## Summary - resolve git aliases before dispatching hooks so aliased commands still trigger hook logic - expand aliases using git config (ignoring shell aliases) and prepend alias args to original args - add tests covering alias expansion and argument passthrough ## Rationale Commands invoked via git aliases (e.g., , ) were bypassing git-ai hooks. Resolving aliases to their underlying commands ensures hooks still run. ## Changes - resolve alias definitions and rewrite parsed command/args prior to hook dispatch - ignore shell-style aliases - add unit tests for alias expansion behavior ## Test Plan - unit tests added for alias expansion Closes #377 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/378" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#434
No description provided.