Bug 2435847

Summary: texlive-git-latexdiff fails when run from base git directory
Product: [Fedora] Fedora Reporter: Brett Kerwin <brett.kerwin>
Component: texlive-baseAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 43CC: spotrh, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: texlive-base-20230311-95.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-02-19 01:12:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brett Kerwin 2026-02-01 22:38:08 UTC
Description of problem:
Running git-latexdiff from the base directory of a git repository fails.

Version-Release number of selected component (if applicable):
texlive-git-latexdiff-svn54732-94.fc43.x86_64

How reproducible:
always

Steps to Reproduce:
Just run a git-latexdiff of two revisions of a LaTeX file in a git repository.

Actual results:
fatal: Can't cd back to repository root

Expected results:
Display the diff file.

Additional info:
The problem comes from /usr/bin/git-latexdiff, line 596, which is

cd "$(git rev-parse --show-cdup)" || die "Can't cd back to repository root"

and indeed this line is problematic: when "git rev-parse --show-cdup" returns nothing, it executes 'cd ""', but executing cd *with* an argument which is an *empty* string must be avoided: according to the POSIX standard, the results are unspecified (see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html section OPERANDS).

Comment 1 Brett Kerwin 2026-02-01 22:43:19 UTC
I am just discovering that this has already been fixed in the latest version upstream (since v1.7.0), so just updated the version in Fedora should solve the problem.

Comment 2 Fedora Update System 2026-02-10 17:38:27 UTC
FEDORA-2026-444e8ce182 (texlive-base-20230311-95.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-444e8ce182

Comment 3 Fedora Update System 2026-02-11 01:12:01 UTC
FEDORA-2026-444e8ce182 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-444e8ce182`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-444e8ce182

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-02-19 01:12:41 UTC
FEDORA-2026-444e8ce182 (texlive-base-20230311-95.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.