Subject: Re: suggestion for 'ls' coreutil, comma'd filesizes in -l output

From: Eric Blake <[email-masked]>
Date: Wed, 05 Jun 2013 12:50:50 -0600

On 06/04/2013 02:20 PM, Eric Blake wrote:
> 
> You found another doc bug - I can confirm that the behavior has changed
> in the meantime (I see a change in behavior between my testing on RHEL
> 6.4 with stat 8.4, vs. Fedora 19 with stat 8.17), but do not see the
> change mentioned in NEWS.  I suspect the change happened with this
> commit in 8.7:
> 
> commit ca9aa7596094c4af094edb7eb63648570d53c100
> Author: Paul Eggert <[email-masked]>
> Date:   Sat Nov 6 13:57:08 2010 -0700
> 
>     stat: do not rely on undefined behavior in printf formats

I confirmed that this was indeed the point where the behavior changed.

Any objection to a patch along these lines?  I guess it's incomplete, as
I'd also have to edit the NEWS hash since this is touching old news.
Likewise, does the testsuite need to be enhanced to ensure we don't regress?

From ff67e9a92f8ec64b70abffe8524a56f4f5062a8d Mon Sep 17 00:00:00 2001
From: Eric Blake <[email-masked]>
Date: Wed, 5 Jun 2013 12:46:17 -0600
Subject: [PATCH] doc: mention prior stat change

Commit ca9aa759 had the side effect of changing 'stat -c "%'s" file'
from outputting "?s" to the nicer "1,234", so this is worth mentioning
in the NEWS.

* NEWS: Mention 8.7 improvement in stat.
---
 NEWS | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/NEWS b/NEWS
index cad5eee..bd6085d 100644
--- a/NEWS
+++ b/NEWS
@@ -883,6 +883,9 @@ GNU coreutils NEWS
  -*- outline -*-
   However, with the above change to %X, %Y and %Z, we've made %W work
   the same way as the others.

+  stat supports additional flags, such as %'s for listing sizes with
+  the current locale's thousands separator.
+

 * Noteworthy changes in release 8.6 (2010-10-15) [stable]

-- 
1.8.1.4

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org