Skip to content

git::repo does not update remote URL if it changes. #7

Description

@Aethylred

If you change a git::repo source parameter, e.g.

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/me/foo.git',
}

to

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/you/foo.git',
}

And does nothing.

While doing the same and changing the branch (iff the new branch does not exist on the old remote):

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/me/foo.git',
  branch  => 'master',
}

to

git::repo{'foo':
  path    => '/usr/src/foo,
  source  => 'git://github.com/you/foo.git',
  branch  => 'baa',
}

results in the error:

Error: /usr/bin/git checkout baa returned 1 instead of one of [0]
Error: /Stage[main]/Puppetdashboard::Install/Git::Repo[puppet-dashboard]/Exec[git_puppet-dashboard_co_branch]/returns: change from notrun to 0 failed: /usr/bin/git checkout baa returned 1 instead of one of [0]

...well because the baa branch doesn't exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions