commit | 28de5b6b400fcdbd2d0665bc0cec7d7e4b813b43 | [log] [tgz] |
---|---|---|
author | Shawn O. Pearce <spearce@spearce.org> | Mon Apr 12 16:25:27 2010 -0700 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Apr 12 21:45:13 2010 -0700 |
tree | eaa842b6a6719b73269e8ba2f2652a4377d492d5 | |
parent | 628511a5883fa809e86b34ebc147ac62eb214458 [diff] |
tag.c: Refactor parse_tag_buffer to be saner to program This code was horribly ugly to follow. The structure of the headers in an annotated tag object must follow a prescribed order, and most of these are required. Simplify the entire parsing logic by going through the headers in the order they are supposed to appear in, acting on each header as its identified in the buffer. This change has the same behavior as the older version, its just easier to read and maintain. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>