author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 12 Apr 2010 23:25:27 +0000 (16:25 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Apr 2010 04:45:13 +0000 (21:45 -0700) | ||
commit | 28de5b6b400fcdbd2d0665bc0cec7d7e4b813b43 | |
tree | eaa842b6a6719b73269e8ba2f2652a4377d492d5 | tree | snapshot |
parent | 628511a5883fa809e86b34ebc147ac62eb214458 | commit | 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>
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>
tag.c | diff | blob | history |