Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $new_offset in addition (+) at /GitHub/diff-so-fancy/libs/header_clean/header_clean.pl line 75, <> line 63. #119

Closed
stevemao opened this issue Mar 9, 2016 · 3 comments · Fixed by #122
Labels

Comments

@stevemao
Copy link
Member

stevemao commented Mar 9, 2016

In this repo, do

git  show  74804e377d4a54d1173d4393827d4e4b27e4d5d0
Use of uninitialized value $new_offset in addition (+) at /GitHub/diff-so-fancy/libs/header_clean/header_clean.pl line 75, <> line 63.
Use of uninitialized value $new_offset in addition (+) at /GitHub/diff-so-fancy/libs/header_clean/header_clean.pl line 75, <> line 63.

git --no-pager show 74804e377d4a54d1173d4393827d4e4b27e4d5d0 | base64
Y29tbWl0IDc0ODA0ZTM3N2Q0YTU0ZDExNzNkNDM5MzgyN2Q0ZTRiMjdlNGQ1ZDAKTWVyZ2U6IDNmYjdjZDcgNTlhZWJiZApBdXRob3I6IFBhdWwgSXJpc2ggPHBhdWwuaXJpc2hAZ21haWwuY29tPgpEYXRlOiAgIFR1ZSBNYXIgOCAxNTo1Njo0OSAyMDE2IC0wODAwCgogICAgTWVyZ2UgcHVsbCByZXF1ZXN0ICMxMTAgZnJvbSBwYXVsaXJpc2gvaHVua3N0YXJ0bGluZWZpeAogICAgCiAgICBDaGFuZ2UgaHVuayBsaW5lIHBvc2l0aW9uOiBvcmlnaW5hbCAtLT4gcmVzdWx0IGxvY2F0aW9uCgpkaWZmIC0tY2MgbGlicy9oZWFkZXJfY2xlYW4vaGVhZGVyX2NsZWFuLnBsCmluZGV4IGU4YmNkOTIsNTk3MDU4MC4uYWUyNzlkMAotLS0gbGlicy9oZWFkZXJfY2xlYW4vaGVhZGVyX2NsZWFuLnBsCisrKyBsaWJzL2hlYWRlcl9jbGVhbi9oZWFkZXJfY2xlYW4ucGwKQEBA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YW4uYmF0cycKICt9Cg==

output.txt

@scottchiefbaker
Copy link
Contributor

@paulirish #122 does fix this issue. Also, all the existing tests pass with that fix also.

Should be pretty simple to add a test for:

@@@ -105,13 -104,21 +104,23 @@@ parsing to @ header_clean.pl:107 @

@paulirish
Copy link
Member

reopening until we have a test added.

@stevemao
Copy link
Member Author

Hmmm.. I actually wanted #126 to be fixed. Linking the issue for posterity :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants