# [BUG] fetch/pull -h ABORT out of a git repo

3 messages from 2022-03-02 to 2022-03-02. Participants: lilinchao@oschina.cn, Junio C Hamano.
Thread: https://gitlist.dev/t/57495

## lilinchao@oschina.cn, 2022-03-02 10:45

Subject: [BUG] fetch/pull -h ABORT out of a git repo
Message-ID: <2022030218445028804916@oschina.cn>
URL: https://gitlist.dev/e/2022030218445028804916%40oschina.cn

```
Hi,

When I run git fetch -h or git pull -h out side of a git repo, I can't get any help message
but some bug messages:

"$ git pull -h                                                                                                                            
BUG: repo-settings.c:21: Cannot add settings for uninitialized repository
[1]    17589 abort      git pull -h

$ git pull -h
BUG: repo-settings.c:21: Cannot add settings for uninitialized repository
[1]    17737 abort      git pull -h
"

Apparently, the process aborted unexpectedly. I think this is a BUG.

This was introduced after v2.34.1, the related commits are:

5a4e0547e2386f9bf0565316d7b751fe9459898b
44c7e62e51e504c060844360fc56b613cfc1beea


--------------
lilinchao@oschina.cn
```

## lilinchao@oschina.cn, 2022-03-02 11:07

Subject: Re: [BUG] fetch/pull -h ABORT out of a git repo
Message-ID: <2022030219025261342425@oschina.cn>
URL: https://gitlist.dev/e/2022030219025261342425%40oschina.cn
In-Reply-To: <2022030218445028804916@oschina.cn>

```

>Apparently, the process aborted unexpectedly. I think this is a BUG.
>
>This was introduced after v2.34.1, the related commits are:
>
>5a4e0547e2386f9bf0565316d7b751fe9459898b
>44c7e62e51e504c060844360fc56b613cfc1beea

Since I found more commands will abort, I think the main relevant
commit is 44c7e62e [1]

[1]:
https://lore.kernel.org/git/fd28be71ca47a71b224a5b08cb81f903ada6a2bd.1638806161.git.gitgitgadget@gmail.com/
```

## Junio C Hamano, 2022-03-02 19:22

Subject: Re: [BUG] fetch/pull -h ABORT out of a git repo
Message-ID: <xmqqczj4kvl8.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqczj4kvl8.fsf%40gitster.g
In-Reply-To: <2022030219025261342425@oschina.cn>

```
"lilinchao@oschina.cn" <lilinchao@oschina.cn> writes:

>>Apparently, the process aborted unexpectedly. I think this is a BUG.
>>
>>This was introduced after v2.34.1, the related commits are:
>>
>>5a4e0547e2386f9bf0565316d7b751fe9459898b
>>44c7e62e51e504c060844360fc56b613cfc1beea
>
> Since I found more commands will abort, I think the main relevant
> commit is 44c7e62e [1]
>
> [1]:
> https://lore.kernel.org/git/fd28be71ca47a71b224a5b08cb81f903ada6a2bd.1638806161.git.gitgitgadget@gmail.com/

Thanks; I think the fix 059fda19 (checkout/fetch/pull/pack-objects:
allow `-h` outside a repository, 2022-02-08) is already in the
'master/main' branch.




```
