Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-11725

Bamboo Git repository checkout will always set autocrlf parameter to be false

    XMLWordPrintable

    Details

      Description

      Currently, if the source of the git project has the autocrlf = true parameter, this will not be reflected after it was check out by Bamboo. Steps to replicate the problem:

      1. Create a git repository The configuration is shown as follow:
        Global configuration
        .gitconfig
        [user]
        	name = admin
        	email = admin@yahoo.com
        

        Git repository configuration
        .git/config

        [core]
        	repositoryformatversion = 0
        	filemode = false
        	bare = false
        	logallrefupdates = true
        	symlinks = false
        	ignorecase = true
        	hideDotFiles = dotGitOnly
        	autocrlf = true
        
      2. Add items to the newly created git repository and commit it
      3. Create a new plan in Bamboo and configure the repository point to the newly created git repository
      4. Make sure the job run the repository check out task
      5. Now check .git/config file via <Bamboo home>\xml-data\build-dir\<project><plan><jobname>
      6. Open the .git/config and you might find that the following autocrlf = false:
        [core]
        	repositoryformatversion = 0
        	filemode = false
        	logallrefupdates = true
        	autocrlf = false
        

      However, the problem does not exist if the source is checkout using the script task with the following command:

      git clone file:///C:/git/
      

      The following is the result of the .git/config via _<Bamboo home>\xml-data\build-dir\<project><plan><jobname>:

      [core]
      	repositoryformatversion = 0
      	filemode = false
      	bare = false
      	logallrefupdates = true
      	symlinks = false
      	ignorecase = true
      	hideDotFiles = dotGitOnly
      [remote "origin"]
      	fetch = +refs/heads/*:refs/remotes/origin/*
      	url = file:///C:/git/
      [branch "master"]
      	remote = origin
      	merge = refs/heads/master
      

      As above the parameter autocrlf is not presented.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              zyap Zed Yap [Atlassian]
              Votes:
              11 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated: