Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle git status for . and .. properly #277

Merged
merged 3 commits into from
Apr 9, 2019

Conversation

avdv
Copy link
Collaborator

@avdv avdv commented Apr 8, 2019

Description

This PR fixes a small regression introduced with #268 where the git status of . and .. reported with --git-status would be wrong.

  • Relevant Issues : (none)
  • Relevant PRs : (none)
  • Type of change :
    • New feature
    • Bug fix for existing feature
    • Code quality improvement
    • Addition or Improvement of tests
    • Addition or Improvement of documentation

@ghost ghost assigned avdv Apr 8, 2019
@ghost ghost added the review label Apr 8, 2019
The git status is only computed for the given directory and is stored as
a Hash mapping relative paths to their mode string.

For a directory, the git status is comprised of all the statuses of its files
itself and all its sub directories.

The current directory's prefix is just an empty string matching all files inside
the `@git_status` Hash.

Asking for the status of the parent directory is pointless, we do not compute it
(yet).
@avdv avdv added the bug label Apr 9, 2019
avdv added 2 commits April 9, 2019 18:25
I do not want to use `warn` since these errors should not be suppressed. And
I always want to use `STDERR`, not `$stderr`.
@codecov-io
Copy link

codecov-io commented Apr 9, 2019

Codecov Report

Merging #277 into master will decrease coverage by 0.39%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #277     +/-   ##
=========================================
- Coverage   86.11%   85.71%   -0.4%     
=========================================
  Files           7        7             
  Lines         432      434      +2     
=========================================
  Hits          372      372             
- Misses         60       62      +2
Impacted Files Coverage Δ
lib/colorls/core.rb 89.59% <0%> (-0.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2366fa1...cdf1f86. Read the comment docs.

@avdv avdv merged commit ab6f14b into athityakumar:master Apr 9, 2019
@ghost ghost removed the review label Apr 9, 2019
@avdv avdv deleted the git-status-dots branch April 9, 2019 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants