Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-08-19 01:20:23 +0300
committerJunio C Hamano <gitster@pobox.com>2017-08-24 01:12:07 +0300
commit97de1803f8972c41703424bb1697c224deb2b558 (patch)
tree4d9ed75945a0c515a29ab3c963832c8ef77360d3 /packfile.c
parent84f80ad5e11d29b61570269a25cf447f34c5aeba (diff)
pack: move unuse_pack()
Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/packfile.c b/packfile.c
index 85cb65558f..93526ea7b8 100644
--- a/packfile.c
+++ b/packfile.c
@@ -596,3 +596,12 @@ unsigned char *use_pack(struct packed_git *p,
*left = win->len - xsize_t(offset);
return win->base + offset;
}
+
+void unuse_pack(struct pack_window **w_cursor)
+{
+ struct pack_window *w = *w_cursor;
+ if (w) {
+ w->inuse_cnt--;
+ *w_cursor = NULL;
+ }
+}