Re: Feature Freeze date for 8.4

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Feature Freeze date for 8.4
Дата
Msg-id 471FC6D5.7000509@gmail.com
обсуждение исходный текст
Ответ на Re: Feature Freeze date for 8.4  ("Brendan Jurd" <direvus@gmail.com>)
Список pgsql-hackers
Brendan Jurd wrote:
> On 10/24/07, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>> Brendan Jurd escribió:
>>> Really?  I just started playing around with git, and the output from git
>>> diff produced the same kind of diff file I would normally get from `svn
>>> di`
>> ... which is a unified diff.
>>
>>> or `cvs di -c`.
>> Huh, strange.  That's a context diff.
>
> Right.  I was confusing unified and context, because the unified diffs I'm
> looking at do actually show "context" lines above and below each change.
> Sorry for the noise.

You can get git to produce a context diff by using GIT_EXTERNAL_DIFF to specify
an external diff program. I use a little shell script called
git-context-diff.sh, containing:
#!/bin/bash
diff --context=5 -L a/$1 -L b/$1 -p $2 $5
exit 0
and then create a diff with:
GIT_EXTERNAL_DIFF=git-context-diff.sh git diff <head to diff against>

Just in case you wondered - writing that script as just "exec diff ..." fails,
because diff seems to exit with a nonzero exitcode if the files differ, and "git
diff" aborts in that case...

regards, Florian Pflug



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: suitable text search configuration
Следующее
От: Tom Lane
Дата:
Сообщение: Re: second DML operation fails with updatable cursor