Skip to content

Can't stash single files with older versions of Git #381

@tzachshabtay

Description

@tzachshabtay
  • GitLens Version: 8.3.2
  • Git version: 2.7.4
  • VSCode Version: 1.23.1
  • OS Version: Ubuntu 16.04 LTS 64bit

Steps to Reproduce:

  1. Use Git 2.7.4 (which doesn't have "git stash push" but "git stash save"?)
  2. Try to stash files.

Error from the gitlens verbose output channel:

StashSaveCommand Error: Command failed: /usr/bin/git -c core.quotepath=false -c color.ui=false stash push -u -m key -- my_folder/file1.json file2.sh file_3.sh
usage: git stash list [<options>]
   or: git stash show [<stash>]
   or: git stash drop [-q|--quiet] [<stash>]
   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
   or: git stash branch <branchname> [<stash>]
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
		       [-u|--include-untracked] [-a|--all] [<message>]]
   or: git stash clear

This was fixed after I upgraded git to 2.17.0.

So you should either make it compatible with older git versions or give a proper error message "please upgrade to latest git" (or something like that).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions