Skip to content

Commit

Permalink
Removed redundant if guard in hg gpg garbage removal
Browse files Browse the repository at this point in the history
  • Loading branch information
notatestuser committed Jun 30, 2015
1 parent 524383b commit 6958dd5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/commit.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,18 @@ module.exports = class Commit
while !/^ -----END PGP SIGNATURE-----$/.test lines[0]
gpgsig.push lines.shift()
gpgsig.push lines.shift()

# if converted from mercurial gpgsig may be present with non-valid gpg lines
if /^kilnhgcopies/.test lines[0]
while /^kilnhgcopies/.test lines[0]
lines.shift()

# e.g. "kilnhgcopies646973742F2E6874616363657373 6170702F2E6874616363657373"
# see https://github.com/notatestuser/gift/pull/62
while /^kilnhgcopies/.test lines[0]
lines.shift()

# not doing anything with this yet, but it's sometimes there
if /^encoding/.test lines[0]
encoding = _.last lines.shift().split(" ")

lines.shift()
lines.shift() if lines.length

message_lines = []
while /^ {4}/.test lines[0]
Expand Down

0 comments on commit 6958dd5

Please sign in to comment.