summaryrefslogtreecommitdiffstats
path: root/save-git.c
diff options
context:
space:
mode:
Diffstat (limited to 'save-git.c')
-rw-r--r--save-git.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/save-git.c b/save-git.c
index 3f540eab9..e13847125 100644
--- a/save-git.c
+++ b/save-git.c
@@ -549,7 +549,8 @@ static void create_dive_name(struct dive *dive, struct membuffer *name, struct t
if (tm.tm_mon != dirtm->tm_mon)
put_format(name, "%02u-", tm.tm_mon+1);
- put_format(name, "%02u-%s-%02u:%02u:%02u",
+ /* a colon is an illegal char in a file name on Windows - use an '=' instead */
+ put_format(name, "%02u-%s-%02u=%02u=%02u",
tm.tm_mday, weekday[tm.tm_wday],
tm.tm_hour, tm.tm_min, tm.tm_sec);
}
@@ -978,19 +979,19 @@ static int update_git_checkout(git_repository *repo, git_object *parent, git_tre
static int get_authorship(git_repository *repo, git_signature **authorp)
{
#if LIBGIT2_VER_MAJOR || LIBGIT2_VER_MINOR >= 20
- return git_signature_default(authorp, repo);
-#else
+ if (git_signature_default(authorp, repo) == 0)
+ return 0;
+#endif
/* Default name information, with potential OS overrides */
struct user_info user = {
.name = "Subsurface",
- .email = "subsurace@hohndel.org"
+ .email = "subsurace@subsurface-divelog.org"
};
subsurface_user_info(&user);
/* git_signature_default() is too recent */
return git_signature_now(authorp, user.name, user.email);
-#endif
}
static void create_commit_message(struct membuffer *msg)
@@ -1052,7 +1053,7 @@ static int create_new_commit(git_repository *repo, const char *remote, const cha
const git_oid *id = git_commit_id((const git_commit *) parent);
/* if we are saving to the same git tree we got this from, let's make
* sure there is no confusion */
- if (!strcmp(existing_filename, remote) && git_oid_strcmp(id, saved_git_id))
+ if (same_string(existing_filename, remote) && git_oid_strcmp(id, saved_git_id))
return report_error("The git branch does not match the git parent of the source");
}