Re: [PATCH] build: fix gitignore sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/05/2011 06:51 PM, Eric Blake wrote:
Make it so we don't have to 'git add -f' particular files like
po/POTFILES.in all the time (tested by fixing one of our
special-case files as part of the patch).

* .gnulib: Update to latest.
* bootstrap: Resync from coreutils.
* .gitignore: Sort whitelist entries correctly, including ignoring
files rather than directories.
* m4/virt-compile-warnings.m4: Convert tabs to space.
---

* .gnulib dec3475...f796520 (7):
   >  bootstrap: compute gnulib_extra_files after updating build_aux
   >  bootstrap: preserve git whitelist item sorting
   >  maint.mk: Don't trigger sc_space_tab check.
   >  areadlink, areadlinkat: rewrite in terms of careadlinkat
   >  autoupdate
   >  wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr: Avoid errors in C++ mode.
   >  wcpcpy, wcpncpy: Ensure declaration on glibc>= 2.13 systems.

I'm also trying to patch 'man gitignore' with things I've learned
from this exercise: http://marc.info/?t=130203248100003&r=1&w=2

  .gitignore                  |   12 +++++-----
  .gnulib                     |    2 +-
  bootstrap                   |   46 +++++++++++++++++++++++++++++--------------
  m4/virt-compile-warnings.m4 |    8 +++---
  4 files changed, 42 insertions(+), 26 deletions(-)

ACK (once Eric explained the sed construct I'd never seen before :-)

+# Ensure that lines starting with ! sort last, per gitignore conventions
+# for whitelisting exceptions after a more generic blacklist pattern.
+sort_patterns() {
+  sort -u "$@" | sed '/^!/ {
+    H
+    d
+  }
+  $ {
+    P
+    x
+    s/^\n//
+  }'
+}

Yeah, that's the one...

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]