| Issue 81: | Problems patching for git rebase / git am | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? either 1) git rebase --onto master topicA topicB or 2) git format-patch topicA && git am < 0001* What is the expected output? The git-generated patch should apply cleanly. What do you see instead? Applying <commit message> .dotest/patch:22: trailing whitespace. […] warning: squelched 677 whitespace errors warning: 682 lines add whitespace errors. What version of the product are you using? On what operating system? 1.5.4.950.ga176 (Git-1.5.4-preview20080202.exe) on Windows XP Pro SP2. Please provide any additional information below. It seems that the patches generated have different line-endings from what the patcher process wants to see. I see this when running msysgit both from a Cygwin shell and from cmd.exe. |
|
,
Jun 28, 2008
I was unable to reproduce with git am; it seems that although the patch files are LF, Git converts between them. Can you upgrade to the latest version of msysgit and test? If you still get the error, we'll need more information about your setup (especially about CRLF) to figure out the problem. |
|
,
Jun 28, 2008
My apologies, I was using my cygwin executable. I do get an error, although somewhat different: Applying Master change .dotest/patch:10: trailing whitespace. Master change (1) error: a.txt: does not match index Patch failed at 0001. When you have resolved this problem run "Program --resolved". If you would prefer to skip this patch, instead run "Program --skip". Whereas the cygwin version works. Rebase works for me. I think it would definitely be helpful if you constructed a test-case to setup the repository. |
|
,
Jul 15, 2008
This does seems to be solved with the current release (1.5.6), at least I do not seem to be able to reproduce it using a script I just set up. I have not verified that it does *not* work in the old version, though. Test case needs to be run with a bash shell set-up to emit CRLFs. |
|
,
Jul 18, 2008
Hmm, no, that testcase doesn't seem to reproduce the error even on a machine where I still have 1.5.4.950.ga176 installed... :-/ |
|
,
Mar 10, 2009
I guess that the issue with "a.txt does not match index" is a Cygwin/msysGit disagreement. IOW the user forgot to call "git status" before running "git rebase". I am really tempted to mark this "invalid". |
|
,
Mar 12, 2009
Tentatively closed
Status: Closed
|
|
,
Mar 16, 2009
I do not have Cygwin Git installed, using msysgit exclusively. I do see the "whitespace error" a lot when I run git rebase, even with the 1.6.0 version (not tested with the just-released version). I have not yet been able to generate a minimal working testcase, unfortunately, and the source code in the repository is closed-source. |
|
,
Mar 17, 2009
Here is a test case that seems to reproduce it. The rebase is supposed to fail since there are conflicting changes. It however does reproduce the "trailing whitespace" errors (only two of them here since there are only two lines changed). |
|
,
Mar 17, 2009
The problem appears to be the common cause of almost all CR/LF issues: you have CRs committed to the repository. The principal assumption of line-ending handling in Git (as well as in other SCMs, by the way) is that your _working directory_ has DOS line endings, but not what you committed. In your case, the committed files _have_ DOS line endings, therefore the patches have DOS line endings, and therefore Git says it will strip trailing whitespace, which is correct. |
|
| ► Sign in to add a comment |