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

updated removeFiles to use GetBatchOutput and added unit tests #8527

Merged

Conversation

BrianFreemanAtlanta
Copy link
Contributor

Fixes #8404 (Remove Files generates FileName or extension too long)

Proposed changes

  • Updated GitModule.RemoveFiles to use GetBatchOutput with BuildBatchArgumentsForFiles

Test methodology

  • Added unit test for empty file list
  • Added unit test for 2 files in the list

Test environment(s)

  • GIT 2.8
  • Windows 10

✒️ I contribute this code under The Developer Certificate of Origin.

@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #8527 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #8527      +/-   ##
==========================================
+ Coverage   55.07%   55.11%   +0.03%     
==========================================
  Files         899      899              
  Lines       64705    64748      +43     
  Branches    11624    11627       +3     
==========================================
+ Hits        35635    35683      +48     
+ Misses      26337    26333       -4     
+ Partials     2733     2732       -1     
Flag Coverage Δ
#production 42.02% <100.00%> (+0.04%) ⬆️
#tests 94.80% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

});
"--"
}
.BuildBatchArgumentsForFiles(files));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] incorrect indentation

@RussKie
Copy link
Member

RussKie commented Oct 9, 2020

Please provide your signoff in contributors.txt

Thank you

@RussKie RussKie added 📜 status: needs cla The author needs to update contributors.txt before reviewing or merging can proceed hacktoberfest-accepted 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity labels Oct 9, 2020
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Oct 9, 2020
@mstv
Copy link
Member

mstv commented Oct 9, 2020

As recently recommended in order to squash (after merging), you could:

  • select the head of your branch
  • create a copy of your branch Create new branch here with unchecked Checkout after create in order to have a copy for comparison (I know, this is not really necessary when showing rev-log commits.)
  • select the head of the master branch
  • Reset current branch to here with the default mode Mixed
  • stage and commit again
  • compare the with the copy branch created above by selecting them both (Ctrl+Left MB click)
    Your changes should be listed in the group Common Diff with BASE. The other groups should be empty.
  • force-push

@pmiossec
Copy link
Member

pmiossec commented Oct 9, 2020

* `Reset current branch to here` with the default mode `Mixed`

I would just change that by doing:

  • Reset current branch to here with the default mode Soft (that kept the changes already in the staging aréa so no need to stage the changes again)

@RussKie
Copy link
Member

RussKie commented Oct 10, 2020

I added a wiki: https://github.com/gitextensions/gitextensions/wiki/How-To:-Squash-and-Rebase-your-changes

@mstv @pmiossec feel free to add and/or update it as you see necessary. Thank you

@RussKie RussKie added 🖊️ status: cla signed and removed 📜 status: needs cla The author needs to update contributors.txt before reviewing or merging can proceed labels Oct 10, 2020
@RussKie
Copy link
Member

RussKie commented Oct 10, 2020

@BrianFreemanAtlanta please keep only the commit with your changes pertaining to the fix. If you send your signoff to the contributors.txt as a separate PR it will make merging both of your PRs simpler.

Thank you.

@RussKie RussKie merged commit 4355746 into gitextensions:master Oct 10, 2020
@ghost ghost added this to the 4.0 milestone Oct 10, 2020
@RussKie
Copy link
Member

RussKie commented Oct 10, 2020

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NBug] The filename or extension is too long
4 participants