Page MenuHomePhabricator

[CMAKE] Silent git error output when running from cmake
ClosedPublic

Authored by Fabien on Mon, Mar 9, 17:05.

Details

Reviewers
jasonbcox
Group Reviewers
Restricted Project
Commits
rABC170ea4fe02a7: [CMAKE] Silent git error output when running from cmake
Summary

The standard output is set to a variable and the result code is handled
by the cmake script, so there is no need for displaying the errors.
The output displayed on screen can be confusing in case of an error,
i.e:

fatal: not a git repository (or any of the parent directories): .git

when building from a github archive and not a repo
clone (see https://github.com/Bitcoin-ABC/bitcoin-abc/issues/371).

Test Plan

Don't run the test plan on your local dev repo. Clone a new one and
remove the .git directory.

cmake -GNinja ..
ninja check

There should be no fatal error output message.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Mon, Mar 9, 17:05
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Mar 9, 17:05
Fabien edited the summary of this revision. (Show Details)Mon, Mar 9, 17:06
jasonbcox accepted this revision.Mon, Mar 9, 17:18
This revision is now accepted and ready to land.Mon, Mar 9, 17:18
This revision was automatically updated to reflect the committed changes.