Skip to content

use stageFiles to stage untracked files for stashing #8345

Closed

Description

@outofambit

And I decided not to use the stageFiles method in update-index.ts because it does a lot of unnecessary stuff, including multiple git update-index calls.

One of the reasons we use update-index instead of add in the app is because update-index lets us pass the paths to add/remove/etc over stdin as opposed to add which only lets us pass them as command line arguments. On Windows there's a hard cap for the combined length of command line arguments (see for example #1668) which we've been bitten by a number of times in the past leading to us doing our very best to avoid passing paths and such as command line args.

I think we can merge this without making that change given that we're close to the release but if we end up doing a beta release on Monday it would be swell to have this leverage update-index instead. I think we could just export the updateIndex method from update-index.ts and leverage that here if going through stageFiles feels too heavy-handed.

Originally posted by @niik in #8085

Activity

  1. added
    epic:stashing
    tech-debt
    on Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:stashingtech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions