summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-08-10 11:47:39 +0200
committerJunio C Hamano <gitster@pobox.com>2015-08-10 12:57:14 -0700
commitb4fb09e4da53bfc6c720337142af5db3204736d5 (patch)
treeee21234e6668f9a03d08d0713b3a27df4e3d444a /shallow.c
parentc99a4c2db3053e4fb6a43870f5c747f858b0f58f (diff)
downloadgit-b4fb09e4da53bfc6c720337142af5db3204736d5.tar.gz
lockfile: add accessor get_lock_file_path()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shallow.c b/shallow.c
index 257d8115c7..7973e74196 100644
--- a/shallow.c
+++ b/shallow.c
@@ -267,8 +267,8 @@ void setup_alternate_shallow(struct lock_file *shallow_lock,
if (write_shallow_commits(&sb, 0, extra)) {
if (write_in_full(fd, sb.buf, sb.len) != sb.len)
die_errno("failed to write to %s",
- shallow_lock->filename.buf);
- *alternate_shallow_file = shallow_lock->filename.buf;
+ get_lock_file_path(shallow_lock));
+ *alternate_shallow_file = get_lock_file_path(shallow_lock);
} else
/*
* is_repository_shallow() sees empty string as "no
@@ -314,7 +314,7 @@ void prune_shallow(int show_only)
if (write_shallow_commits_1(&sb, 0, NULL, SEEN_ONLY)) {
if (write_in_full(fd, sb.buf, sb.len) != sb.len)
die_errno("failed to write to %s",
- shallow_lock.filename.buf);
+ get_lock_file_path(&shallow_lock));
commit_lock_file(&shallow_lock);
} else {
unlink(git_path("shallow"));