threads / discuss / 23870

Changing indents

Subject: Changing indents

## tl;dr

5 messages between May 21, 2010 and May 22, 2010.

replies: 4people: 3as markdown or json

Andrew Keller· May 21, 2010, 16:01 UTC · lore
Is it possible to change the indent of a line (or multiple lines) without rewriting the whole line?  Or, more specifically, can a commit exist that modifies the leading whitespace of a line but still allows you to trace the origin of the line to a previous commit?

Thanks, Andrew Keller

Ævar Arnfjörð Bjarmason· May 21, 2010, 16:05 UTC · re: Andrew Keller · lore

Re: Changing indents

On Fri, May 21, 2010 at 16:01, Andrew Keller <andrew@kellerfarm.com> wrote:
> Is it possible to change the indent of a line (or multiple lines) without rewriting the whole line?  Or, more specifically, can a commit exist that modifies the leading whitespace of a line but still allows you to trace the origin of the line to a previous commit?
Maybe you want: git blame $sha^ file ?
Andrew Keller· May 21, 2010, 16:12 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: Changing indents

On May 21, 2010, at 12:05 PM, Ævar Arnfjörð Bjarmason wrote:
> On Fri, May 21, 2010 at 16:01, Andrew Keller <andrew@kellerfarm.com> wrote:
>> Is it possible to change the indent of a line (or multiple lines) without rewriting the whole line?  Or, more specifically, can a commit exist that modifies the leading whitespace of a line but still allows you to trace the origin of the line to a previous commit?
> 
> Maybe you want: git blame $sha^ file ?
Oh, there we go!

Thanks, Andrew Keller

Jakub Narebski· May 21, 2010, 16:30 UTC · re: Andrew Keller · lore

Re: Changing indents

Andrew Keller <andrew@kellerfarm.com> writes:
Show 5 quoted lines
> Is it possible to change the indent of a line (or multiple lines)
> without rewriting the whole line?  Or, more specifically, can a
> commit exist that modifies the leading whitespace of a line but
> still allows you to trace the origin of the line to a previous
> commit?
Whatever for?  Use "git blame -w <file>" (ignore whitespace).
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Andrew Keller· May 22, 2010, 02:46 UTC · re: Jakub Narebski · lore

Re: Changing indents

On May 21, 2010, at 12:30 PM, Jakub Narebski wrote:
Show 8 quoted lines
> Andrew Keller <andrew@kellerfarm.com> writes:
>> Is it possible to change the indent of a line (or multiple lines)
>> without rewriting the whole line?  Or, more specifically, can a
>> commit exist that modifies the leading whitespace of a line but
>> still allows you to trace the origin of the line to a previous
>> commit?
> 
> Whatever for?  Use "git blame -w <file>" (ignore whitespace).
Because I forgot about -w of blame...

Thanks, ~ Andrew Keller

← back to recent threads