-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-gui: accommodate for intent-to-add files #699
git-gui: accommodate for intent-to-add files #699
Conversation
As of Git v2.28.0, the diff for files staged via `git add -N` marks them as new files. Git GUI was ill-prepared for that, and this patch teaches Git GUI about them. Please note that this will not even fix things with v2.28.0, as the `rp/apply-cached-with-i-t-a` patches are required on Git's side, too. This fixes git-for-windows#2779 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/submit |
Submitted as pull.699.git.1597244777943.gitgitgadget@gmail.com |
On the Git mailing list, Pratyush Yadav wrote (reply to this):
|
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
On the Git mailing list, Pratyush Yadav wrote (reply to this):
|
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
User |
On the Git mailing list, Pratyush Yadav wrote (reply to this):
|
User |
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
I've decided to leave it to @prati0100 to make this as complete as asked-for. |
This fixes the intent-to-add bug reported in git-for-windows#2779: after a file was staged with
git add -N
, staging hunks/lines would fail silently.On its own, this patch is not enough, as it requires the patches provided in
rp/apply-cached-with-i-t-a
to be applied on Git's side.Please note that this patch might need a bit more help, as I do not really know whether showing "new file mode 100644" in the diff view is desirable, or whether we should somehow try to retain the "intent-to-add" state so that unstaging all hunks would return the file to "intent-to-add" state.
Thoughts?
cc: Johannes Schindelin Johannes.Schindelin@gmx.de
cc: Pratyush Yadav me@yadavpratyush.com