git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A question about using 'add -p' to split the patch
@ 2009-06-15  3:08 Ping Yin
  2009-06-15  6:12 ` David Aguilar
  0 siblings, 1 reply; 5+ messages in thread
From: Ping Yin @ 2009-06-15  3:08 UTC (permalink / raw)
  To: git mailing list

file bt.php in the HEAD:

function bt_add($path) {
 return;
}

file bt.php in the working directory:

function bt_move($path, $pos) {
  return;
}
function bt_add($path, $pos) {
  bt_move($path, $pos)
  return;
}

Now i want to split the change into two parts:
First introduce bt_move
Then add a param pos to bt_add and call bt_move

With the 'e' action of 'add -p', i got

-function bt_add($path) {
+function bt_move($path, $pos) {
+  return;
+}
+function bt_add($path, $pos) {
+  bt_move($path, $pos)
   return;
 }

Then, i want to edit the patch to get


function bt_move($path, $pos) {
  return;
}
function bt_add($path) {
  return;
}

However, whatever i do, the patch fails to apply. Any suggestion?

-


Ping Yin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-06-15  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15  3:08 A question about using 'add -p' to split the patch Ping Yin
2009-06-15  6:12 ` David Aguilar
2009-06-15  6:24   ` Ping Yin
2009-06-15  7:36     ` David Aguilar
2009-06-15  8:56       ` Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).