Thread (61 messages) flat view 61 messages, 4 authors, 2016-06-15

Re: [PATCH] Fix failed tag parsing when tag object has no body/message (and thus ends with a single '\n')

From: Johan Herland <hidden>
Date: 2016-06-15 22:43:14

Possibly related (same subject, not in this thread)

On Friday 08 June 2007, Junio C Hamano wrote:
Johan Herland [off-list ref] writes:
quoted
Thanks to Johannes Schindelin [off-list ref] for
discovering this.

Also add a testcase for this condition.

Signed-off-by: Johan Herland <redacted>
While this certainly is an improvement, I suspect that your
parse_tag() does a little too much.  In a format such as "tag"
object that does header + blank + body, it is customary to allow
header fields that your version does not understand (assuming
that such extention will go after the known fields is fine).

Which means that you should not be even saying "Ok, I've checked all
headers I know about---there should be a double LF to terminate it",
as you do not know if headers have ended.
Ok, I'm currently working on a patch series for Dscho and others where I 
split up the big patch ('[PATCH 1/6] Refactor git tag objects; make "tag" 
header optional; introduce new optional "keywords" header') into babysteps.

I can:

1. Provide a new patch series to totally replace the previous 6-part patch 
series (plus bugfixes). The new patch series will make smaller steps and 
end up (hopefully) in a better place, with less overzealous 
checking/parsing, and more "traditional" whitespacing.

OR

2. Provide the babystep-series ending up exactly where we are today (i.e. 
after the patch series, plus bug fixes). Then, provide patches on top of 
the existing series to get it into shape, both scope-wise (i.e. not trying 
to do too much) and whitespace-wise.

Which do you prefer?


...Johan
-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help