Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/3] gitweb: Whitespace cleanup: realign, reindent

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:37

Jakub Narebski [off-list ref] writes:
So what is the default? 5-column tabs? 8-column tabs? And to what width?
80-column wide? 120-column wide?
Quoting the person who invented git:

                    Chapter 1: Indentation

    Tabs are 8 characters, and thus indentations are also 8 characters.
    There are heretic movements that try to make indentations 4 (or even 2!)
    characters deep, and that is akin to trying to define the value of PI to
    be 3.

    Rationale: The whole idea behind indentation is to clearly define where
    a block of control starts and ends.  Especially when you've been looking
    at your screen for 20 straight hours, you'll find it a lot easier to see
    how the indentation works if you have large indentations.

    Now, some people will claim that having 8-character indentations makes
    the code move too far to the right, and makes it hard to read on a
    80-character terminal screen.  The answer to that is that if you need
    more than 3 levels of indentation, you're screwed anyway, and should fix
    your program.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help