diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-18 07:18:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-18 07:18:59 +0200 |
commit | 14431c717d1c549454b00800ee05723c82054765 (patch) | |
tree | 195a33ae9d8de921ade4102be93d47322534709b /builtin | |
parent | Merge branch 'tg/refs-allowed-flags' into maint (diff) | |
parent | gc: call fscanf() with %<len>s, not %<len>c, when reading hostname (diff) | |
download | git-14431c717d1c549454b00800ee05723c82054765.tar.xz git-14431c717d1c549454b00800ee05723c82054765.zip |
Merge branch 'aw/gc-lockfile-fscanf-fix' into maint
"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
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index e6b84475ae..53c19be8b2 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -257,7 +257,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid) int should_exit; 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"); memset(locking_host, 0, sizeof(locking_host)); should_exit = |