Package: patchutils
Version: 0.3.4-2
Severity: wishlist
Control: tags -1 upstream

Dear Maintainer,

If files are created (likewise: deleted) in a delta, git uses /dev/null
as a special filename to denote that. filterdiff's --addprefix (and
variants) however treat this as a regular filename, hence

| $ git diff HEAD^..
| diff --git a/file b/file
| new file mode 100644
| index 0000000..9daeafb
| --- /dev/null
| +++ b/file
| @@ -0,0 +1 @@
| +test

| $ git diff HEAD^.. | filterdiff --addprefix 'src/'
+ --- src//dev/null
| +++ src/b/file
| @@ -0,0 +1 @@
| +test

It seems wise to never touch the literal filename /dev/null in any
--addprefix behaviour. To play extra safe, make this configurable usind
a new option.

Aside, --strip already does the right thing.

Regards,

    Christoph

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.18 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages patchutils depends on:
ii  debianutils  4.8.1.1
ii  libc6        2.24-11+deb9u2
ii  patch        2.7.5-1+b2
ii  perl         5.24.1-3+deb9u2

patchutils recommends no packages.

patchutils suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to