{"thread":{"id":"10406","subject":"how to deal with conflicts after \"git stash apply\"?","startedAt":"2007-10-21T22:32:07Z","lastAt":"2007-10-22T04:39:33Z","messageCount":4,"participants":["Scott Parish","Johannes Schindelin","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56788","messageId":"20071021223206.GJ16291@srparish.net","threadId":"10406","inReplyTo":null,"subject":"how to deal with conflicts after \"git stash apply\"?","fromName":"Scott Parish","fromEmail":"srp@srparish.net","sentAt":"2007-10-21T22:32:07Z","receivedAt":"2007-10-21T22:32:07Z","isPatch":false,"sender":{"key":"srp@srparish.net","avatar":"https://gravatar.com/avatar/870e5b6fc4f710cf4db5684bd9af7f2cee5734b3dab3209b13e00cf64f6c9f0e?d=mp&s=160"},"body":"How is the intended way to deal with \"git stash apply\" conflicts?\nIf i just edit the file and remove the conflict, \"git diff\" gives\nsome really messed up output. Documentation for other commands and\nconflicts suggest \"git commit\" after cleaning up the conflict, or\n\"git add\", but in the case of \"stash apply\" i'm not ready for a\ncommit yet, and \"git add\" keeps \"git diff\" from showing any output.\n\nThanks for any clarification\nsRp\n\n-- \nScott Parish\nhttp://srparish.net/\n"},{"id":"56789","messageId":"Pine.LNX.4.64.0710212338200.25221@racer.site","threadId":"10406","inReplyTo":"20071021223206.GJ16291@srparish.net","subject":"Re: how to deal with conflicts after \"git stash apply\"?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-21T22:40:51Z","receivedAt":"2007-10-21T22:40:51Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 21 Oct 2007, Scott Parish wrote:\n\n> How is the intended way to deal with \"git stash apply\" conflicts?\n> If i just edit the file and remove the conflict, \"git diff\" gives\n> some really messed up output. Documentation for other commands and\n> conflicts suggest \"git commit\" after cleaning up the conflict, or\n> \"git add\", but in the case of \"stash apply\" i'm not ready for a\n> commit yet, and \"git add\" keeps \"git diff\" from showing any output.\n\nYou are probably seeing combined diffs.\n\nThis show not only the differences of the working tree relative to HEAD, \nbut also of the changes stored in the stash.\n\nYou should have a look into Documentation/diff-format.txt (section \n\"combined diff format\") to learn more.\n\nHth,\nDscho\n"},{"id":"56799","messageId":"20071022042609.GK14735@spearce.org","threadId":"10406","inReplyTo":"Pine.LNX.4.64.0710212338200.25221@racer.site","subject":"Re: how to deal with conflicts after \"git stash apply\"?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-22T04:26:09Z","receivedAt":"2007-10-22T04:26:09Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Sun, 21 Oct 2007, Scott Parish wrote:\n> \n> > How is the intended way to deal with \"git stash apply\" conflicts?\n> > If i just edit the file and remove the conflict, \"git diff\" gives\n> > some really messed up output. Documentation for other commands and\n> > conflicts suggest \"git commit\" after cleaning up the conflict, or\n> > \"git add\", but in the case of \"stash apply\" i'm not ready for a\n> > commit yet, and \"git add\" keeps \"git diff\" from showing any output.\n> \n> You are probably seeing combined diffs.\n> \n> This show not only the differences of the working tree relative to HEAD, \n> but also of the changes stored in the stash.\n\nThe reason Scott is seeing a combined diff here is merge-recursive\nleft the different versions of the file in the higher order stages\nof the index when it found conflicts during the apply.  You need\nto use git-add to stage the resolved file and replace the higher\norder stages with just the normal stage 0.\n\n-- \nShawn.\n"},{"id":"56800","messageId":"20071022043933.GL16291@srparish.net","threadId":"10406","inReplyTo":"Pine.LNX.4.64.0710212338200.25221@racer.site","subject":"Re: how to deal with conflicts after \"git stash apply\"?","fromName":"Scott Parish","fromEmail":"srp@srparish.net","sentAt":"2007-10-22T04:39:33Z","receivedAt":"2007-10-22T04:39:33Z","isPatch":false,"sender":{"key":"srp@srparish.net","avatar":"https://gravatar.com/avatar/870e5b6fc4f710cf4db5684bd9af7f2cee5734b3dab3209b13e00cf64f6c9f0e?d=mp&s=160"},"body":"> You should have a look into Documentation/diff-format.txt (section \n> \"combined diff format\") to learn more.\n\nAh, thanks for the pointer; i hadn't realized that this wasn't\nstandard diff format. With this and what Shawn said, it all makes\nsense now.\n\nsRp\n\n-- \nScott Parish\nhttp://srparish.net/\n"}]}