Skip to content

Add display handling of files added by git add -N #59163

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

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

ChristianAlexander
Copy link
Contributor

@ChristianAlexander ChristianAlexander commented Sep 22, 2018

Relates to #42665

Adds support for displaying files which were added by git add -N.

According to man git-add:

-N, --intent-to-add
           Record only the fact that the path will be added later. An entry for the path is placed in the
           index with no content. This is useful for, among other things, showing the unstaged content of
           such files with git diff and committing them with git commit -a.

As files in this state are only present in the working tree (and not the index or a part of any merge behavior), this change adds them to the workingTree section of the git UI (usually localized as "Changes").

Because there is no previous version of the file available, only a right entry in the editor is created when opened, just like files which have a status of UNTRACKED.

Before:
before-intent-to-add

After:
intent-to-add

@ChristianAlexander ChristianAlexander changed the title Add display handling of files added by git add -N #42665 Add display handling of files added by git add -N Sep 22, 2018
@joaomoreno joaomoreno added the git GIT issues label Sep 24, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Sep 24, 2018
@joaomoreno joaomoreno merged commit 9d94600 into microsoft:master Dec 20, 2018
@joaomoreno
Copy link
Member

Thanks! 🍻

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants