mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert git_info to std::string
Quite a bit of fallout in users of this structure. Conveniently, since git-access.cpp is now C++ we can move some helpers from the monstrous qthelper.cpp to git-access.cpp. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ae299d5e66
commit
a123589efb
13 changed files with 290 additions and 319 deletions
|
|
@ -45,7 +45,7 @@ extern "C" void print_version()
|
|||
|
||||
extern "C" void print_files()
|
||||
{
|
||||
struct git_info info = { };
|
||||
struct git_info info;
|
||||
const char *filename;
|
||||
|
||||
printf("\nFile locations:\n\n");
|
||||
|
|
@ -58,12 +58,11 @@ extern "C" void print_files()
|
|||
/* strdup so the free below works in either case */
|
||||
filename = strdup("No valid cloud credentials set.\n");
|
||||
}
|
||||
if (info.localdir) {
|
||||
printf("Local git storage: %s\n", info.localdir);
|
||||
if (!info.localdir.empty()) {
|
||||
printf("Local git storage: %s\n", info.localdir.c_str());
|
||||
} else {
|
||||
printf("Unable to get local git directory\n");
|
||||
}
|
||||
cleanup_git_info(&info);
|
||||
printf("Cloud URL: %s\n", filename);
|
||||
free((void *)filename);
|
||||
char *tmp = hashfile_name_string();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue