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

Re: [PATCH] pull: replace unnecessary sed invocation

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:27

Gabriel Filion [off-list ref] writes:
quoted
+curr_branch_short="${curr_branch#refs/heads/}"
This modification is a bashism. This syntax is not compatible with other
shells.
To me, the above looks like "${parameter#word}", which is a plain vanilla
POSIX shell construct that we adopted to use in our scripts.

There are bash-only constructs we decided never to use in our scripts;
among them are "${parameter/pattern/string}" and "${parameter:offset}",
both are not in POSIX.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help