Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Repo status color on project root directory #1144
This makes it easier to identify which projects have uncommitted
Description of the Change
I occasionally work with software projects that have more than one project folder added to them.
In these cases, it is difficult to identify which repositories I have uncommitted changed on.
This change bubbles up the '.status-modified' and '.status-added' CSS classes to the '.project-root' elements so that the repo modification status can be clearly seen when all folders are collapsed.
The code changes in the
The reason I avoided changin Atom core are twofold:
In short, there is a bug(?) in repo.getDirectoryStatus('/my/root') which will calculate the relative path as @relativize("/my/root") + "/" resulting in the string "/". Then all of the git statuses (formatted like "subdir/file.txt") are evaluated and if statusPath.indexOf(relative_git_root) == 0 then it will consider the status of the parent folder to be of a particular value.
The problem is that, in the case of the root folder, it will never match character 0 since none of the status paths ever have a leading "/".
People who want to see the repo status at the root level will be able to do so - especially useful for those who use multi-project often.
It is aesthetic and people are opinionated -- so some people might not like it.