Snippets error when trying to apply as patches, carriage returns have been changed
Created by: BrianGilbert
Using gitlab v2.7.0
We are trying to use snippets as part of our deployment process (via tokenised api link) as a means to apply patches to code, but they fail to apply, the exact same patch when placed in dropbox works fine when we use dropbox public link.
It seems the carriage returns are getting changed on the uploaded snippet:
If I apply locally using git: git apply auto.nodetitle-gitlab-snippet.patch auto.nodetitle-gitlab-snippet.patch:11: trailing whitespace. switch ($op) { auto.nodetitle-gitlab-snippet.patch:12: trailing whitespace. case 'insert': auto.nodetitle-gitlab-snippet.patch:13: trailing whitespace. unset($node->auto_nodetitle_applied); auto.nodetitle-gitlab-snippet.patch:14: trailing whitespace. if (auto_nodetitle_is_needed($node)) { auto.nodetitle-gitlab-snippet.patch:15: trailing whitespace. auto_nodetitle_set_title($node); error: patch failed: auto_nodetitle.module:62 error: auto_nodetitle.module: patch does not apply
If I try locally using patch: patch -p1 < auto.nodetitle-gitlab-snippet.patch (Stripping trailing CRs from patch.) patching file auto_nodetitle.module
Using the original patch file there are no messages about CRs.
Example files at: http://dl.dropbox.com/u/57690/gitlab/auto.nodetitle.patch http://dl.dropbox.com/u/57690/gitlab/auto.nodetitle-gitlab-snippet.patch
if you want to test against the actual code: git clone --recursive --branch 6.x-1.x http://git.drupal.org/project/auto_nodetitle.git
then change to the 6.x-1.2 tag