mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'aw/gc-lockfile-fscanf-fix'
"git gc" tries to avoid running two instances at the same time by reading and writing pid/host from and to a lock file; it used to use an incorrect fscanf() format when reading, which has been corrected. * aw/gc-lockfile-fscanf-fix: gc: call fscanf() with %<len>s, not %<len>c, when reading hostname
This commit is contained in:
commit
abdf7d8e25
|
@ -258,7 +258,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
|
||||||
int should_exit;
|
int should_exit;
|
||||||
|
|
||||||
if (!scan_fmt)
|
if (!scan_fmt)
|
||||||
scan_fmt = xstrfmt("%s %%%dc", "%"SCNuMAX, HOST_NAME_MAX);
|
scan_fmt = xstrfmt("%s %%%ds", "%"SCNuMAX, HOST_NAME_MAX);
|
||||||
fp = fopen(pidfile_path, "r");
|
fp = fopen(pidfile_path, "r");
|
||||||
memset(locking_host, 0, sizeof(locking_host));
|
memset(locking_host, 0, sizeof(locking_host));
|
||||||
should_exit =
|
should_exit =
|
||||||
|
|
Loading…
Reference in a new issue