Page MenuHomePhabricator

arc diff with untracked directory complains about every single file in that directory
Open, NormalPublic

Description

Sometimes I have a directory in my server repo that isn't ignored, shouldn't be committed, and I don't want to move it. "git status" just tells me that this directory is untracked. Fine. But arc diff warns me about every single file in the directory. This is pages and pages of stuff I already know. Could that please be condensed to just the untracked directory itself?

And yes, I know how I can ignore that directory using git's many ignore features. But I don't want to ignore it in git -- I want to be reminded that this untracked directory exists. I also don't mind having to tell arc "yes, go ahead". My objection is purely against the many pages of filenames that arc prints (scrolling previous output out of the way).

Event Timeline

epriestley triaged this task as Normal priority.Sep 23 2016, 5:51 PM
epriestley added a project: Arcanist.

I think this is entirely reasonable.

This is probably not completely trivial to fix because I think we have to issue a separate git ls-tree and check if the directory contains other tracked files to mimic the behavior of git (and likewise in other VCSes).

That is, I believe if file a/X is untracked, we should report the whole directory a/ as untracked only if a/ contains no tracked files.

We could do something lazy like this without additional information:

Untracked files:

  externals/some_temporary_thing/ (32 files)

...but that probably has degenerate cases in reasonable scenarios where we end up with useless stuff like this:

Untracked files:

  / (17 files)

...or similar. And we could fake our way through that, but just getting the ls-tree and computing the right result is probably ultimately a shorter pathway to good behavior.

eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Nov 21 2016, 7:25 PM