Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Rast
Date: Thursday, June 5, 2008 - 2:38 am

Jeff King wrote:

Maybe git gui could do a sort of "toggle the lines I click" interface.
But I don't know anything about Tk, or Tcl, or git gui :-(

[...]

Now I'm slightly confused.

Doing it that way would be almost like my original patch

  http://www.spinics.net/lists/git/msg66971.html

minus the numeric prefixes -- meaning that you have to say y/n to
_every_ line in the patch, at least until all remaining hunks are the
same and you can answer the rest with a/d.

Except that it wouldn't work anyway, because git-apply refuses hunks
that have no context (even if just on one end).  Unless given
=2D-unidiff-zero, but that apparently was one of the points of refusal
in the thread Dscho linked earlier:

  http://thread.gmane.org/gmane.comp.version-control.git/67854/focus=3D68127

Granted, we could insert extra context and/or make sure the mentioned
data loss can never happen (it's probably prevented by 'add -p's own
recounting before the final apply), but the first would make the UI
even more confusing and the second is potentially dangerous.

=2D Thomas

=2D-=20
Thomas Rast
trast@student.ethz.ch
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] git-add--interactive: manual hunk editing mode, Thomas Rast, (Fri May 23, 1:21 pm)
Re: [PATCH] git-add--interactive: manual hunk editing mode, Johannes Schindelin, (Thu May 29, 9:12 am)
Re: [PATCH] git-add--interactive: manual hunk editing mode, Johannes Schindelin, (Fri May 30, 2:49 am)
Re: [PATCH] git-add--interactive: manual hunk editing mode, Jakub Narebski, (Fri May 30, 3:46 am)
Re: [PATCH] git-add--interactive: manual hunk editing mode, Junio C Hamano, (Fri May 30, 2:35 pm)
Re: [RFC PATCH] git-add--interactive: manual hunk editing ..., Thomas Rast, (Thu Jun 5, 2:38 am)
Re: [RFC PATCH] git-add--interactive: manual hunk editing ..., Johannes Schindelin, (Thu Jun 5, 3:28 am)
Re: [RFC PATCH] git-add--interactive: manual hunk editing ..., Johannes Schindelin, (Fri Jun 6, 7:31 am)
Re: [RFC PATCH] git-add--interactive: manual hunk editing ..., Johannes Schindelin, (Sun Jun 8, 4:02 pm)
Re: [RFC PATCH] git-add--interactive: manual hunk editing ..., Johannes Schindelin, (Sun Jun 8, 4:06 pm)
Re: [PATCH v3] git-add--interactive: manual hunk editing mode, Johannes Schindelin, (Sun Jun 8, 4:19 pm)
Re: [PATCH v3] git-add--interactive: manual hunk editing mode, Johannes Schindelin, (Mon Jun 9, 9:13 am)
Re: [PATCH v3] git-add--interactive: manual hunk editing mode, Andreas Ericsson, (Tue Jun 10, 4:19 am)
Re: [PATCH v4] git-add--interactive: manual hunk editing mode, Johannes Schindelin, (Mon Jun 23, 11:54 am)
apply --recount, was Re: [PATCH v4] git-add--interactive: ..., Johannes Schindelin, (Mon Jun 23, 2:16 pm)
[PATCH 0/3] Manual editing for 'add' and 'add -p', Thomas Rast, (Tue Jun 24, 12:07 pm)
Re: [PATCH 0/3] Manual editing for 'add' and 'add -p', Miklos Vajna, (Tue Jun 24, 12:53 pm)
Re: [PATCH 1/3] Allow git-apply to ignore the hunk headers ..., Johannes Schindelin, (Fri Jun 27, 10:43 am)