diff options
author | Stefan Beller <sbeller@google.com> | 2016-08-10 10:56:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-10 11:27:22 -0700 |
commit | 967d7f898c30bad41824c3f77962266b7cd7be32 (patch) | |
tree | 89d385c2575fb6d16936744b81488547ada91d9c /csum-file.h | |
parent | submodule update: allow '.' for branch value (diff) | |
download | tgif-967d7f898c30bad41824c3f77962266b7cd7be32.tar.xz |
t7406: fix breakage on OSX
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-contained within Git.
Reported-by: Lars Schneider <larsxschneider@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>,
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.h')
0 files changed, 0 insertions, 0 deletions