if diff has no patches. diff.patch return GitError #232

Closed
alexband opened this Issue May 13, 2013 · 5 comments

Comments

Projects
None yet
4 participants
@alexband

if I got a Diff, but there is not patches

so

[patch  for patch in diff] is []

then call diff.patch will raise GitError

might it return empty string '' ?

@cholin

This comment has been minimized.

Show comment Hide comment
@cholin

cholin May 20, 2013

Member

I think the empty string is not a valid input for the unix tool patch (which is the output format of Diff.patch), so I don't think this would be a general benefit for everyone or am I missing here something?

Member

cholin commented May 20, 2013

I think the empty string is not a valid input for the unix tool patch (which is the output format of Diff.patch), so I don't think this would be a general benefit for everyone or am I missing here something?

@jleclanche

This comment has been minimized.

Show comment Hide comment
@jleclanche

jleclanche Dec 14, 2013

Yeah this is pretty annoying. Simple way to test:

repo.diff("HEAD", "HEAD").patch

Yeah this is pretty annoying. Simple way to test:

repo.diff("HEAD", "HEAD").patch

@xtao

This comment has been minimized.

Show comment Hide comment
@xtao

xtao Dec 16, 2013

Contributor
Contributor

xtao commented Dec 16, 2013

@xtao

This comment has been minimized.

Show comment Hide comment
@xtao

xtao Dec 16, 2013

Contributor

@alexband fixed in #303

Contributor

xtao commented Dec 16, 2013

@alexband fixed in #303

@alexband

This comment has been minimized.

Show comment Hide comment
@alexband

alexband Dec 17, 2013

@xtao bien, gracias

@xtao bien, gracias

@alexband alexband closed this Dec 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment