Skip to content

ensure that vc-deduce-backend works correctly in all cases - #2735

Open
taquangtrung wants to merge 1 commit into
emacs-helm:masterfrom
taquangtrung:helm-browse-project
Open

ensure that vc-deduce-backend works correctly in all cases#2735
taquangtrung wants to merge 1 commit into
emacs-helm:masterfrom
taquangtrung:helm-browse-project

Conversation

@taquangtrung

Copy link
Copy Markdown
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

thierryvolpiatto commented Jul 24, 2025 via email

Copy link
Copy Markdown
Member

@taquangtrung

Copy link
Copy Markdown
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

thierryvolpiatto commented Jul 24, 2025 via email

Copy link
Copy Markdown
Member

@taquangtrung

Copy link
Copy Markdown
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

thierryvolpiatto commented Jul 24, 2025 via email

Copy link
Copy Markdown
Member

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