Re: [PATCH v2] mergetool: use more conservative temporary filenames

2014-10-13 Thread Junio C Hamano
David Aguilar writes: > Avoid filenames with multiple dots so that overly-picky tools do > not misinterpret their extension. > > Previously, foo/bar.ext in the worktree would result in e.g. > > ./foo/bar.ext.BASE.1234.ext > > This can be improved by having only a single .ext and using > und

Re: [PATCH v2] mergetool: use more conservative temporary filenames

2014-10-10 Thread Junio C Hamano
Jakub Narębski writes: > Why use expr and not POSIX shell parameter substitution? > > BASE=${MERGED%.*} > ext=.${MERGED##*.} > > Or something like that... Because they are insufficient. See David's illustrations for how. Parameter expansion (e.g. ${parameter%word}) is fine for the simplest cas

Re: [PATCH v2] mergetool: use more conservative temporary filenames

2014-10-10 Thread Johannes Sixt
Am 10.10.2014 um 20:48 schrieb David Aguilar: > On Fri, Oct 10, 2014 at 01:19:40PM +0200, Jakub Narębski wrote: >> David Aguilar wrote: >>> Avoid filenames with multiple dots so that overly-picky tools do >>> not misinterpret their extension. >>> >>> Previously, foo/bar.ext in the worktree would re

Re: [PATCH v2] mergetool: use more conservative temporary filenames

2014-10-10 Thread David Aguilar
On Fri, Oct 10, 2014 at 01:19:40PM +0200, Jakub Narębski wrote: > David Aguilar wrote: > >Avoid filenames with multiple dots so that overly-picky tools do > >not misinterpret their extension. > > > >Previously, foo/bar.ext in the worktree would result in e.g. > > > > ./foo/bar.ext.BASE.1234.ext

Re: [PATCH v2] mergetool: use more conservative temporary filenames

2014-10-10 Thread Jakub Narębski
David Aguilar wrote: Avoid filenames with multiple dots so that overly-picky tools do not misinterpret their extension. Previously, foo/bar.ext in the worktree would result in e.g. ./foo/bar.ext.BASE.1234.ext This can be improved by having only a single .ext and using underscore instea

[PATCH v2] mergetool: use more conservative temporary filenames

2014-10-10 Thread David Aguilar
Avoid filenames with multiple dots so that overly-picky tools do not misinterpret their extension. Previously, foo/bar.ext in the worktree would result in e.g. ./foo/bar.ext.BASE.1234.ext This can be improved by having only a single .ext and using underscore instead of dot so that the ex