[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace i
From: |
Jim Meyering |
Subject: |
Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames |
Date: |
Sun, 5 Jan 2025 11:47:50 -0800 |
On Sun, Jan 5, 2025 at 11:38 AM Andreas Grünbacher
<andreas.gruenbacher@gmail.com> wrote:
...
> > Technically, I don't see how that POSIX guidance for patch can justify
> > this behavior, since patch's output file name is just "b" in this
> > example:
> >
> > $ f=$'a\na'; echo a>"$f"; echo b>b; diff -u b "$f" |patch b
> > patch: **** quoted string "a\n..." contains newline
>
> Indeed, rejecting patches because they contain filenames that aren't
> even used is not helpful.
>
> > But their suggestion to diagnose or even fail for NL-afflicted file
> > names is fine advice, so I shouldn't be splitting hairs with the
> > example above. IMHO, it is fine and even desirable to discourage
> > NL-afflicted files.
> >
> > Re my current question (how to adjust that diff manual section), I'm
> > happy to make it say that all special characters are covered,
> > **except** newline, whose presence in any file name is strongly
> > discouraged.
>
> How about we change diff and patch to accept but warn about newlines
> in filenames?
I'll be happy to make diffutils warn about NL-afflicted file names,
but not before the impending release.
- Fwd: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Jim Meyering, 2025/01/05
- Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Andreas Grünbacher, 2025/01/05
- Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Collin Funk, 2025/01/05
- Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Jim Meyering, 2025/01/05
- Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Paul Eggert, 2025/01/08
- Re: [bug-diffutils] bug#68695: Please, fix documentation on whitespace in pathnames, Jim Meyering, 2025/01/11