bugfix: HTTPS Clone fails with remote pointer not found using Go transport (#836) #842

Merged
codexetreme merged 10 commits from bugfix/error_while_cloning into main 2021-10-23 12:33:11 -05:00
codexetreme commented 2021-10-15 03:41:43 -05:00 (Migrated from github.com)

Fixes: #836

Changes:

  • adding a weak bool param for Remote
  • create a new remote in the smartTransportCallback incase one is not found
Fixes: #836 Changes: * adding a weak bool param for Remote * create a new remote in the smartTransportCallback incase one is not found
lhchavez (Migrated from github.com) reviewed 2021-10-21 07:29:30 -05:00
@ -70,3 +71,17 @@ func TestCloneWithCallback(t *testing.T) {
}
lhchavez (Migrated from github.com) commented 2021-10-21 07:28:07 -05:00
	path, err := ioutil.TempDir("", "git2go")
	defer os.RemoveAll(path)

otherwise after the test there will be garbage left in /tmp!

```suggestion path, err := ioutil.TempDir("", "git2go") defer os.RemoveAll(path) ``` otherwise after the test there will be garbage left in `/tmp`!
lhchavez (Migrated from github.com) commented 2021-10-21 07:28:27 -05:00
		t.Fatal("cannot clone remote repo via http, error: ", err)
```suggestion t.Fatal("cannot clone remote repo via http, error: ", err) ```
codexetreme commented 2021-10-21 08:23:00 -05:00 (Migrated from github.com)

@lhchavez we have to support go 1.11 also? dunno how to fix those tests

also, I hit commit suggestions (once per message) so it actually queued 2 jobs, you can cancel the earliest one

@lhchavez we have to support go 1.11 also? dunno how to fix those tests also, I hit commit suggestions (once per message) so it actually queued 2 jobs, you can cancel the earliest one
lhchavez (Migrated from github.com) reviewed 2021-10-21 08:55:18 -05:00
lhchavez (Migrated from github.com) commented 2021-10-21 08:55:17 -05:00
	_, err = Clone("https://github.com/libgit2/TestGitRepository", path, &CloneOptions{})

:'( let's give up in the hermeticity in favor of supporting more Go versions.

```suggestion _, err = Clone("https://github.com/libgit2/TestGitRepository", path, &CloneOptions{}) ``` :'( let's give up in the hermeticity in favor of supporting more Go versions.
codexetreme (Migrated from github.com) reviewed 2021-10-21 09:34:38 -05:00
codexetreme (Migrated from github.com) commented 2021-10-21 09:34:38 -05:00

Cool, let me remove that dependency and related code

Cool, let me remove that dependency and related code
codexetreme (Migrated from github.com) reviewed 2021-10-21 09:56:24 -05:00
codexetreme (Migrated from github.com) commented 2021-10-21 09:56:24 -05:00

okay I've made the changes

okay I've made the changes
codexetreme commented 2021-10-22 13:17:53 -05:00 (Migrated from github.com)

@lhchavez Can you try running this? If it fails, I'll revert the go mod and go sum changes

@lhchavez Can you try running this? If it fails, I'll revert the go mod and go sum changes
lhchavez commented 2021-10-22 13:18:34 -05:00 (Migrated from github.com)

@lhchavez Can you try running this? If it fails, I'll revert the go mod and go sum changes

please revert them just to keep the deps clean.

> @lhchavez Can you try running this? If it fails, I'll revert the go mod and go sum changes please revert them just to keep the deps clean.
codexetreme commented 2021-10-22 13:21:44 -05:00 (Migrated from github.com)

Cool, I'll commit in a small while

Cool, I'll commit in a small while
codexetreme commented 2021-10-22 14:38:57 -05:00 (Migrated from github.com)

@lhchavez please run it now, I have reverted those files

@lhchavez please run it now, I have reverted those files
lhchavez (Migrated from github.com) reviewed 2021-10-22 15:02:16 -05:00
@ -70,3 +71,17 @@ func TestCloneWithCallback(t *testing.T) {
}
lhchavez (Migrated from github.com) commented 2021-10-22 15:01:30 -05:00

this function can also be removed since it's not used anywhere

this function can also be removed since it's not used anywhere
codexetreme (Migrated from github.com) reviewed 2021-10-22 15:07:12 -05:00
@ -70,3 +71,17 @@ func TestCloneWithCallback(t *testing.T) {
}
codexetreme (Migrated from github.com) commented 2021-10-22 15:07:12 -05:00

my bad, I pushed in a hurry, missed this :/, no wonder the builds failed

my bad, I pushed in a hurry, missed this :/, no wonder the builds failed
lhchavez (Migrated from github.com) approved these changes 2021-10-23 12:32:50 -05:00
lhchavez (Migrated from github.com) left a comment

Thanks for fixing this 🎉!

Thanks for fixing this 🎉!
hiddeco commented 2021-10-24 05:03:37 -05:00 (Migrated from github.com)

Thanks a bunch both of you 🙇

Thanks a bunch both of you :bow:
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#842
No description provided.