[rspec-devel] Some weirdness with the repo
pergesu at gmail.com
Fri Apr 4 16:52:39 EDT 2008
On Fri, Apr 4, 2008 at 1:21 PM, Pat Maddox <pergesu at gmail.com> wrote:
> Hey everyone,
> The rspec-devel repo was in a funky state. Both rspec and rspec-rails
> were added as submodules, but the rspec-rails directory had some files
> already committed to it. This meant that if you branched the parent
> repo or rspec-rails, they were tied together and commits would go into
> the master only. I fixed this by trashing the rspec-rails directory
> and re-adding it as a submodule.
> You can partly see the problem by looking at the history:
> As you can see in the latest one, there's no mention of rspec or
> rspec-rails, which is how it should be.
> Updating your code should probably Just Work, but if you notice any
> wonkiness then you're probably best off just doing a fresh clone.
I found a potential source of the problem. When you commit a
submodule, you have to go back to the parent and add the submodule so
that it knows which commit to link to. If you do
git add example_rails_app/vendor/plugins/rspec-rails
then it's fine, but if you do
git add example_rails_app/vendor/plugins/rspec-rails/ (notice the
then it blows away the submodule and just adds the files.
I'm investigating to see if there's a way we can protect against
that...but in the mean time just be careful, or only use "git commit
More information about the rspec-devel