Why are some git hiding inside cygwin shell?

Recently, one of my colleagues noticed a mismatch between a regular team git logand the following alias:

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative

After a little poking, we found out that this could be due to cygwin bash.

Here are our findings:

  • git log --graph

    all fixed visible

  • git log --oneline

    some commits are missing ... okay! Let them prepare an error report by redirecting the output to a text file:

  • git log --oneline > test.txt

    Alas, all the fixations are visible in test.txt?!? Let me explore further by splitting the alias. Removing color codes:

  • git log --graph --pretty=format:'%h - %d %s (%cr) <%an>'

    some commits are missing. Therefore, it must be one of the variables ...

[... several frobnications later ...]

  • git log --graph --pretty=format:'%h - %d %s (%cr)'

    all fixed visible

  • git log --graph --pretty=format:'%h - %d %s <%an>'

    all fixed visible

It seems to be interrupted after some combinations of variables. In this case(%cr) <%an>

linux , (.. ).

, .

+5
1

:

  • cygwin , , xterm mintty.
  • ( ?) $PAGER , .
  • $PAGER less, less (S) / -R, / ANSI, .
  • -no-color,
  • , $LC_ALL, $LANG ..

LANG=C git log ..

+1

All Articles