Fix --relative-paths flag for Source Trees section header#62
Merged
Conversation
Co-authored-by: sammcj <[email protected]>
Copilot
AI
changed the title
[WIP] Fix absolute path information in markdown output
Fix --relative-paths flag for Source Trees section header
Jan 17, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the --relative-paths flag was not applied to Source Trees section headers, causing absolute paths to appear in the headers even when relative paths were requested throughout the rest of the output.
Changes:
- Modified tree header path handling to use basename when
--relative-pathsis enabled for directory processing - Modified file header path handling to use basename when
--relative-pathsis enabled for single file processing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
--relative-pathsflag was not applied to the Source Trees section header, causing absolute paths to appear even when relative paths were requested throughout the rest of the output.Changes
filepath.Base(absPath)for tree headers when--relative-pathsis setBehavior
The fix ensures consistent relative path usage across the entire output when the flag is enabled.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
openaipublic.blob.core.windows.net./ingest ./ingest --output /tmp/output_absolute.md --no-clipboard /tmp/test_ingest/app pkg/mod/github.c-errorsas .cfg rg/[email protected] 01.o 02.o 03.o rg/[email protected] 05.o�� -20240827094217--p 6759422/b260/ rg/[email protected]=go1.25 -p github.com/fatih--norc l/linux_amd64/as--noprofile rg/[email protected]/bXVO6ZUVP7qSYLbH8Mzx(dns block)./ingest ./ingest --relative-paths --output /tmp/output_relative.md --no-clipboard /tmp/test_ingest/app .cfg rg/[email protected] 6759422/b260/ -I ctor rg/toolchain@v0./tmp/go-build1816759422/b335/vet.cfg -o -20240827094217-dd81d9e9be82/bash [email protected] rg/[email protected] -p dutil/randutil.g--norc l/linux_amd64/co--noprofile rg/[email protected]/tmp/go-build1816759422/b177/(dns block)/home/REDACTED/work/ingest/ingest/ingest /home/REDACTED/work/ingest/ingest/ingest --relative-paths --output /tmp/final_test.md --no-clipboard app _cgo_.o ux-amd64/pkg/tool/linux_amd64/cgo /tmp/go-build181git -O2 -fno-stack-prote-v ux-amd64/pkg/tooorigin -W -I [email protected]/bash pkg/mod/golang.org/[email protected] . --gdwarf2 t pkg/mod/golang.org/[email protected]/tmp/go-build1816759422/b177/(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.