diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-17 15:44:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-19 12:35:37 -0700 |
commit | acd3b9eca82e38950f94e4708b528b7dae09a7c8 (patch) | |
tree | f341dae377b97e9c7fd9746208be0fee56bda438 /pack-refs.c | |
parent | f5637549a7eb93883839de01399418e10bf81768 (diff) | |
download | git-acd3b9eca82e38950f94e4708b528b7dae09a7c8.tar.gz |
Enhance hold_lock_file_for_{update,append}() API
This changes the "die_on_error" boolean parameter to a mere "flags", and
changes the existing callers of hold_lock_file_for_update/append()
functions to pass LOCK_DIE_ON_ERROR.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-refs.c')
-rw-r--r-- | pack-refs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pack-refs.c b/pack-refs.c index 848d311c2b..2c76fb181f 100644 --- a/pack-refs.c +++ b/pack-refs.c @@ -89,7 +89,8 @@ int pack_refs(unsigned int flags) memset(&cbdata, 0, sizeof(cbdata)); cbdata.flags = flags; - fd = hold_lock_file_for_update(&packed, git_path("packed-refs"), 1); + fd = hold_lock_file_for_update(&packed, git_path("packed-refs"), + LOCK_DIE_ON_ERROR); cbdata.refs_file = fdopen(fd, "w"); if (!cbdata.refs_file) die("unable to create ref-pack file structure (%s)", |