Re: [PATCH] fetch: Fix segfault on pull --set-upstream outside a branch.

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

 



On Tue, Jul 6, 2021 at 1:57 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Clemens Fruhwirth <clemens@xxxxxxxxxxxxx> writes:
>
> > branch_get("HEAD") can return NULL, when we are outside a branch and
> > the user calls pull --set-upstream. Catch this case and warn the user
> > to avoid a segfault.
>
> Nit.  What do you mean by "outside a branch"?  If you mean "when the
> HEAD is detached", please say so, and use the same terminology in
> your warning message.

Also, adding a new test, probably to `t/t5553-set-upstream.sh`, would
be welcome. The test can likely be as simple as ensuring that the
command does not crash, and perhaps check that the outcome was as
expected.



[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