Re: [PATCH] checkout: Don't crash when switching away from an invalid branch.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 7, 2008, 23:06 UTC
- Message-ID
- <7vbpwrf85x.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <87od0r9nnj.fsf@wine.dyndns.org>
Alexandre Julliard <julliard@winehq.org> writes:
Show 8 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > ... >> Why not >> old_desc ? old_desc : "(invalid)" >> ? > > IMO it looks more friendly to not display a branch that doesn't exist, > rather than printing something like (invalid) or (null).
Actually I think it is a good idea to remind that you were in a funny state.
For that matter, dying without removing the trace of that funny state might be even preferrable if you need to do postmortem to figure out why you got into such a funny state to begin with, but not everybody uses git to debug git. I think Dscho's suggestion is a reasonable middle ground.