<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/ls.c, branch v8.5</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.5</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-03-18T16:41:12Z</updated>
<entry>
<title>doc: improve ls --help's description of --escape (-b)</title>
<updated>2010-03-18T16:41:12Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-03-18T15:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b44d4b6b0e2e5a422bd39be19f397142c3632b5a'/>
<id>urn:sha1:b44d4b6b0e2e5a422bd39be19f397142c3632b5a</id>
<content type='text'>
* src/ls.c (usage): Be more precise about how --escape (-b) works:
say "C-style escapes", not "octal escapes".  Reported by Jacky Fong.
</content>
</entry>
<entry>
<title>ls: fix a regression by honoring NORMAL attributes again</title>
<updated>2010-02-17T23:25:12Z</updated>
<author>
<name>Moritz Orbach</name>
<email>ml-coreutils@apfelboymchen.homeunix.net</email>
</author>
<published>2010-02-16T22:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f5268e2749d5649a3364550ef54bf31d9aa9c4e1'/>
<id>urn:sha1:f5268e2749d5649a3364550ef54bf31d9aa9c4e1</id>
<content type='text'>
Output the NORMAL attribute before non file name text.
This attribute will continue into file names that would
not otherwise be colored unless FILE is also set.
The regression was introduced with commit 483297d5, 28-02-2009,
"ls --color no longer outputs unnecessary escape sequences".

* src/ls.c (set_normal_color): A new function to output the
NORMAL attribute sequence if it's enabled.
(print_current_files): Output NORMAL before printing long format info.
(print_file_name_and_frills): Output NORMAL before printing file name.
(print_color_indicator): Reset the attributes before a file name with
attributes so that NORMAL attributes will not combine with them.
(print_name_with_quoting): Ensure attributes are reset after printing
the file name if NORMAL attributes were output.
* tests/ls/color-norm: A new test for NORMAL and FILE combinations.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
Reported in https://savannah.gnu.org/bugs/?26512
</content>
</entry>
<entry>
<title>ls --color: don't emit a final no-op escape sequence</title>
<updated>2010-02-01T07:26:12Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-30T22:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5d43617e8ad863ed041309edefd018fdcaa87038'/>
<id>urn:sha1:5d43617e8ad863ed041309edefd018fdcaa87038</id>
<content type='text'>
* src/ls.c (main): With --color, avoid emitting the final color-
resetting escape sequence when it would be a no-op.
* tests/ls/color-clear-to-eol: Adjust expected output accordingly.
* tests/ls/color-dtype-dir: Likewise.
* tests/ls/multihardlink: Likewise.
* tests/ls/stat-free-symlinks: Likewise.
* tests/misc/ls-misc: Likewise.
* NEWS (Changes in behavior): Mention it.
C de-Avillez rebased and adapted four of the new sl-dangle*
tests in tests/misc/ls-misc.
Reported by Jim Avera in
http://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/494663
</content>
</entry>
<entry>
<title>ls: reorder includes to work around broken &lt;sys/capability.h&gt;</title>
<updated>2010-01-12T05:31:20Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2010-01-09T20:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6454dd0f2f792850453379ba081ca74eed15c2d9'/>
<id>urn:sha1:6454dd0f2f792850453379ba081ca74eed15c2d9</id>
<content type='text'>
* src/ls.c: Include &lt;sys/capability.h&gt; later, to avoid build
failure with a header from libcap-2.16-1 or earlier.
See http://bugzilla.redhat.com/483548 for details.
</content>
</entry>
<entry>
<title>ls: fix color of broken symlinks colored as target</title>
<updated>2010-01-01T20:41:46Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2010-01-01T14:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b7f2b51c42edabd516c5ecc748a654da736c912c'/>
<id>urn:sha1:b7f2b51c42edabd516c5ecc748a654da736c912c</id>
<content type='text'>
* src/ls.c (print_color_indicator): When using 'LINK target' in
dircolors, treat broken symlink as C_ORPHAN.
* tests/misc/ls-misc (sl-dangle2, sl-dangle3, sl-dangle4)
(sl-dangle5): Test for it, and add more coverage.
* NEWS: Document it.
* THANKS: Update.
Reported by Chris Jones.
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>doc: enhance and reference info about version comparison</title>
<updated>2009-12-19T01:21:28Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-12-17T10:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3593cf50b224f35d502c36181f94cd5ece257342'/>
<id>urn:sha1:3593cf50b224f35d502c36181f94cd5ece257342</id>
<content type='text'>
* doc/coreutils.texi (sort invocation): Reference the additional
info about filevercmp rather than the unused strverscmp.
(Details about version sort): Add some examples that are not
handled well by fileversmp.
* src/ls.c: Change a comment referencing the now unused strverscmp.
</content>
</entry>
<entry>
<title>ls: fix capability coloring</title>
<updated>2009-11-09T08:16:20Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-11-08T03:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=10d97b31910b0030f7716474a48b3fc8e00dd216'/>
<id>urn:sha1:10d97b31910b0030f7716474a48b3fc8e00dd216</id>
<content type='text'>
Capability checking was incorrectly done on just the base name
rather than on the whole path.  Consequently there could be both
false positives and negatives when coloring files with capabilities.
Also capability checking was not done at all in certain cases for
non executable files.  Note passing absolute rather than relative
names to cap_get_file() reduces the has_capability() overhead
from around 33% to 30%.  I.E. ls --color is now around 3% faster.

* src/ls.c (struct fileinfo): Add a has_capability member.
(print_color_indicator): Refactor to pass just a fileinfo pointer
and a flag to say if we're dealing with a symlink target.
(print_name_with_quoting): Likewise.
(gobble_file): Set has_capability in the fileinfo struct.  Also do
a capability check even if executable coloring is disabled.
Ditto for SETUID and SETUID coloring.
Comment on how expensive has_capability() is.
(print_long_format): Adjust to refactored print_name_with_quoting.
(quote_name): Likewise.
(print_file_name_and_frills): Likewise.
* tests/ls/capability: Test the various false positive and negatives.
* THANKS: Add reporter (Ivan Labath).
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>ls: remove explicit getfilecon work-around</title>
<updated>2009-10-09T12:33:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-10-07T20:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=57d9263ca54a35e76fc8ed2ec3ec8dc36f8da60b'/>
<id>urn:sha1:57d9263ca54a35e76fc8ed2ec3ec8dc36f8da60b</id>
<content type='text'>
* src/ls.c (gobble_file): Remove l?getfilecon work-around,
now that the gnulib wrappers handle it for us.
</content>
</entry>
<entry>
<title>ls: always print "?" for allocated size of a dereferenced dangling symlink</title>
<updated>2009-09-30T14:42:35Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-29T14:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d4c7114bce116aefe28c899f5d0e7dcc39feb103'/>
<id>urn:sha1:d4c7114bce116aefe28c899f5d0e7dcc39feb103</id>
<content type='text'>
Previously for `ls -Ls` (but not `ls -Lsl`), we referenced
the st_blocks returned from the previous failed stat() call.
This undefined value was seen to be 0 for dangling symlinks at least.
* src/ls.c (print_file_name_and_frills, length_of_file_name_and_frills):
Don't use st_blocks if the previous stat() failed
* tests/ls/dangle: Add a test case
* NEWS: Mention the fix, and roll up related items into a single entry.
</content>
</entry>
</feed>
