paulaltin / git-hires-merge

An interactive git merge driver which can resolve non-overlapping conflicts on individual or adjacent lines.
GNU General Public License v3.0
62 stars 8 forks source link

Correct check of empty git editor config #1

Closed benizl closed 6 years ago

benizl commented 6 years ago

The os.popen.read() dance will return an empty string in the case that no editor is set, not None like the other entries in the resolution order.

If the return evalutes False, including the empty string, coerce that to NoneType for consistency with the other checks.

Without this, and with no $GIT_EDITOR set, the script tries to execute the empty string which, on Windows at least, is a PermissionError.

paulaltin commented 6 years ago

Thanks @benizl!