Re: Bug: Git-Alias is callable from outside a git repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Niklas,

On Wed, 10 Aug 2022, Niklas wrote:

> Steps to reproduce:
>
> 1. Having the following global .gitconfig
>
> [alias]
>     f = "!echo "test""

That quoting is a big bogus.

>
> 2. Calling `git f` in a folder which does not belong to a git repo
>
> Expected Behavior:
> Seeing some message like like
> `fatal: not a git repository (or any parent up to mount point /)`
>
> Actual Behavior:
>
> Prints "test"

This is by design, and definitely not a bug. It even allows you to build
relatively complex aliases that work on multiple worktrees, or even no
worktree at all.

Why would a Git alias have to be bound to any specific Git repository?

Ciao,
Johannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux