git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] gitweb: Whitespace cleanup: realign, reindent
Date: Wed, 23 Aug 2006 02:55:38 -0700	[thread overview]
Message-ID: <7vac5vixnp.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <ech55l$reh$1@sea.gmane.org> (Jakub Narebski's message of "Wed, 23 Aug 2006 10:55:22 +0200")

Jakub Narebski <jnareb@gmail.com> 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.

  parent reply	other threads:[~2006-08-23  9:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-22 14:51 [PATCH 0/3] gitweb: Yet another cleanup series Jakub Narebski
2006-08-22 14:52 ` [PATCH 1/3] gitweb: Whitespace cleanup: realign, reindent Jakub Narebski
2006-08-23  1:34   ` Junio C Hamano
2006-08-23  8:55     ` Jakub Narebski
2006-08-23  9:07       ` Andreas Ericsson
2006-08-23  9:55       ` Junio C Hamano [this message]
2006-08-22 14:55 ` [PATCH 2/3] gitweb: Use underscore instead of hyphen to separate words in HTTP headers names Jakub Narebski
2006-08-22 14:59 ` [PATCH 3/3] gitweb: Route rest of action subroutines through %actions Jakub Narebski
2006-08-22 15:03 ` [PATCH 0/3] gitweb: Yet another cleanup series Jakub Narebski
2006-08-22 21:42 ` [PATCH 4/3] gitweb: Use here-doc Jakub Narebski
2006-08-22 21:54   ` Jakub Narebski
2006-08-23  1:34   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vac5vixnp.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).