Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Reflect git changes at root level #614

Closed
wants to merge 1 commit into from

Conversation

glangford
Copy link
Contributor

Beginner fix for #564. This change seems to work in interactive testing, but apm test reports one failure. I don't know how to rectify this. Any suggestions?

 TreeView
  Git status decorations
    when the project is a symbolic link to the repository root
      when a file loses its modified status
        it updates its and its parent directories' styles

@glangford
Copy link
Contributor Author

I started this looking at tree-view, but perhaps a better fix than #614 is to start at the level of the GitRepository class in atom; getDirectoryStatus appears to turn a path at root level into just "/". So getDirectoryStatus always returns a status of zero for the root.

getDirectoryStatus: (directoryPath)  ->
    directoryPath = "#{@relativize(directoryPath)}/"  #############
    directoryStatus = 0
    for path, status of @statuses
      directoryStatus |= status if path.indexOf(directoryPath) is 0
    directoryStatus

https://github.com/atom/atom/blob/master/src/git-repository.coffee#L305

@winstliu
Copy link
Contributor

winstliu commented Jul 4, 2018

Superseded by #1144.

@winstliu winstliu closed this Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants