core: turn saved_git_id into a std::string

Simplifies memory management. Think about unglobalizing this,
once everything is in C++ so that we can put an std::string
into struct divelog.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-02-28 08:49:42 +01:00 committed by Michael Keller
parent c05be40bfd
commit a1826f77da
4 changed files with 15 additions and 14 deletions

View file

@ -45,7 +45,6 @@ extern int git_load_dives(struct git_info *, struct divelog *log);
extern const char *get_sha(git_repository *repo, const char *branch);
extern int do_git_save(struct git_info *, bool select_only, bool create_empty);
extern void cleanup_git_info(struct git_info *);
extern const char *saved_git_id;
extern bool git_local_only;
extern bool git_remote_sync_successful;
extern void clear_git_id(void);
@ -58,6 +57,10 @@ int get_authorship(git_repository *repo, git_signature **authorp);
#ifdef __cplusplus
}
#include <string>
extern std::string saved_git_id;
#endif
#endif // GITACCESS_H