path: root/builtin/cat-file.c
diff options
authorJunio C Hamano <>2014-01-10 18:32:10 (GMT)
committerJunio C Hamano <>2014-01-10 18:32:10 (GMT)
commitb0504a95193504b9d37ef8f01b5b2403e345ee89 (patch)
tree594fc2504131dacb49fb52b110471728cc24120b /builtin/cat-file.c
parent010d81ae35238c1b60144dce3fd3eba90a45b434 (diff)
parent663a8566beb5387530641abe71a8d8b2dafd08b3 (diff)
Merge branch 'cc/replace-object-info'
read_sha1_file() that is the workhorse to read the contents given an object name honoured object replacements, but there is no corresponding mechanism to sha1_object_info() that is used to obtain the metainfo (e.g. type & size) about the object, leading callers to weird inconsistencies. * cc/replace-object-info: replace info: rename 'full' to 'long' and clarify in-code symbols Documentation/git-replace: describe --format option builtin/replace: unset read_replace_refs t6050: add tests for listing with --format builtin/replace: teach listing using short, medium or full formats sha1_file: perform object replacement in sha1_object_info_extended() t6050: show that git cat-file --batch fails with replace objects sha1_object_info_extended(): add an "unsigned flags" parameter sha1_file.c: add lookup_replace_object_extended() to pass flags replace_object: don't check read_replace_refs twice rename READ_SHA1_FILE_REPLACE flag to LOOKUP_REPLACE_OBJECT
Diffstat (limited to 'builtin/cat-file.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index f8288c8..f12071a 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -241,7 +241,7 @@ static int batch_one_object(const char *obj_name, struct batch_options *opt,
return 0;
- if (sha1_object_info_extended(data->sha1, &data->info) < 0) {
+ if (sha1_object_info_extended(data->sha1, &data->info, LOOKUP_REPLACE_OBJECT) < 0) {
printf("%s missing\n", obj_name);
return 0;