Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you mean you get '+[m' instead of '+' in front of an added line? If so, this looks suspiciously like ecma formatting escapes (\e[XXXm).

Try if calling git diff --no-color, if this helps then something is broken on your setup. Another way i could see that happening is if you have color set to 'always' and then use some app that wraps git's command line output.



j2kun means the stuff that shows up from TFA when using git diff:

  diff --git a/octocat.txt b/octocat.txt
  index 7d8d808..e725ef6 100644
  --- a/octocat.txt
  +++ b/octocat.txt
  @@ -1 +1 @@
  -A Tale of Two Octocats
  +A Tale of Two Octocats and an Octodog


phaker is correct, that's just an escape sequence that the JS terminal didn't handle (or handled incorrectly). Using --no-color you get:

    diff --git a/octocat.txt b/octocat.txt
    index 7d8d808..e725ef6 100644
    --- a/octocat.txt
    +++ b/octocat.txt
    @@ -1 +1 @@
    -A Tale of Two Octocats
    +A Tale of Two Octocats and an Octodog




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: