Skip to contentSkip to conversation

Strange bug with "git log" - pdftotext?

DISCUSSION Jeremy Morton 3 participants 4 messages Jul 30, 2018

lore
Share & tools
lore
#0 lore raw

I'm trying to search my git log history for a particular term - "unobtrusive" - so I run this command:

git log -S unobtrusive --oneline

When I do this, this is displayed and I'm in an interactive less terminal or something:

pdftotext version 4.00
Copyright 1996-2017 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]

 -f <int>             : first page to convert
 -l <int>             : last page to convert
 -layout              : maintain original physical layout
 -simple              : simple one-column page layout
 -table               : similar to -layout, but optimized for tables
 -lineprinter         : use strict fixed-pitch/height layout
 -raw                 : keep strings in content stream order
 -fixed <number>      : assume fixed-pitch (or tabular) text
 -linespacing <number>: fixed line spacing for LinePrinter mode
 -clip                : separate clipped text
 -nodiag              : discard diagonal text
 -enc <string>        : output text encoding name
 -eol <string>        : output end-of-line convention (unix, dos, or mac)
 -nopgbrk             : don't insert page breaks between pages
 -bom                 : insert a Unicode BOM at the start of the text 
file
 -opw <string>        : owner password (for encrypted files)
 -upw <string>        : user password (for encrypted files)
 -q                   : don't print any messages or errors
 -cfg <string>        : configuration file to use in place of .xpdfrc
 -v                   : print copyright and version info

:

When I hit the down arrow, it scrolls down, repeating this output infinitely until I hit 'q'. What is going on here??

Signature · 2 lines
Best regards,
Jeremy Morton (Jez)
#1 lore raw
Quoted 10 lines · Jeremy Morton

I'm trying to search my git log history for a particular term - "unobtrusive" - so I run this command:

git log -S unobtrusive --oneline

When I do this, this is displayed and I'm in an interactive less terminal or something:

pdftotext version 4.00
[...]

That's definitely weird.

My guess is that the repository has some .gitattributes set up to diff pdf files in a particular way, and you have some matching config that tries to call pdftotext.

What does:

  git config --list | grep ^diff

say? I'd expect to see an external or textconv option there running pdftotext.

Another option is that your pager is somehow set up to call pdftotext, but that seems much more nonsensical to use the tool there (but try "git var GIT_PAGER" and "git config pager.log" to check).

-Peff

#2 lore raw

I discovered it was an issue with the version of Git for Windows I was using. Upgraded to the latest version and it works now.

Signature · 2 lines
Best regards,
Jeremy Morton (Jez)
Quoted 32 lines · Jeff King
Quoted 10 lines · Jeremy Morton

I'm trying to search my git log history for a particular term - "unobtrusive" - so I run this command:

git log -S unobtrusive --oneline

When I do this, this is displayed and I'm in an interactive less terminal or something:

pdftotext version 4.00
[...]

That's definitely weird.

My guess is that the repository has some .gitattributes set up to diff pdf files in a particular way, and you have some matching config that tries to call pdftotext.

What does:

   git config --list | grep ^diff

say? I'd expect to see an external or textconv option there running pdftotext.

Another option is that your pager is somehow set up to call pdftotext, but that seems much more nonsensical to use the tool there (but try "git var GIT_PAGER" and "git config pager.log" to check).

-Peff

#3 lore raw
In reply to Jeremy Morton

Am 30.07.2018 um 14:49 schrieb Jeremy Morton:

Quoted 31 lines

I'm trying to search my git log history for a particular term - "unobtrusive" - so I run this command:

git log -S unobtrusive --oneline

When I do this, this is displayed and I'm in an interactive less terminal or something:

pdftotext version 4.00
Copyright 1996-2017 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
 -f <int>             : first page to convert
 -l <int>             : last page to convert
 -layout              : maintain original physical layout -simple              : simple one-column page layout
 -table               : similar to -layout, but optimized for tables -lineprinter         : use strict fixed-pitch/height layout -raw                 : keep strings in content stream order -fixed <number>      : assume fixed-pitch (or tabular) text -linespacing <number>: fixed line spacing for LinePrinter mode -clip                : separate clipped text
 -nodiag              : discard diagonal text
 -enc <string>        : output text encoding name
 -eol <string>        : output end-of-line convention (unix, dos, or mac) -nopgbrk             : don't insert page breaks between pages -bom                 : insert a Unicode BOM at the start of the text file -opw <string>        : owner password (for encrypted files) -upw <string>        : user password (for encrypted files)
 -q                   : don't print any messages or errors -cfg <string>        : configuration file to use in place of .xpdfrc -v                   : print copyright and version info
:

Quoted 2 lines

When I hit the down arrow, it scrolls down, repeating this output infinitely until I hit 'q'.  What is going on here??

Wild guess: You're using "Git for Windows" on a version less than "2.18.0.windows.1" ?

Try upgrading (at least) to that version. IIRC that's one of the issues it fixes.

HTH
Stefan

Signature · 4 lines
----------------------------------------------------------------
/dev/random says: Never underestimate the power of human stupidity.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')" 
GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9  9666 829B 49C5 9221 27AF