[Koha-devel] Git tip of the day: taille de tabulation dans git diff

Julian Maurice julian.maurice at biblibre.com
Fri Aug 8 11:44:28 CEST 2014


This tip is not really relevant for Koha, as we use spaces and not tabs, 
but could be useful in other projects, so, in short:
if you want git to display tabs as 2 spaces instead of 8 (the default):

     git config core.pager 'less -x2'

;)

Le 08/08/2014 11:34, Marc Véron a écrit :
> Tips and hints are always welcome :-)
>
> Marc
>
>   Am 08.08.2014 10:45, schrieb Julian Maurice:
>> Le 08/08/2014 10:43, Julian Maurice a écrit :
>>> Dans bokeh on a souvent du code aligné avec des tabulations, par exemple:
>>>
>>> $exemplaires = Class_Exemplaire::findAllBy(['id_notice' => $id_notice,
>>>                                               'id_int_bib' =>
>>> $this->id_int_bib,
>>>                                               'code_barres' =>
>>> $ex['code_barres']]);
>>>
>>>
>>> Comme la taille de tabulation dans nos éditeurs est de 2 et que par
>>> défaut dans git diff, elle est de 8, on doit souvent scroller à droite
>>> pour voir tout le code.
>>>
>>> Pour éviter ça, et dire à git d'afficher des tabs de 2:
>>>
>>>       git config core.pager 'less -x2'
>>>
>>> (peut aussi se faire avec la variable d'environnement LESS à priori)
>>>
>>
>> Oops, sorry! Wrong email address :)
>>
>


-- 
Julian Maurice <julian.maurice at biblibre.com>
BibLibre


More information about the Koha-devel mailing list