Re: [PATCH 1/2] Allow git-apply to fix up the line counts

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Thursday, June 5, 2008 - 11:39 am

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


So you _are_ ignoring the line counts recorded in the hunk headers.  It is
not even 'adjust' but 'count lines to guess'.

If the incoming patch text does not have confusing contents at the end,
the guessing is reasonably safe.  You need to watch out for blank lines,
which means the same as /^ $/, and mail signature separators /^-- $/.
They can confuse you into guessing wrongly and include more preimage lines
than there actually are.

So it would be more like

--ignore-line-counts::
	Ignore number of lines recorded in the hunk headers; instead count
        lines that look like hunk contents to determine how big each hunk
	is.

I haven't started to nitpick the actual code yet but I know the original
is a tricky pice of code, so we may find something interesting ;-)


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] Allow git-apply to fix up the line counts, Johannes Schindelin, (Thu Jun 5, 3:16 am)
[PATCH 2/2] git-add: introduce --edit (to edit the diff vs ..., Johannes Schindelin, (Thu Jun 5, 3:17 am)
Re: [PATCH 1/2] Allow git-apply to fix up the line counts, Johannes Schindelin, (Thu Jun 5, 6:04 am)
Re: [PATCH 1/2] Allow git-apply to fix up the line counts, Johannes Schindelin, (Thu Jun 5, 6:47 am)
Re: [PATCH 1/2] Allow git-apply to fix up the line counts, Johannes Schindelin, (Thu Jun 5, 7:54 am)
[PATCH v2 0/2] git add --edit, Johannes Schindelin, (Thu Jun 5, 9:19 am)
[PATCH v2 1/2] Allow git-apply to ignore the hunk headers, Johannes Schindelin, (Thu Jun 5, 9:20 am)
[PATCH v2 2/2] git-add: introduce --edit (to edit the diff ..., Johannes Schindelin, (Thu Jun 5, 9:20 am)
Re: [PATCH 1/2] Allow git-apply to fix up the line counts, Junio C Hamano, (Thu Jun 5, 11:39 am)
Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers, Johannes Schindelin, (Thu Jun 5, 3:39 pm)
[PATCH v3 0/2] git add --edit, Johannes Schindelin, (Thu Jun 5, 4:06 pm)
[PATCH v3 1/2] Allow git-apply to ignore the hunk headers ..., Johannes Schindelin, (Thu Jun 5, 4:06 pm)
[PATCH v3 2/2] git-add: introduce --edit (to edit the diff ..., Johannes Schindelin, (Thu Jun 5, 4:07 pm)
Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers, Johannes Schindelin, (Thu Jun 5, 4:36 pm)
Re: [PATCH v3 0/2] git add --edit, Junio C Hamano, (Thu Jun 5, 9:55 pm)
Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk head ..., Johannes Schindelin, (Fri Jun 6, 6:58 am)
Re: [PATCH v3 0/2] git add --edit, Johannes Schindelin, (Fri Jun 6, 6:59 am)
Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk head ..., Johannes Schindelin, (Fri Jun 6, 7:00 am)
Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers, Johannes Schindelin, (Fri Jun 6, 7:04 am)
Re: [PATCH v3 2/2] git-add: introduce --edit (to edit the ..., Johannes Schindelin, (Fri Jun 6, 7:21 am)
Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers, Johannes Schindelin, (Fri Jun 6, 7:27 am)
Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk head ..., Johannes Schindelin, (Fri Jun 6, 9:37 am)
Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk head ..., Johannes Schindelin, (Fri Jun 6, 10:35 am)