defunkt/hub — Issue #146: Problem with hub fork
Author: hron84
Created: 2012-03-04 02:06:24+00:00
State: open

Hi

I used hub fork and it makes me an accident. Let me tell the story.

There is two repository https://github.com/magiclabs/localized_country_select and https://github.com/karmi/localized_country_select These are nearly same but not same repositories (e.g. they are dedicated for two different gem). I have a patch agains rails 3.1.4 for both gem. I decided try send pull request to both repository to make their users more happy.

I forked and created a patch against magiclab's repository, and I made a pull request without problems. The next thing was making patch against karmi's repository, and send a pull request him too.

I cloned the karmi's repository with following commands:

```
mv localized_country_select magic-localized_country_select # moving out magiclab's one from way
hub clone karmi/localized_country_select
cd localized_country_select
hub fork
```

And that was the point where an accident happened. hub fork printed out a warning about already there is a repository with name localized_country_select and connected karmi's repo with my repo - what is definitelly not what I expected.

My problems:

- hub fork didn't asked me what I want to do (and/or didn't died)
- There is no documentation about fork command
- There is no way (or I do not know how can I) for define another name for the forked repo's name.

The current behavior is not clear, and can cause a problem similar this.

I know the basic problem is magiclab's and karmi's repository - because they has just a little different codebase, they merge these repos with pull requests, however I cannot and wouldn't instruct them about it. I had a good intention and I would like help them with a patch against ther codes and help for their users for fixing the repos against rails 3.1.4.

But, hub is done a totally insane thing. I think it cannot be happened without a question or without explicit switch.