From: Bruno Haible Date: Mon, 5 May 2025 09:40:06 +0000 (+0200) Subject: vc-mtime: Make it work with Cygwin's 'git' command on native Windows. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5190b5161f992e789c4e749d38ba7d92f429e0d;p=thirdparty%2Fgnulib.git vc-mtime: Make it work with Cygwin's 'git' command on native Windows. * lib/vc-mtime.c: Include windows-cygpath.h. (abs_git_checkout): Invoke windows_cygpath_w. * modules/vc-mtime (Depends-on): Add windows-cygpath. --- diff --git a/ChangeLog b/ChangeLog index 7c790cdff3..646f7e268f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-05-05 Bruno Haible + + vc-mtime: Make it work with Cygwin's 'git' command on native Windows. + * lib/vc-mtime.c: Include windows-cygpath.h. + (abs_git_checkout): Invoke windows_cygpath_w. + * modules/vc-mtime (Depends-on): Add windows-cygpath. + 2025-05-05 Bruno Haible New module windows-cygpath. diff --git a/lib/vc-mtime.c b/lib/vc-mtime.c index 4ebc249d84..7d792ba33f 100644 --- a/lib/vc-mtime.c +++ b/lib/vc-mtime.c @@ -35,6 +35,7 @@ #include "safe-read.h" #include "xstrtol.h" #include "stat-time.h" +#include "windows-cygpath.h" #include "filename.h" #include "xalloc.h" #include "xgetcwd.h" @@ -357,7 +358,11 @@ abs_git_checkout (void) exitstatus = wait_subprocess (child, "git", true, true, true, false, NULL); if (exitstatus == 0) - return line; + { + char *line_converted = windows_cygpath_w (line); + free (line); + return line_converted; + } } free (line); return NULL; diff --git a/modules/vc-mtime b/modules/vc-mtime index 207e62781c..b4f74f5d36 100644 --- a/modules/vc-mtime +++ b/modules/vc-mtime @@ -16,6 +16,7 @@ error getline xstrtol stat-time +windows-cygpath filename xalloc xgetcwd