From: SZEDER Gábor Date: Tue, 08 Jul 2008 23:51:53 GMT Subject: Re: [PATCH] bash: offer only paths after '--' Message-ID: <20080708235153.GD8224@neumann> In-Reply-To: <20080708231837.GA16895@spearce.org> On Tue, Jul 08, 2008 at 11:18:37PM +0000, Shawn O. Pearce wrote: > Junio C Hamano wrote: > > SZEDER Gábor writes: > > > + c=$((++c)) > > > > This assignment is somewhat curious, although it should work as expected > > either way ;-) > > I agree, its damned odd. But we already do this in the same > sort of loop inside of _git_branch() (see around line 541 in > next). This new patch is only sticking with our current set > of conventions in the script, so I say its fine. Well, according to git blame contrib/completion/git-completion.bash |grep '++' you started this convention back in 2006, I just copied and modified your code (; Maybe an old C++ "heritage"? In C++ it matters for class types (e.g. iterators), because the postfix operator might be slower than the prefix. Best, Gábor