Skip to content

git-sensor return panic when commit has large file #1184

@nishant-d

Description

@nishant-d

in case of large file(more than 10M) go-git is unable to calculate the diff and panics.

Checklist:

  • I've searched in the docs and FAQ for my answer
  • I've included steps to reproduce the bug.

Describe the bug

sergi/go-diff#89
in case of large file(more than 10M) go-git is unable to calculate the diff and panics.

To Reproduce

  1. push large file in git
  2. try to fetch git commit list for ci-trigger on UI
  3. it will throw error

snippet to reproduce

	dat, err := os.ReadFile("/large-file")
	if err != nil {
		panic(err)
	}
	data := string(dat)
	d := diff.DoWithTimeout("", data, time.Hour)
	fmt.Println(d)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions