Hi!
I just realized that parse_next_hunk() at present only detects a property
hunk if it has a property header ('Added', 'Deleted', 'Modified')
directly preceeding it. The second hunk won't know what propname it
belongs to.
We previously had diff headers and hunk headers. The property header is
only set before the first hunk and is thus not the same sort as any of
the two previous ones.
What should parse_next_hunk() do to properly handle property hunks?
---------------------------------------------------------------------
Alternative 1
Fetch the next hunk and tell the caller if it's a property or a text
hunk. (let it be up to the caller to remember what the last prop_name
was)
Alternative 2
Keep track of if we're currently below a property header (and hasn't
seen any text hunks since that property header). That means passing
around a 'prop_name' variable that would be set to NULL if the previous hunk
was a text hunk and otherwise have the value of the last parsed
property name.
Any suggestions?
Thanks,
Daniel