Skip to content

[Stashing] Use 'update-index' to stage untracked files - #8363

Merged
niik merged 5 commits into
developmentfrom
ku-use-stage-files-using-stageFiles
Oct 1, 2019
Merged

niik merged 5 commits into
developmentfrom
ku-use-stage-files-using-stageFiles

Conversation

@kuychaco

Copy link
Copy Markdown
Contributor

Overview

Closes #8345

Description

As @niik kindly pointed out in #8085, on Windows there's a hard cap for the length of command line arguments, so we avoid using git add which requires us to pass file names as command line arguments. git update-index lets us pass files names as stdin so let's use that instead.

See https://github.com/desktop/desktop/pull/8085/files/ceaeaa8c7a37202c9b3e099bed383e0ade224f16#discussion_r328512068 for reference.

Release notes

Notes: no-notes

@kuychaco kuychaco added the epic:stashing Tracking label for work related to the stashing flow label Sep 27, 2019
@kuychaco kuychaco added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Sep 27, 2019
mislav
mislav previously approved these changes Sep 30, 2019

@mislav mislav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've also reviewed the stageFiles implementation and this change looks good. ✨

@mislav mislav self-assigned this Sep 30, 2019
Comment thread app/src/lib/git/stash.ts Resolved
@niik niik self-assigned this Sep 30, 2019
@kuychaco
kuychaco requested a review from niik October 1, 2019 04:11
@niik
niik merged commit 43426ea into development Oct 1, 2019
@niik
niik deleted the ku-use-stage-files-using-stageFiles branch October 1, 2019 09:30
@niik

niik commented Oct 1, 2019

Copy link
Copy Markdown
Member

Thanks a bunch for fixing this @kuychaco!

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

Labels

epic:stashing Tracking label for work related to the stashing flow ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use stageFiles to stage untracked files for stashing

3 participants