Fix {blame,cat-file} --textconv for cases with symlinks
Get series with b4
b4 am [email protected]Versions newest first
- v5 Latest3 patches 2 repliesIn review
Changes in v5 from the cover letter
o Avoid touching t4042 at all
o Change $@ to $1 in textconv helper directly in patch1
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | blame,cat-file: Prepare --textconv tests for correctly-failing conversion programt/ t/ | +14 | 0 replies | |
| 2/3 | blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinkst/ t/ | +78 | 0 replies | |
| 3/3 | blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''builtin.h builtin/ builtin/ +3 more | +30 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Matthieu Moy |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [BUG, PATCH v5 0/3] Fix {blame,cat-file} --textconv for cases with symlinks
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 diffThat 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
P.S. I'm sorry if this time there is again some bug on my side...
v5:
o Avoid touching t4042 at all
o Change $@ to $1 in textconv helper directly in patch1
v4:
o add prereq on SYMLINKS in tests
o Use consistent pattern for detecting and converting binaries (was 'bin:' and 'bin: ')
o avoid using $@ in textconv helper - it gets only one argument
v3:
o Slightly changed patches descriptions as per comment by Matthieu, and added Matthieu's Reviewed-by.
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/t8006-blame-textconv.sh | 62 +++++++++++++++++++++++++++++++++++++----- t/t8007-cat-file-textconv.sh | 38 ++++++++++++++++++++++--- 6 files changed, 114 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.3.19.g3fe0a