Skip to content
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

hide diff after git add #420

Closed
logig opened this issue Jun 1, 2017 · 6 comments
Closed

hide diff after git add #420

logig opened this issue Jun 1, 2017 · 6 comments

Comments

@logig
Copy link

logig commented Jun 1, 2017

Why not hide the diff after git add , just like the acting of git-bash ? Has config item for this ?

@logig
Copy link
Author

logig commented Jun 1, 2017

Got it !

// GitGutter Settings - User

{
	"compare_against": ""
}

Just set "compare_against" to empty, it is strongly recommended to make this default.

@r-stein
Copy link
Collaborator

r-stein commented Jun 1, 2017

May be a good idea to add a "Compare Against: Index" command

@deathaxe
Copy link
Collaborator

deathaxe commented Jun 1, 2017

@r-stein : Already done 3 months ago. But I called it "Compare against Staging Area" with "compare_against": "CACHED" as setting. I even declared it the default.

The reason I haven't published it were several other changes it relied on which require git 2.12.0

What @logig describes works by luck here since GitGutter uses git cat-file to read the content from the tree which uses empty object_id to indicate the staging area.

So implementing would be easy.

@logig
Copy link
Author

logig commented Jun 2, 2017

I don't know, I just feel it like a "git diff xxx" command in git-bash. But this do not work fully, I have to reopen the file or it will not work. @deathaxe

@deathaxe
Copy link
Collaborator

deathaxe commented Jun 5, 2017

The only issue with just leaving the object_id empty to get the file content from staging area is, We never know when it changes and thus it won't be updated after a second git add call. File content is read from git database only, if the commit hash changed. So this feature again needs git status or functions, which seem not available on older git versions.

@deathaxe
Copy link
Collaborator

deathaxe commented Aug 2, 2017

The feature request and possible solutions to handle the staging area as compare target are discussed in #118 with same result as in this thread.

Therefore I close this issue as "duplicate".

@deathaxe deathaxe closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants