pkt-line: add a member for hash algorithm
Add a member for the hash algorithm currently in use to the packet reader so it can parse references correctly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
1349ffed6d
commit
9a9f0d3fc0
|
@ -479,6 +479,7 @@ void packet_reader_init(struct packet_reader *reader, int fd,
|
||||||
reader->buffer_size = sizeof(packet_buffer);
|
reader->buffer_size = sizeof(packet_buffer);
|
||||||
reader->options = options;
|
reader->options = options;
|
||||||
reader->me = "git";
|
reader->me = "git";
|
||||||
|
reader->hash_algo = &hash_algos[GIT_HASH_SHA1];
|
||||||
}
|
}
|
||||||
|
|
||||||
enum packet_read_status packet_reader_read(struct packet_reader *reader)
|
enum packet_read_status packet_reader_read(struct packet_reader *reader)
|
||||||
|
|
|
@ -166,6 +166,9 @@ struct packet_reader {
|
||||||
|
|
||||||
unsigned use_sideband : 1;
|
unsigned use_sideband : 1;
|
||||||
const char *me;
|
const char *me;
|
||||||
|
|
||||||
|
/* hash algorithm in use */
|
||||||
|
const struct git_hash_algo *hash_algo;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue