From: Eric Wong <normalperson@yhbt.net>
To: git@vger.kernel.org
Subject: Re: [PATCH] git-svn init/clone --stdlayout option to default-init trunk/tags/branches
Date: Sat, 14 Jul 2007 04:34:35 -0700 [thread overview]
Message-ID: <20070714113435.GC14842@muzzle> (raw)
In-Reply-To: <20070714110431.GA3854@piper.oerlikon.madduck.net>
martin f krafft <madduck@madduck.net> wrote:
> also sprach Eric Wong <normalperson@yhbt.net> [2007.07.14.1250 +0200]:
> > This looks good and useful, but can I also have a shorthand "-s" for
> > this, too? I'm lazy, thanks :)
>
> Of course.
>
> > Also, nitpicking, there's been some whitespace damage:
> >
> > I use tab characters for indentation, and (should be using) spaces for
> > alignment.
>
> What's the difference? Or is it simply:
>
> no. of tabs: int(column / 8)
> no. of spaces: column % 8
It's also easier/faster to navigate code with tabs since there are fewer
characters to iterate over, less granular points for indentation, making
it easier to to get to a desired indentation level.
The less granularity with tabs means I can avoid situations where where
I wonder if I'm correctly aligned with other pieces of code. I even
have auto-indent set, but occasionally with spaces (when I work on Ruby
code) I still have problems with being off-by-one after editing
something.
There's absolutely no way I can misalign a block of code when alignment
granularity is 8 characters no matter how sleepy I get :)
I use tabs for indentation where they denote logically different code
paths / nesting.
Spaces (for alignment, not indentation) are mainly aesthetic. I use
them in spaces when I need finer control (usually long conditionals in
if-statements that are wrapped).
Tabs can also be easily reconfigured in editors to change the amount of
screen real estate they consume. Not really useful in git-svn since
I keep it <80 columns anyways.
> I am sorry, I tried to do it right, even paid attention to the
> tabs/spaces thing, but I guess I failed.
No worries. The maintainers here are also very picky about trailing
whitespace and spaces that appear before tab characters, too and I
became much more disciplined about that myself the past year.
I have highlighting search set in my editor (vim :set hls)
and usually just search for spaces vs tabs to make sure I'm clean.
Of course, maintaining a consistent whitespace style helps a *lot* with
the git/Linux patch exchange development style because it avoids
needless patch application conflicts that arise from whitespace
differences.
--
Eric Wong
next prev parent reply other threads:[~2007-07-14 11:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-14 9:25 [PATCH] git-svn init/clone --stdlayout option to default-init trunk/tags/branches martin f. krafft
2007-07-14 10:50 ` Eric Wong
2007-07-14 11:04 ` martin f krafft
2007-07-14 11:34 ` Eric Wong [this message]
2007-07-14 12:04 ` martin f krafft
2007-07-14 20:38 ` Eric Wong
2007-08-23 6:10 ` Eric Wong
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=20070714113435.GC14842@muzzle \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
/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).