chriswalz / bit

Bit is a modern Git CLI
Apache License 2.0
6.06k stars 107 forks source link

add undo-commit command #115

Open rustiever opened 3 years ago

rustiever commented 3 years ago

64

rustiever commented 3 years ago

Hi @chriswalz, can you review and tell me what i'm missing in this PR

chriswalz commented 3 years ago

Hi @rustiever nice job I think you're pretty close although I haven't tested your code.

Here is the key change. The api should be: bit fix undo-commit and right now it looks like the code is setup as bit undo-commit

In terms of changing the code anywhere you have undo-commit you'll want to change that to fix.

Suggestion tree for fix will look like this

st.Sub["fix"] = &complete.CompTree{
    Args: map[string]*complete.CompTree{
        "undo-commit": {Desc: "soft undos last commit if not pushed already"},
    },
}