Skip to content

git-lfs staged but unstaged changes with 0B tracked file #557

Closed

Description

@octylFractal

When a zero byte file is tracked by git-lfs, it will make git status claim there are no changes, but git rebase -i will claim there are unstaged changes. This doesn't happen with 1b+ files, as seen on the 1b branch.

Test repo: https://github.com/kenzierocks/0b1can0b

Activity

  1. technoweenie commented on Aug 5, 2015

    @technoweenie
    Contributor

    Interesting, thanks for the report.

  2. added
    help-wanted
    on Sep 4, 2015
  3. fiddike commented on Jan 17, 2016

    @fiddike

    First of all thank you for all the great work on git-lfs!!!

    I just reproduced this bug with the latest release git-lfs/1.1.0 (GitHub; linux 386; go 1.5.1) running on Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-43-generic i686) and distro included git version 1.9.1.

    I ran into it with one of by own repos but then I was able to reproduce it with the minimal test repo referenced in the original bug report above by kenzierocks:

    root@moby:/tmp# git-lfs version
    git-lfs/1.1.0 (GitHub; linux 386; go 1.5.1)
    root@moby:/tmp# git clone https://github.com/kenzierocks/0b1can0b.git
    Cloning into '0b1can0b'...
    remote: Counting objects: 7, done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 5
    Unpacking objects: 100% (7/7), done.
    Checking connectivity... done.
    Downloading 0b.track (0 B)
    root@moby:/tmp# ls -l
    total 4
    drwxr-xr-x 3 root root 4096 Jan 17 23:19 0b1can0b
    root@moby:/tmp# cd 0b1can0b/
    root@moby:/tmp/0b1can0b# ls
    0b.track
    root@moby:/tmp/0b1can0b# git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    
    nothing to commit, working directory clean
    root@moby:/tmp/0b1can0b# git commit .
    On branch master
    Your branch is up-to-date with 'origin/master'.
    
    Changes not staged for commit:
            modified:   0b.track
    
    no changes added to commit
    root@moby:/tmp/0b1can0b# 
    

    Is it still there or is it a regression??

  4. octylFractal commented on Jan 18, 2016

    @octylFractal
    Author

    This was never fixed, so it is still there.

  5. technoweenie commented on Aug 17, 2016

    @technoweenie
    Contributor

    Fixed by @nathanhi 🤘

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

    bughelp-wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions