Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Fix nil tx bug #124

Merged
merged 2 commits into from
Nov 14, 2016
Merged

Fix nil tx bug #124

merged 2 commits into from
Nov 14, 2016

Conversation

alcortesm
Copy link
Contributor

@alcortesm alcortesm commented Nov 14, 2016

Commit 5a72b12 introduced a bug that makes go-git panic when cloning repositories from non-seekable packfiles (from ssh or http connections for example). A simple way to reproduce the bug is:

package main

import (
	"log"

	git "gopkg.in/src-d/go-git.v4"
)

func main() {
	r := git.NewMemoryRepository()

	opts := &git.CloneOptions{
		URL: "[email protected]:src-d/git-fixture.git",
	}

	if err := r.Clone(opts); err != nil {
		log.Fatal(err)
	}
}

The bug has not been detected by our tests because some of the functionality being added by the commit was not being tested.

This fix has two commits: one that adds a test for the offending functionality and another to fix the bug.

@mcuadros mcuadros merged commit 18f9bb5 into src-d:master Nov 14, 2016
@alcortesm alcortesm deleted the fix-nil-tx-bug branch November 15, 2016 09:24
mcuadros added a commit that referenced this pull request Nov 23, 2016
…ation improvements (#130)

* plumbing: format, packfile fix issue #129, related #124

* plumbing: format, packfile documentation improvements
mcuadros pushed a commit that referenced this pull request Jan 31, 2017
* add test for non-seekable packfiles

* packfile: do not throw away the newly created transactioner
mcuadros added a commit that referenced this pull request Jan 31, 2017
…ation improvements (#130)

* plumbing: format, packfile fix issue #129, related #124

* plumbing: format, packfile documentation improvements
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants