Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commands,t: report invalid ref in push command
Unlike the "git lfs fetch" command, the "git lfs push" command does not currently report an error if an invalid ref is provided as a command-line argument, so we update the command to output an error message in this situation, and we add a test to confirm the new behaviour works as expected. Note that in contrast to the "git lfs fetch" command's older implementation of this type of check, we simply report an error message when an invalid ref is encountered, rather than calling our Panic() function and also writing a stack trace to a log file. This approach is more in keeping with how many of our commands now handle similar error conditions; e.g., the "git lfs fsck" and "git lfs migrate" commands call ExitWithError() rather than Panic() when refs cannot be resolved. Co-authored-by: Philip Peterson <[email protected]>
- Loading branch information