git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.48k stars 1.25k forks source link

Serious data loss: deleting file deletes other files' changes #899

Closed danielchasehooper closed 1 year ago

danielchasehooper commented 1 year ago

using gitup version 1.3.2 (1045) macOS 13.1 (22C65) steps to repro:

  1. run these commands

    mkdir bug
    cd bug
    echo '#include <stdio.h>
    int main() {
    printf("hello\n");
    }' > main.c
    git init
    git add main.c
    git commit -m "initial commit"
    cc -o main main.c
    echo "// here are some changes to file" >> main.c
  2. Open the bug/ folder in gitup

  3. go to gitup's commit view

  4. select "main" in the working directory section

  5. press delete on your keyboard

result: both main and main.c will lose all their changes, even though only main was selected

danielchasehooper commented 1 year ago

@swisspol @lucasderraugh This is pretty serious, I lost a lot of work because of it.

lucasderraugh commented 1 year ago

I'm going to revert back to 1.3.2 version of libgit2 today. Please check for an update later today or revert to 1.3.2 in the meantime.

lucasderraugh commented 1 year ago

Oh, this was on 1.3.2? Then I'll take some time to investigate your repro steps.

lucasderraugh commented 1 year ago

This was actually fixed as part of 1.3.4, so I'm going to close this particular ticket. 1.3.4 breaks some things but fixes others I guess...