Skip to content

Untracked file are not reverted

I don't know if it's a wanted behavior or not, but if it is, it can cause some trouble.

Steps to reproduce, after downloading last gamble version:

git init
touch new_doc
git status
./git-gamble-v2.3.0-x86_64.AppImage --fail -- echo "Hello"
git status

If the untracked file has a dependency on a method that has been reverted it can confuse the user in what's still here and what has been wiped off.

Also if the gambler is supposed to put you back in a Green state, this can conduct to a fake positive state

Example:

Let's have a Operation.py file containing

def op_sum(a, b):
    return a+b

And its unit test file sum_test.py with:

from Operation import op_sum

def test_sum():
    assert op_sum(1,1) == 2

Running ./git-gamble-v2.3.0-x86_64.AppImage --pass -- pytest everything is Green and commited !

Now let's add a multiply method to Operation.py but with an error within it !

def op_sum(a, b):
    return a+b

def op_multiply(a, b):
    return a*b + 1

And the new unit test file multiply_test.py with

from Operation import op_multiply

def test_multiply():
    assert op_multiply(5,5) == 25

Running ./git-gamble-v2.3.0-x86_64.AppImage --pass -- pytest of course I lose my gamble so I have everything reverted, except the multiply_test.py file still being here, so the current repository state is still Red when it should be green according to the last commited state.

Edited by k.hantzen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information