+1 for adding a status
command. pijul ls
is more like a hg files
or git ls-files
, and both Mercurial and git have a status
command that is used very frequently.
We’re currently rewriting hg status
to be faster and more robust, so don’t hesitate to ping me on the matter, hopefully I can help guide some of the discussion.
Thanks for the suggestion! pijul diff --short
now does this, with U
as a prefix.
pijul diff --short
is still a bit slow, since it computes a full diff of modified files, whereas only a checksum comparison would be enough to show a change.
Note that a checksum comparison would still be very slow. I’ve spent the last 2 years optimizing the Mercurial status, in Rust no less, so we could probably reuse some of the logic. :)
I would really like if it could get implemented into ls
by only doing a comparison on the directory tree level instead of the file level, because that could be done much faster in a majority of use cases, I suppose. It wouldn’t even need a checksum comparison, just a comparison between the output of pijul ls
and find . | sed -e '^s#./##g'
…
My request is basically a performance optimization for the cases where the content of the untracked files is uninteresting or extremely big (think of e.g. big compiled executables, or log traces, that the user might want to exclude), where the list of files which are untracked but not ignored is the only thing that matters. (and it would take a long amount of time for pijul diff --untracked
to finish, or it would clutter the terminal output and possible scroll out important messages, when called without proper additional filtering)
Currently, there seems to be no way to get a list of all untracked files besides the following, impractical way:
I propose the addition of an option
--negate
(alternatives:--invert
or simply--untracked
) topijul ls
to show a list of all untracked files instead of a list of all tracked files. Future possibilities: This would make it possible for the user to create a shortcutstatus
command equivalent to that command ofdarcs
(darcs status
).