Thanks! That clears it up.

On Wednesday, May 3, 2017 at 7:52:58 AM UTC-7, Axel Wagner wrote:
>
> Yes, that would be the correct approach. And yes, the fork wouldn't be 
> go-gettable, but it isn't supposed to be long-lived or go-got anyway; it's 
> a fork to do a pull-request.
> If you want to do an actual fork (not what github calls a fork, but what 
> the open source community calls a fork), you are creating a new project 
> which should have a different name from the forked project and as such 
> should have the import paths rewritten.
>
> On Wed, May 3, 2017 at 4:43 PM, st ov <so.q...@gmail.com <javascript:>> 
> wrote:
>
>> In reading deeper, is the post saying to put my fork at the canonical 
>> path locally.
>>
>> So I'd clone my fork, *github.com/me/foo <http://github.com/me/foo>* to 
>> *github.com/original/foo 
>> <http://github.com/original/foo>* *locally*
>> But setup the git remote to push to *github.com/me/foo 
>> <http://github.com/me/foo>*
>>
>> Then locally, I would use the fully-qualified import path of 
>> import (
>>  "github.com/original/foo/internal/bar 
>> <http://github.com/me/foo/internal/bar>" 
>> )
>>
>> Is that the right workflow?
>> So now it should work locally and with the pull request, but won't the 
>> fork be broken? If for example, someone forks or clones my github repo the 
>> import path won't work?
>>
>>
>>
>> On Wednesday, May 3, 2017 at 7:33:49 AM UTC-7, st ov wrote:
>>>
>>> Thanks, if I read that right the post just rehashes the workflow for 
>>> working with remotes with git and go get.
>>>
>>> The question I have concerns the import path in the code.
>>>
>>> If I fork, *github.com/original/foo <http://github.com/original/foo>*
>>> clone it locally to, *github.com/me/foo <http://github.com/me/foo>*
>>> Add *github.com/me/foo/internal/bar/bar.go 
>>> <http://github.com/me/foo/internal/bar/bar.go>* and the following 
>>> import statement to *github.com/me/foo/main.go 
>>> <http://github.com/me/foo/main.go>*
>>>
>>> // idiomatic fully-qualified import path
>>> import (
>>>  "github.com/me/foo/internal/bar" 
>>> )
>>>
>>> Commit and push to my remote fork, *github.com/me/foo 
>>> <http://github.com/me/foo>*
>>>
>>> Now if I submit the push request to *github.com/original/foo 
>>> <http://github.com/original/foo>*, the import statement will be broken 
>>> since the import path is to my repo, *github.com/me/foo 
>>> <http://github.com/me/foo>*. 
>>> If I change the import path in my repo to that of the original, then 
>>> that breaks my repo.
>>>
>>> How is this situation suppose to be handled when contributing? 
>>>
>>>
>>>
>>> On Tuesday, May 2, 2017 at 11:55:41 PM UTC-7, Nathan Kerr wrote:
>>>>
>>>> http://blog.sgmansfield.com/2016/06/working-with-forks-in-go/ gives 
>>>> some good pointers on how to do this.
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to