All of lore.kernel.org
 help / color / mirror / Atom feed
* 2273 lines in 170 files consists of only space and tabulators
@ 2009-06-06 10:25 Felix Zielcke
  2009-06-06 13:43 ` Felix Zielcke
  2009-06-07  1:53 ` Pavel Roskin
  0 siblings, 2 replies; 15+ messages in thread
From: Felix Zielcke @ 2009-06-06 10:25 UTC (permalink / raw)
  To: The development of GRUB 2

fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
2273
fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
170

Anyone wants me to do 
find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
or does someone object?
[:blank:] doestn't contain these ^L chars.

By the way `git diff --color' shows if you introduce such a line with
red, but strangely not when you remove one.
-- 
Felix Zielcke




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-06 10:25 2273 lines in 170 files consists of only space and tabulators Felix Zielcke
@ 2009-06-06 13:43 ` Felix Zielcke
  2009-06-07  1:48   ` Vladimir 'phcoder' Serbinenko
  2009-06-07  1:53 ` Pavel Roskin
  1 sibling, 1 reply; 15+ messages in thread
From: Felix Zielcke @ 2009-06-06 13:43 UTC (permalink / raw)
  To: The development of GRUB 2

Am Samstag, den 06.06.2009, 12:25 +0200 schrieb Felix Zielcke:
> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> 2273
> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> 170

Seems like the regexp isn't clear for everyone, at least Vladimir.
This matches only lines with have at least one space or one tab, not
totally empty lines.
And the sed would only change them to true empty lines, not remove them completely.

> 
> Felix Zielcke




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-06 13:43 ` Felix Zielcke
@ 2009-06-07  1:48   ` Vladimir 'phcoder' Serbinenko
  2009-06-07  1:59     ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-07  1:48 UTC (permalink / raw)
  To: The development of GRUB 2

Hello

On Sat, Jun 6, 2009 at 3:43 PM, Felix Zielcke<fzielcke@z-51.de> wrote:
> Am Samstag, den 06.06.2009, 12:25 +0200 schrieb Felix Zielcke:
>> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
>> 2273
>> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
>> 170
>
> Seems like the regexp isn't clear for everyone, at least Vladimir.
> This matches only lines with have at least one space or one tab, not
> totally empty lines.
> And the sed would only change them to true empty lines, not remove them completely.
>
As was discussed on IRC and confirmed by looking at GCS it doesn't
specify explicitely whether empty lines whould contain spaces. We can
use either way as long as we use it consistently. I haven't yet found
how to install ident on gentoo. If ident removes these spaces too I
think we should remove them too as it's easier to maintain if style is
the same as from ident
>>
>> Felix Zielcke
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-06 10:25 2273 lines in 170 files consists of only space and tabulators Felix Zielcke
  2009-06-06 13:43 ` Felix Zielcke
@ 2009-06-07  1:53 ` Pavel Roskin
  2009-06-10 21:04   ` Felix Zielcke
  1 sibling, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2009-06-07  1:53 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> 2273
> fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> 170
> 
> Anyone wants me to do 
> find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> or does someone object?
> [:blank:] doestn't contain these ^L chars.
> 
> By the way `git diff --color' shows if you introduce such a line with
> red, but strangely not when you remove one.

Since we have linear development, it shouldn't be a problem for merging
patches.  Besides, "patch" can be told to ignore whitespace differences.

However, I would prefer that we remove all trailing whitespace, not just
that on empty lines.  That is, remove "^" from the sed expression.

As for the script, make sure that it's not run on any special files used
by Subversion or git.  Maybe use DISTLIST.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-07  1:48   ` Vladimir 'phcoder' Serbinenko
@ 2009-06-07  1:59     ` Pavel Roskin
  2009-06-07 14:32       ` Felix Zielcke
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2009-06-07  1:59 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, 2009-06-07 at 03:48 +0200, Vladimir 'phcoder' Serbinenko wrote:

> As was discussed on IRC and confirmed by looking at GCS it doesn't
> specify explicitely whether empty lines whould contain spaces. We can
> use either way as long as we use it consistently. I haven't yet found
> how to install ident on gentoo. If ident removes these spaces too I
> think we should remove them too as it's easier to maintain if style is
> the same as from ident

Yes, indent removes trailing whitespace everywhere except comments.

By the way, our style is slightly different from that used by GNU
indent.  GRUB uses space after "!", whereas GNU indent doesn't.  Also,
some GRUB sources use one space before labels, and GNU indent starts
labels from the first column.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-07  1:59     ` Pavel Roskin
@ 2009-06-07 14:32       ` Felix Zielcke
  0 siblings, 0 replies; 15+ messages in thread
From: Felix Zielcke @ 2009-06-07 14:32 UTC (permalink / raw)
  To: The development of GRUB 2

Am Samstag, den 06.06.2009, 21:59 -0400 schrieb Pavel Roskin:
> By the way, our style is slightly different from that used by GNU
> indent.  GRUB uses space after "!", whereas GNU indent doesn't.  Also,
> some GRUB sources use one space before labels, and GNU indent starts
> labels from the first column.

I just noticed that emacs indents util/grub.d/30_os-prober different
then it was written.
And the coding style isn't always that consistent.
For example sometimes `if (! pointer)' is used and sometimes
`if (pointer == NULL)'
-- 
Felix Zielcke




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-07  1:53 ` Pavel Roskin
@ 2009-06-10 21:04   ` Felix Zielcke
  2009-07-28 18:19     ` Robert Millan
  0 siblings, 1 reply; 15+ messages in thread
From: Felix Zielcke @ 2009-06-10 21:04 UTC (permalink / raw)
  To: The development of GRUB 2

Am Samstag, den 06.06.2009, 21:53 -0400 schrieb Pavel Roskin:
> On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> > 2273
> > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> > 170
> > 
> > Anyone wants me to do 
> > find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> > or does someone object?
> > [:blank:] doestn't contain these ^L chars.
> > 
> > By the way `git diff --color' shows if you introduce such a line with
> > red, but strangely not when you remove one.
> 
> Since we have linear development, it shouldn't be a problem for merging
> patches.  Besides, "patch" can be told to ignore whitespace differences.
> 
> However, I would prefer that we remove all trailing whitespace, not just
> that on empty lines.  That is, remove "^" from the sed expression.

Ok I just commited this.

> As for the script, make sure that it's not run on any special files used
> by Subversion or git.  Maybe use DISTLIST.

Thanks for the hint with DISTLIST. gendistlist.sh needed again an
update.
-- 
Felix Zielcke




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-06-10 21:04   ` Felix Zielcke
@ 2009-07-28 18:19     ` Robert Millan
  2009-07-28 21:09       ` Felix Zielcke
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Millan @ 2009-07-28 18:19 UTC (permalink / raw)
  To: The development of GRUB 2

On Wed, Jun 10, 2009 at 11:04:56PM +0200, Felix Zielcke wrote:
> Am Samstag, den 06.06.2009, 21:53 -0400 schrieb Pavel Roskin:
> > On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> > > 2273
> > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> > > 170
> > > 
> > > Anyone wants me to do 
> > > find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> > > or does someone object?
> > > [:blank:] doestn't contain these ^L chars.
> > > 
> > > By the way `git diff --color' shows if you introduce such a line with
> > > red, but strangely not when you remove one.
> > 
> > Since we have linear development, it shouldn't be a problem for merging
> > patches.  Besides, "patch" can be told to ignore whitespace differences.
> > 
> > However, I would prefer that we remove all trailing whitespace, not just
> > that on empty lines.  That is, remove "^" from the sed expression.
> 
> Ok I just commited this.

Do you mean removing all whitespace?  I think you forgot to commit it.

Though, I'd prefer if we don't do this in one megacommit.  If we do it
gradually, we avoid breaking patches.  This makes work easier for branches
and for distributors (which essentially operate as a branch).

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-28 18:19     ` Robert Millan
@ 2009-07-28 21:09       ` Felix Zielcke
  2009-07-31 15:39         ` Robert Millan
  0 siblings, 1 reply; 15+ messages in thread
From: Felix Zielcke @ 2009-07-28 21:09 UTC (permalink / raw)
  To: The development of GRUB 2

Am Dienstag, den 28.07.2009, 20:19 +0200 schrieb Robert Millan:
> On Wed, Jun 10, 2009 at 11:04:56PM +0200, Felix Zielcke wrote:
> > Am Samstag, den 06.06.2009, 21:53 -0400 schrieb Pavel Roskin:
> > > On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> > > > 2273
> > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> > > > 170
> > > > 
> > > > Anyone wants me to do 
> > > > find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> > > > or does someone object?
> > > > [:blank:] doestn't contain these ^L chars.
> > > > 
> > > > By the way `git diff --color' shows if you introduce such a line with
> > > > red, but strangely not when you remove one.
> > > 
> > > Since we have linear development, it shouldn't be a problem for merging
> > > patches.  Besides, "patch" can be told to ignore whitespace differences.
> > > 
> > > However, I would prefer that we remove all trailing whitespace, not just
> > > that on empty lines.  That is, remove "^" from the sed expression.
> > 
> > Ok I just commited this.
> 
> Do you mean removing all whitespace?  I think you forgot to commit it.
> 
> Though, I'd prefer if we don't do this in one megacommit.  If we do it
> gradually, we avoid breaking patches.  This makes work easier for branches
> and for distributors (which essentially operate as a branch).

I did this in r2293
So you even didn't notice this. Good :)

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-28 21:09       ` Felix Zielcke
@ 2009-07-31 15:39         ` Robert Millan
  2009-07-31 15:45           ` Felix Zielcke
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Millan @ 2009-07-31 15:39 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Jul 28, 2009 at 11:09:11PM +0200, Felix Zielcke wrote:
> Am Dienstag, den 28.07.2009, 20:19 +0200 schrieb Robert Millan:
> > On Wed, Jun 10, 2009 at 11:04:56PM +0200, Felix Zielcke wrote:
> > > Am Samstag, den 06.06.2009, 21:53 -0400 schrieb Pavel Roskin:
> > > > On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> > > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> > > > > 2273
> > > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> > > > > 170
> > > > > 
> > > > > Anyone wants me to do 
> > > > > find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> > > > > or does someone object?
> > > > > [:blank:] doestn't contain these ^L chars.
> > > > > 
> > > > > By the way `git diff --color' shows if you introduce such a line with
> > > > > red, but strangely not when you remove one.
> > > > 
> > > > Since we have linear development, it shouldn't be a problem for merging
> > > > patches.  Besides, "patch" can be told to ignore whitespace differences.
> > > > 
> > > > However, I would prefer that we remove all trailing whitespace, not just
> > > > that on empty lines.  That is, remove "^" from the sed expression.
> > > 
> > > Ok I just commited this.
> > 
> > Do you mean removing all whitespace?  I think you forgot to commit it.
> > 
> > Though, I'd prefer if we don't do this in one megacommit.  If we do it
> > gradually, we avoid breaking patches.  This makes work easier for branches
> > and for distributors (which essentially operate as a branch).
> 
> I did this in r2293
> So you even didn't notice this. Good :)

But there was no ChangeLog entry?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-31 15:39         ` Robert Millan
@ 2009-07-31 15:45           ` Felix Zielcke
  2009-07-31 16:02             ` Felix Zielcke
  2009-08-01 10:05             ` Alfred M. Szmidt
  0 siblings, 2 replies; 15+ messages in thread
From: Felix Zielcke @ 2009-07-31 15:45 UTC (permalink / raw)
  To: The development of GRUB 2

Am Freitag, den 31.07.2009, 17:39 +0200 schrieb Robert Millan:
> On Tue, Jul 28, 2009 at 11:09:11PM +0200, Felix Zielcke wrote:
> > Am Dienstag, den 28.07.2009, 20:19 +0200 schrieb Robert Millan:
> > > On Wed, Jun 10, 2009 at 11:04:56PM +0200, Felix Zielcke wrote:
> > > > Am Samstag, den 06.06.2009, 21:53 -0400 schrieb Pavel Roskin:
> > > > > On Sat, 2009-06-06 at 12:25 +0200, Felix Zielcke wrote:
> > > > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|wc -l
> > > > > > 2273
> > > > > > fz@fz:~/grub/grub2.git$ rgrep -E "^[[:blank:]]+$" *|sed -e 's/:.*//'|uniq|wc -l
> > > > > > 170
> > > > > > 
> > > > > > Anyone wants me to do 
> > > > > > find . -type f -print0 | xargs -0 sed -i -r -e 's/^[[:blank:]]+$//'
> > > > > > or does someone object?
> > > > > > [:blank:] doestn't contain these ^L chars.
> > > > > > 
> > > > > > By the way `git diff --color' shows if you introduce such a line with
> > > > > > red, but strangely not when you remove one.
> > > > > 
> > > > > Since we have linear development, it shouldn't be a problem for merging
> > > > > patches.  Besides, "patch" can be told to ignore whitespace differences.
> > > > > 
> > > > > However, I would prefer that we remove all trailing whitespace, not just
> > > > > that on empty lines.  That is, remove "^" from the sed expression.
> > > > 
> > > > Ok I just commited this.
> > > 
> > > Do you mean removing all whitespace?  I think you forgot to commit it.
> > > 
> > > Though, I'd prefer if we don't do this in one megacommit.  If we do it
> > > gradually, we avoid breaking patches.  This makes work easier for branches
> > > and for distributors (which essentially operate as a branch).
> > 
> > I did this in r2293
> > So you even didn't notice this. Good :)
> 
> But there was no ChangeLog entry?
> 

Uhm I thought this wasn't needed because the actual code didn't change.
But okay GCS talks about all changes made to source files so you're
probable right.

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-31 15:45           ` Felix Zielcke
@ 2009-07-31 16:02             ` Felix Zielcke
  2009-07-31 16:24               ` Robert Millan
  2009-08-01 10:05             ` Alfred M. Szmidt
  1 sibling, 1 reply; 15+ messages in thread
From: Felix Zielcke @ 2009-07-31 16:02 UTC (permalink / raw)
  To: The development of GRUB 2

Am Freitag, den 31.07.2009, 17:45 +0200 schrieb Felix Zielcke:
> > But there was no ChangeLog entry?
> > 
> 
> Uhm I thought this wasn't needed because the actual code didn't
> change.
> But okay GCS talks about all changes made to source files so you're
> probable right.
> 

Ok thanks to grep and sed I added it now.
Sorry.

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-31 16:02             ` Felix Zielcke
@ 2009-07-31 16:24               ` Robert Millan
  0 siblings, 0 replies; 15+ messages in thread
From: Robert Millan @ 2009-07-31 16:24 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Jul 31, 2009 at 06:02:16PM +0200, Felix Zielcke wrote:
> 
> Ok thanks to grep and sed

The way of a true hacker.  :-)

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-07-31 15:45           ` Felix Zielcke
  2009-07-31 16:02             ` Felix Zielcke
@ 2009-08-01 10:05             ` Alfred M. Szmidt
  2009-08-01 13:54               ` Felix Zielcke
  1 sibling, 1 reply; 15+ messages in thread
From: Alfred M. Szmidt @ 2009-08-01 10:05 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: grub-devel

   Uhm I thought this wasn't needed because the actual code didn't
   change.  But okay GCS talks about all changes made to source files
   so you're probable right.

Usually, such changes do not need to be mentioned in the ChangeLog,
since they do not change the behaviour of anything.  The same goes for
any formating changes, and comment fixes.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 2273 lines in 170 files consists of only space and tabulators
  2009-08-01 10:05             ` Alfred M. Szmidt
@ 2009-08-01 13:54               ` Felix Zielcke
  0 siblings, 0 replies; 15+ messages in thread
From: Felix Zielcke @ 2009-08-01 13:54 UTC (permalink / raw)
  To: The development of GRUB 2

Am Samstag, den 01.08.2009, 06:05 -0400 schrieb Alfred M. Szmidt:
> Uhm I thought this wasn't needed because the actual code didn't
>    change.  But okay GCS talks about all changes made to source files
>    so you're probable right.
> 
> Usually, such changes do not need to be mentioned in the ChangeLog,
> since they do not change the behaviour of anything.  The same goes for
> any formating changes, and comment fixes.
> 

Pavel once told me about 6.8.3 in GCS which says:

When you change just comments or doc strings, it is enough to write an
entry for the file, without mentioning the functions. Just “Doc fixes”
is enough for the change log

So at least comment changes should be documented.

-- 
Felix Zielcke
Proud Debian Maintainer




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-08-01 13:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 10:25 2273 lines in 170 files consists of only space and tabulators Felix Zielcke
2009-06-06 13:43 ` Felix Zielcke
2009-06-07  1:48   ` Vladimir 'phcoder' Serbinenko
2009-06-07  1:59     ` Pavel Roskin
2009-06-07 14:32       ` Felix Zielcke
2009-06-07  1:53 ` Pavel Roskin
2009-06-10 21:04   ` Felix Zielcke
2009-07-28 18:19     ` Robert Millan
2009-07-28 21:09       ` Felix Zielcke
2009-07-31 15:39         ` Robert Millan
2009-07-31 15:45           ` Felix Zielcke
2009-07-31 16:02             ` Felix Zielcke
2009-07-31 16:24               ` Robert Millan
2009-08-01 10:05             ` Alfred M. Szmidt
2009-08-01 13:54               ` Felix Zielcke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.