Skip to content

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

@Aethylred

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions