What's wrong with resetting with both --mixed and paths? · gitpython-developers/GitPython · Discussion #1876
Repository navigation
What's wrong with resetting with both --mixed and paths? #1876
Answered by EliahKagan EliahKagan asked this question in Q&A What's wrong with resetting with both --mixed and paths? #1876 EliahKagan Mar 14, 2024 · 2 comments Answered by EliahKagan Return to top Discussion options
EliahKagan
Mar 14, 2024
Collaborator
|
The Lines 97 to 105 in e880c33
The issue URL is broken and seems it may not be archived. Is more known about this issue, and is there anything that can be replaced with? |
Although I can't be certain there isn't further relevant information in the lost issue, I think I've figured this out. It's much more straightforward than I'd feared and indeed trying it out as you suggested in #1876 (comment) led directly to the answer.
Running git reset --mixed -- path always shows a warning. For example:
> git diff --staged --stat
git/__init__.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
> git reset --mixed -- git/__init__.py
warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.
Unstaged changes after reset:
M git/__init__.py
The suggestion of what to do instead was added in git/git@ a4941a8 , but the behavio...
View full answerReplies: 2 comments
Comment options
Byron
Mar 14, 2024
Maintainer
|
Under the assumption that the project was moved from Maybe one can try |
EliahKagan
Apr 1, 2024
Collaborator
Author
|
Although I can't be certain there isn't further relevant information in the lost issue, I think I've figured this out. It's much more straightforward than I'd feared and indeed trying it out as you suggested in #1876 (comment) led directly to the answer. Running
The suggestion of what to do instead was added in git/git@ a4941a8 , but the behavior of issuing a deprecation message is older than that. It looks like it came in at git/git@ 0e5a7fa when As for why one shouldn't write I'll open a small PR to clarify the comment. |