Skip to content

Rebase failed with error: "unable to unlink old <filename> Invalid argument" (works Ok with older version) #1262

@AlexeyKryshen

Description

@AlexeyKryshen
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

Portable version

git version 2.14.0.windows.2
built from commit: 0f3342804fc6fa558a7c9e220e7e9ab4c86e8226
sizeof-long: 4
machine: x86_64

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 6.1.7601]

  • What options did you set as part of the installation? Or did you choose the
    defaults?

Default Portable version installation

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

LFS installed and used on repository caused the issue

git-lfs/2.2.1 (GitHub; windows amd64; go 1.8.3; git 621d1f82)

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash

git rebase master

master is just 1 commit ahead of branching point and branch I want to rebase contains 2 commits (branch based on master). Branch commits contains only new files under LFS (no any single modified from master). Branch commits age huge (~1 Gb/ ~3000 files each). First branch commit contains only newly added files and second one delete ~50 of them and modify each remaining ( ~50 deleted & ~2950 modified). Again, all files in branch commits are under LFS.

  • What did you expect to occur after running these commands?

branch successfully rebased on newest master commit

  • What actually happened instead?

Rebased failed with the following message:

$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: Branch commit 1
Applying: Branch commit 2
error: unable to unlink old '<Full path name>': Invalid argument
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Failed to merge in the changes.
Patch failed at 0002 Branch commit 2
The copy of the patch that failed is found in: .git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Unfortunately it is happened with local repository.

  • Additional information

The scenario (rebasing branches with huge LFS commits) is common for the projects I am currently working with and for about an year it is the first time the issue occur (we start using LFS about an year ago). The issue occur when I was trying newest version of Portable Git for windows (2.14.0.2). Version 2.10.2 (the version we working with currently) works as expected and doesn't raise the issue with this rebase. Version 2.13.3 also cause the same rebase issue. Other versions are not tested by me.

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