Hello!
I made a commit and created a patch out of that. Then I reset my master before that commit.
Now, in the drop down box in: Actions -> Apply Patch... , I select the patch file just created, but the item "import as full commit" is greyed out. I cannot see the reason why it is disabled?
Hi Christoph,
This would indicate to me that the patch either isn't made from a commit or there's something wrong with the patch file itself. In Mercurial we expect to see "# HG changeset patch" at the start of the file and in Git we expect to see "From: " and "Subject: " as is usually in a patch file made from a commit (more docs on Git patches here: http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html). It can only be a full commit if it was a patch created from a commit, hence the reliance on what should be in the patch file.
You may have accidentally created the patch from uncommitted changes meaning there was no author and thus not allowing you to import it as a full commit. If you check the patch file contents itself to see if they match the format as was briefly described in the above paragraph then we can see from there what's going wrong in this case.
Hope that helps
Cheers
<body></body>I am using GIT by the way :-)
I created the patch from a commit that I haven't pushed yet.
I checked the patch file and it starts with:
From 9a247ca8a521b066adb43e9c9369223781816f99 Mon Sep 17 00:00:00 2001 From: Christoph <christoph.dietze@gmail.com> Date: Fri, 11 Jan 2013 11:12:50 +0100 Subject: ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The git patch analysis actually looks for 'From:' in the first line, when in fact yours starts with 'From ' (no colon). Looks like git format-patch's output must have changed without us noticing.
Filed as a bug here: https://jira.atlassian.com/browse/SRCTREE-1376
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using git directly on the commandline works:
git am ../patch.diff Applying: My generous patch
But in SourceTree I cannot apply the commit from that same file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.