Skip to content

find glob output is relative even when the root is absolute #120

Backlog

Description

@KelpHect

Summary

The glob form of dusage find prints relative paths even when invoked with an absolute root, while the expression form prints absolute paths. This makes automation brittle when the same command is run against several roots.

Example

dusage find --hidden --no-ignore --max-depth 4 '.git' 'D:\Projects\repo'
# prints nested/path/.git

dusage find 'D:\Projects\repo' -maxdepth 4 -name .git -print
# prints D:\Projects\repo\nested\path\.git

JSON does include an absolute path field, but plain output does not.

How I use it

I collect .git paths from many roots, convert them to repository roots, and pass them to git commands. Relative output loses which root each result came from unless every root is queried in a separate invocation or JSON parsing is added.

Desired behavior

When the input root is absolute, plain glob output should print absolute paths by default, or there should be a flag such as --absolute/--print-absolute.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions