mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
packfile: add repository argument to unpack_entry
Add a repository argument to allow the callers of unpack_entry to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
5da6534dd6
commit
57a6a500be
@@ -1,4 +1,5 @@
|
||||
#include "cache.h"
|
||||
#include "repository.h"
|
||||
#include "pack.h"
|
||||
#include "pack-revindex.h"
|
||||
#include "progress.h"
|
||||
@@ -134,7 +135,7 @@ static int verify_packfile(struct packed_git *p,
|
||||
data = NULL;
|
||||
data_valid = 0;
|
||||
} else {
|
||||
data = unpack_entry(p, entries[i].offset, &type, &size);
|
||||
data = unpack_entry(the_repository, p, entries[i].offset, &type, &size);
|
||||
data_valid = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user