diff options
Diffstat (limited to 'src/other_tools/utils/parse_git_tree.cpp')
-rw-r--r-- | src/other_tools/utils/parse_git_tree.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/other_tools/utils/parse_git_tree.cpp b/src/other_tools/utils/parse_git_tree.cpp index c14f4c55..c8cd23e7 100644 --- a/src/other_tools/utils/parse_git_tree.cpp +++ b/src/other_tools/utils/parse_git_tree.cpp @@ -106,12 +106,11 @@ } } // populate struct - auto info = GitTreeInfo{.tree_hash = *std::move(repo_desc_hash_info), - .env_vars = std::move(env), - .inherit_env = std::move(inherit_env), - .command = std::move(cmd)}; - if (origin) { - info.origin = *std::move(origin); - } + auto info = + GitTreeInfo{.tree_hash = *std::move(repo_desc_hash_info), + .env_vars = std::move(env), + .inherit_env = std::move(inherit_env), + .command = std::move(cmd), + .origin = origin ? std::move(*origin) : std::string{}}; return info; } |