Skip to content

Conversation

taquangtrung
Copy link
Contributor

Hi,

This is a small fix to ensure that the setting (setq vc-deduce-backend-nonvc-modes t) in your comment is always met.

#2732 (comment)

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Jul 24, 2025 via email

@taquangtrung
Copy link
Contributor Author

Just a comment on what I experienced previously, if I keep vc-deduce-backend-nonvc-modes as the default value, then (vc-deduce-backend) will return Nil on Git-untracked files.

This can happen, for example, when I just create a new file and haven't included it in the Git repo yet.

So, I think this PR is a safe fallback in the case that users aren't aware that they need to set vc-deduce-backend-nonvc-modes to t.

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Jul 24, 2025 via email

@taquangtrung
Copy link
Contributor Author

Quang Trung Ta @.*> writes:
● taquangtrung left a comment (emacs-helm/helm#2735) Just a comment on what I experienced previously, if I keep vc-deduce-backend-nonvc-modes as the default value, then (vc-deduce-backend) will return Nil on Git-untracked files. This can happen, for example, when I just create a new file and haven't included it in the Git repo yet. So, I think this PR is a safe fallback in the case that users aren't aware that they need to set vc-deduce-backend-nonvc-modes to t.
So it is the same as always using (vc-responsible-backend default-directory) instead of (vc-deduce-backend), it is what you want I think.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.
>
-- Thierry

What you said is right, setting vc-deduce-backend-nonvc-modes to t also means that always call (vc-responsible-backend default-directory).

Now I'm not sure if this PR is the right fix for the issue of Git-untracked files that I encountered 😅

@thierryvolpiatto
Copy link
Member

thierryvolpiatto commented Jul 24, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants