Skip to content

Pull command suppress download errors occurred during it's work and exits with zero code #2236

Closed

Description

@seth2810

Similar to #731 when git lfs can't download some of my files during it work, for example storage host died, pull command will return zero code rather than return an error code:

> git-lfs pull
Git LFS: (0 of 25063 files) 0 B / 621.71 MB                                                                                                                                         
batch request: ssh_exchange_identification: Connection closed by remote host: exit status 255
...
batch request: ssh_exchange_identification: Connection closed by remote host: exit status 255
> echo $?
0

In the same time fetch command catch this case:

> git lfs fetch
Fetching branch
Git LFS: (0 of 25063 files) 0 B / 621.71 MB                                                                                                                                         
batch request: exit status 255
...
batch request: exit status 255
Warning: errors occurred
> echo $?
2

https://github.com/git-lfs/git-lfs/blob/master/commands/command_fetch.go#L325-L330
https://github.com/git-lfs/git-lfs/blob/master/commands/command_fetch.go#L105-L107

https://github.com/git-lfs/git-lfs/blob/master/commands/command_pull.go#L107-L109

I would think it makes sense that git lfs pull should return non-zero in this case. If not, how can I detect that errors occurred and fix them/try again?

Activity

  1. changed the title [-]Suppress pull errors occurred during it work and exits with zero code[/-] [+]Pull command suppress download errors occurred during it's work and exits with zero code[/+] on May 19, 2017
  2. seth2810 commented on May 19, 2017

    @seth2810
    Author

    Maybe somebody can help with writing a test covering my case, now I do not know how to simulate a connection break in the test? Locally reproduced by redirecting traffic to a dummy host.

  3. ttaylorr commented on May 19, 2017

    @ttaylorr
    Contributor

    👋 @seth2810, thanks for opening this up! I see that you started work on this in #2237, so I'm going to redirect discussion about this PR to there, if you don't mind.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions