Thread (2 messages) 2 messages, 2 authors, 2016-08-10

Re: [PATCH] t7406: fix breakage on OSX

flat view

From: Junio C Hamano <hidden>
Date: 2016-08-10 18:27:31

Stefan Beller [off-list ref] writes:
On OSX `wc` prefixes the output of numbers with whitespace, such that
the `commit_count` would be "SP <NUMBER>". When using that in

    git submodule update --init --depth=$commit_count

the depth would be empty and the number is interpreted as the pathspec.
Fix this by not using `wc` and rather instruct rev-list to count.

Another way to fix this is to remove the `=` sign after the `--depth`
argument as then we are allowed to have more than just one whitespace
between `--depth` and the actual number. Prefer the solution of rev-list
counting as that is expected to be slightly faster and more self-sustained
within Git.
You meant self-contained, I would guess.

There are a couple of "log --oneline | wc -l" remaining that are
currently safe but they may be a time-bomb waiting to go off.

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