Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Check inside a normal repo for existence #2

Merged
merged 1 commit into from

2 participants

@GregSutcliffe
Collaborator

Change target for non-bare repos, so we can create/chown the holding dir before doing the clone.

Without this change, it's not possible to do something like:

file { "/usr/share/foreman":
ensure => directory,
owner => 'foreman'
} ->
git-repo { "foreman: user => 'foreman' }

Because '/usr/share' is owned by root. Instead, you have to do the checkout as root and then chown everything afterwards - far messier.

@ohadlevy
Owner

I guess this doesnt break the existing usage right?

@GregSutcliffe
Collaborator

I can't see how it would - if you check out into $dir then $dir must exist along with $dir/.git. Even if you're doing things like $dir: ensure => directory afterwards, that should still work. Certainly it hasn't broken any existing modules I'm using.

@ohadlevy ohadlevy merged commit 4e57a53 into theforeman:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2012
  1. Change target for non-bare repos, so we can create/chown the holding …

    Greg Sutcliffe authored
    …dir before doing the clone
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  manifests/repo.pp
View
2  manifests/repo.pp
@@ -39,7 +39,7 @@
$creates = $bare ? {
true => "${target}/objects",
- false => $target,
+ false => "${target}/.git",
}
exec { "git_repo_for_${name}":
Something went wrong with that request. Please try again.