Thread (5 messages) flat view 5 messages, 2 authors, 2020-08-02

Re: [PATCH] t1450: fix quoting of NUL byte when corrupting pack

From: Chris Torek <hidden>
Date: 2020-08-02 01:00:59

On Sat, Aug 1, 2020 at 3:08 PM Martin Ågren [off-list ref] wrote:
  printf '\0'

to generate a NUL byte
[but]
end up injecting the ASCII code for "0", 0x30, instead.
-       printf '\0' | dd of=.git/objects/pack/pack-$pack.pack bs=1 conv=notrunc seek=12 &&
+       printf "\0" | dd of=.git/objects/pack/pack-$pack.pack bs=1 conv=notrunc seek=12 &&
In sh/bash, this should make no difference, and that's what I get here.
Am I missing something?

$ printf '\0' | hexdump
0000000 0000
0000001
$ printf "\0" | hexdump
0000000 0000
0000001

Chris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help