Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/3] git-bisect: war on "sed"

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:51

Andreas Ericsson [off-list ref] writes:
quoted
Wincent Colaiuta [off-list ref] writes:
quoted
+		echo "${head#refs/heads/}" >"$GIT_DIR/head-name"
It says "remove refs/heads/ from the beginning of the string pointed
to by $head".

It's not a bashism. Some extensions to that syntax are though (I
think).
General replace anywhere.
If you want to be sure of portability, use sed instead.
Guffaw.
git uses this syntax often enough that it's worth using everywhere,
but usually only in porcelain commands which one can relatively
safely assume are run on at least decently up-to-date developer
workstations.
Huh?  It is used throughout.  That's why "make install" will install
xxx.sh scripts as xxx after possibly replacing the initial #!/bin/sh
line with a shell known to be reasonably conformant on a particular
system.

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