Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #1175

Closed
Open
Created Jul 31, 2012 by Administrator@rootOwner

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

Assignee
Assign to
Time tracking