diff options
| author | Jonathan Tan <jonathantanmy@google.com> | 2017-08-18 15:20:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-08-23 15:12:07 -0700 |
| commit | 97de1803f8972c41703424bb1697c224deb2b558 (patch) | |
| tree | 4d9ed75945a0c515a29ab3c963832c8ef77360d3 /packfile.c | |
| parent | 84f80ad5e11d29b61570269a25cf447f34c5aeba (diff) | |
| download | git-97de1803f8972c41703424bb1697c224deb2b558.tar.xz | |
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.c | 9 |
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; + } +} |
