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

Fix: wrong prefix on PR files changed #1855

merged 3 commits into from Dec 20, 2018


2 participants
Copy link

vanessayuenn commented Dec 19, 2018

fixes #1853

@vanessayuenn vanessayuenn requested a review from atom/github-package Dec 19, 2018


This comment has been minimized.

Copy link

codecov bot commented Dec 19, 2018

Codecov Report

Merging #1855 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1855      +/-   ##
- Coverage   91.15%   91.14%   -0.02%     
  Files         196      196              
  Lines       10744    10745       +1     
  Branches     1575     1575              
- Hits         9794     9793       -1     
- Misses        950      952       +2
Impacted Files Coverage Δ
lib/containers/pr-changed-files-container.js 100% <100%> (ø) ⬆️
lib/atom/gutter.js 89.74% <0%> (-2.57%) ⬇️
lib/atom/decoration.js 84.33% <0%> (-1.21%) ⬇️

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 278e871...0d1f597. Read the comment docs.

Copy link

annthurium left a comment

Thanks @vanessayuenn for fixing!

Left one question, but it's non blocking.

@@ -59,7 +59,16 @@ export default class PullRequestChangedFilesContainer extends React.Component {

buildPatch(rawDiff) {
const diffs = parseDiff(rawDiff);
const diffs = parseDiff(rawDiff).map(diff => {

This comment has been minimized.


annthurium Dec 19, 2018


do we also need to worry about where we're using parseDiff in git-shell-out-strategy? If so, we should consider extracting this functionality to some kind of helper.

I seem to remember some chatter that git gives us different output than the REST api does, so this might not actually be a problem.

This comment has been minimized.


vanessayuenn Dec 20, 2018


I seem to remember some chatter that git gives us different output than the REST api does,

Indeed! It is a git diff default behaviour to use a/ to prefix the source file and b/ to prefix the destination file. In git-shell-out-strategy, we work around this by using --no-prefix flag to get diffs, but for changed files tab, we don't have that option since we're getting the diff from the REST API.

@vanessayuenn vanessayuenn merged commit 0e013b6 into master Dec 20, 2018

2 checks passed

codecov/patch 100% of diff hit (target 91.15%)
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +8.84% compared to 278e871

@vanessayuenn vanessayuenn deleted the vy/fix-wrong-prefix branch Dec 20, 2018

This was referenced Jan 2, 2019

@smashwilson smashwilson moved this from In Progress 🔧 to Merged ☑️ in Stability Sprint : 20 November 2018 - 8 January 2019 : v0.24.0 Jan 3, 2019

@smashwilson smashwilson referenced this pull request Jan 3, 2019


v0.23-2 QA Review #1879

16 of 16 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment