git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG, PATCH v2 0/3] Fix {blame,cat-file} --textconv for cases with symlinks
@ 2010-09-20 20:39 Kirill Smelkov
  2010-09-20 20:39 ` [PATCH v2 1/3] tests: Prepare --textconv tests for correctly-failing conversion program Kirill Smelkov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kirill Smelkov @ 2010-09-20 20:39 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Axel Bonnet, Clément Poulain, Diane Gasselin,
	Matthieu Moy, Jeff King, Kirill Smelkov

Recently I've spot a bug in git blame --textconv, which was wrongly
calling pdftotext (my *.pdf conversion program) on a symlink.pdf, and I
was getting something like

    $ git blame -C -C regular-file.pdf
    Error: May not be a PDF file (continuing anyway)
    Error: PDF file is damaged - attempting to reconstruct xref table...
    Error: Couldn't find trailer dictionary
    Error: Couldn't read xref table
    Warning: program returned non-zero exit code #1
    fatal: unable to read files to diff

That errors come from pdftotext run on symlink.pdf being extracted to
/tmp/ with one-line plain-text content pointing to link destination.

Please apply and thanks,
Kirill

v2:

 o Incorporated suggestions by Matthieu and Jeff (details in each patch)


Kirill Smelkov (3):
  tests: Prepare --textconv tests for correctly-failing conversion
    program
  blame,cat-file: Demonstrate --textconv is wrongly running converter
    on symlinks
  blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''

 builtin.h                        |    2 +-
 builtin/blame.c                  |   33 ++++++++++++++-------
 builtin/cat-file.c               |    2 +-
 sha1_name.c                      |    2 +
 t/t4042-diff-textconv-caching.sh |   25 ++++++++--------
 t/t8006-blame-textconv.sh        |   58 +++++++++++++++++++++++++++++++++----
 t/t8007-cat-file-textconv.sh     |   36 ++++++++++++++++++++---
 7 files changed, 121 insertions(+), 37 deletions(-)

-- 
1.7.3.rc2

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-24 18:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 20:39 [BUG, PATCH v2 0/3] Fix {blame,cat-file} --textconv for cases with symlinks Kirill Smelkov
2010-09-20 20:39 ` [PATCH v2 1/3] tests: Prepare --textconv tests for correctly-failing conversion program Kirill Smelkov
2010-09-20 20:39 ` [PATCH v2 2/3] blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks Kirill Smelkov
2010-09-20 21:13   ` Matthieu Moy
2010-09-21 18:39     ` Kirill Smelkov
2010-09-21 20:18       ` Matthieu Moy
2010-09-21 20:43         ` Jeff King
2010-09-24 18:20         ` Kirill Smelkov
2010-09-20 20:39 ` [PATCH v2 3/3] blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' Kirill Smelkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).