All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG, PATCH 0/3] Fix {blame,cat-file} --textconv for cases with symlinks
@ 2010-09-18 17:25 Kirill Smelkov
  2010-09-18 17:25 ` [PATCH 1/3] tests: Prepare --textconv tests for correctly-failing conversion program Kirill Smelkov
                   ` (3 more replies)
  0 siblings, 4 replies; 35+ messages in thread
From: Kirill Smelkov @ 2010-09-18 17:25 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Axel Bonnet, Clément Poulain, Diane Gasselin, 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.

First 2 patches demonstrate the problem (and are ready to go into git.git),
though third, while working for me, is only an RFC.

Thanks,
Kirill


Kirill Smelkov (3):
  tests: Prepare --textconv tests for correctly-failing conversion
    program
  blame,cat-file: Demonstrate --textconv is wrongly running converter
    on symlinks
  RFC: 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                      |    3 +-
 t/t4042-diff-textconv-caching.sh |   25 ++++++++--------
 t/t8006-blame-textconv.sh        |   57 +++++++++++++++++++++++++++++++++----
 t/t8007-cat-file-textconv.sh     |   38 ++++++++++++++++++++++---
 7 files changed, 122 insertions(+), 38 deletions(-)

-- 
1.7.3.rc2

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

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

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-18 17:25 [BUG, PATCH 0/3] Fix {blame,cat-file} --textconv for cases with symlinks Kirill Smelkov
2010-09-18 17:25 ` [PATCH 1/3] tests: Prepare --textconv tests for correctly-failing conversion program Kirill Smelkov
2010-09-18 19:14   ` Matthieu Moy
2010-09-18 17:25 ` [PATCH 2/3] blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks Kirill Smelkov
2010-09-18 19:26   ` Matthieu Moy
2010-09-18 17:25 ` [PATCH 3/3] RFC: blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' Kirill Smelkov
2010-09-18 19:04   ` Matthieu Moy
2010-09-20 18:21   ` Jeff King
2010-09-20 20:35     ` [PATCH 1/3] tests: Prepare --textconv tests for correctly-failing conversion program Kirill Smelkov
2010-09-20 21:03       ` Matthieu Moy
2010-09-21 18:39         ` Kirill Smelkov
2010-09-20 21:01   ` [PATCH] sha1_name.c: update comment to mention :/foo syntax Matthieu Moy
2010-09-21 18:02     ` Junio C Hamano
2010-09-21 20:06       ` Matthieu Moy
2010-09-21 23:29         ` Junio C Hamano
2010-09-24 16:43           ` [PATCH] update comment and documentation for " Matthieu Moy
2010-09-18 18:08 ` [BUG, PATCH 0/3] Fix {blame,cat-file} --textconv for cases with symlinks Matthieu Moy
2010-09-18 20:01   ` Junio C Hamano
2010-09-19  8:58     ` Matthieu Moy
2010-09-19 18:17       ` Junio C Hamano
2010-09-20 18:00     ` Jeff King
2010-09-20 20:18       ` Johannes Sixt
2010-09-21 17:57       ` Junio C Hamano
2010-09-21 18:42         ` Jeff King
2010-09-21 18:56           ` Jeff King
2010-09-21 20:59             ` [PATCH 0/2] better userdiff behavior for symlinks Jeff King
2010-09-21 21:01               ` [PATCH 1/2] diff: don't use pathname-based diff drivers " Jeff King
2010-09-22  5:40                 ` Matthieu Moy
2010-09-22  5:50                   ` Jeff King
2010-09-21 21:13               ` [PATCH 2/2] diff: add a special SYMLINK user-diff driver Jeff King
2010-09-22  0:12                 ` Ævar Arnfjörð Bjarmason
2010-09-22  0:30                   ` Jeff King
2010-09-22  0:39                     ` Ævar Arnfjörð Bjarmason
2010-09-22  5:53                 ` Matthieu Moy
2010-09-22 16:59                 ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.