Re: [PATCH v2 4/4] completion: be nicer with zsh

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

 



2012/1/30 Junio C Hamano <gitster@xxxxxxxxx>:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:
>> Felipe Contreras wrote:
>> ..., so I suppose consistency is the only reason to
>> prefer one over another.
>
> Yes. And the script may probably use [[ very heavily.
>
> Early return after || i.e.
>
>        A || return
>        B
>
> simply looks ugly and misleading, especially when the remainder B is just
> a single line.  But I stopped caring about the styles in this particular
> script long time ago, so...

What would you rather use?

[ "$__git_merge_strategies" ] &&
__git_merge_strategies=$(__git_list_merge_strategies)

That's 90 characters long. Although much better without the 2>/dev/null.

if [ "$__git_merge_strategies" ]; then
  __git_merge_strategies=$(__git_list_merge_strategies)
fi

That's even more lines =/

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]