Questions tagged [vc]
The vc tag has no usage guidance.
39
questions
0
votes
1answer
41 views
Can Emacs be set to auto-stage (preferably with --intent-to-add) new files?
I often add a new file to a repo, make some other changes, then stage all, and commit all, forgetting that the new file is not yet tracked, so is not included in the stage all step. At least one ...
1
vote
0answers
21 views
How to query the name of the current branch in an elisp function?
I'd like to know the current branch I'm in (in elisp), is there a generic function that returns the name of the current branch?
From looking into vc-mode mode-line logic it seems this relies on ...
0
votes
0answers
17 views
vc-annotate: strip the last character of git commit id
When editing a file managed by Git, vc-annotate shows the output of git blame. As Git usually does, revisions are identified by a short commit id.
The short commit id is abbreviated to be one ...
7
votes
3answers
2k views
Customize vc-mode appearance in mode-line
I use vc-mode to show information about the current VC state in my mode line, like this:
(setq mode-line-format '(… (vc-mode vc-mode) …))
However, I find the default format of vc-mode pretty verbose....
0
votes
1answer
34 views
How to sign git commit using VC?
I am just wondering how can VC can be used to sign commit using gpg, Currently I am using vc without sign mean I am using vc-next-action to perform git commit
1
vote
0answers
70 views
Cannot figure out why vc-git.elc is always loaded on startup
This is more a curiosity, than a necessity.
I'm playing around with startup times, and to have something to compare with, I wanted to see how fast emacs could start up pure.
Running emacs -Q, emacs-...
0
votes
0answers
21 views
(Version-Control) Branch Agnostic Undo
Has anybody tried implementing (VC) branch specific undo's? It would have to be agnostic to changes both inside Emacs and from the outside when Emacs is running using file-notify-.*.
One solution ...
0
votes
0answers
12 views
How I can see difference between working file and index with vc-diff and vc-ediff command with vc-git?
vc-diff and vc-ediff seem to show changes between working file and HEAD. I would like to see difference between working file and index instead.
How can I do that?
0
votes
1answer
25 views
Version control: registered or unregistered?
I'm a bit confused when writing code using the VC interface. After executing the following commands in the shell (committing a dummy file ~/test/file in a fresh git repo ~/test):
cd
mkdir test
cd ...
2
votes
1answer
55 views
How to resolve TRAMP spamming empty messages
Connecting to a remote machine with tramp that may have VC (subversion) related
files, I tend to see a large number of repeated messages in the *Messages*
buffer. For example:
Type "q" in help ...
1
vote
1answer
490 views
How do I do a `git add` with vc-git?
I want to stage a file or a hunk using vc-git (the vc system that comes with Emacs). How do I do this?
(To clarify, I made modifications on a file that is already (registered) in git. I would like to ...
1
vote
0answers
35 views
Git status on modeline to indicate if behind remote?
Can I get Emacs to indicate on the mode-line whether a push is needed, i.e. whether the repo is out of sync with origin?
I've already got it telling me if a commit is needed using vc-status, but that ...
3
votes
2answers
235 views
VC status behavior in ibuffer-vc
I use ibuffer-vc, a replacement for list-buffer that displays the VC status of the listed files. I noted that the VC status stays as "edited" even after I push my changes. That is, the VC status does ...
0
votes
2answers
561 views
vc-git doesn't recognize that file is under version control
I initialized a Git repository outside emacs, added and committed the files.
Now if I a file in emacs that is under version control by Git and run C-x v = emacs tells me This file is not under ...
0
votes
2answers
101 views
Can't enable a file in Version Control RCS in Emacs 26
Trying here to set a file with VC RCS, but I'm having some trouble finding the .el file and enable it.
Already managed to download rcs.el from this link, but it isn't being recognized in Emacs.
...
1
vote
2answers
144 views
How can I see diff for specific changeset?
I want an analog of git show $REV / hg diff -c $REV / svn diff -c $REV in Emacs when I know $REV.
Currently I open full history via C-x v L and search for specific revision and then type d or l ((
1
vote
1answer
72 views
Disable VC for SVN in exclusive-locking mode
I have Subversion exclusive-locking enabled to increase SVN performance. If I commit a file the svn command line client opens Emacs so I can enter a commit message. But Emacs VC tries to determine the ...
3
votes
1answer
130 views
Make VC log history to follow file renames
I like to see full file history regardless file renames (and with Java convention class name == file name several refactoring makes following history difficult).
3
votes
0answers
158 views
Is there a more async or lazy vc-mode?
Question
Does a "lazy" or "asynchronous" vc mode exist?
Background
Emacs vc mode is designed on the assumption that the version control backend is fast. Much of the core vc features wants the ...
6
votes
1answer
462 views
Is there a way to revert only certain lines from a diff hunk?
I use the builtin VC package and it's very nice that when I do a diff of changes in the current file then I can revert any hunk in the diff quickly with C-a
But sometimes I don't want to revert the ...
4
votes
1answer
1k views
How do I visit a file on a different branch?
I'm aware of C-x v ~ which allows you to see a different revision of the current file, but I would like to visit the file on another branch.
Is this possible with magit, VC or git-timemachine?
1
vote
3answers
733 views
Emacs doesn't recognize if file is under version control
I noticed I never see in the mode line in which VCS branch I'm currently in, when I open a file in Emacs.
So I tried it with an empty Emacs, created a folder in Eshell, called ~/foo
, and initialized ...
1
vote
1answer
34 views
How to prevent the creation of an RCS directory?
When I enable version control for a certain file using RCS, Emacs 27.0.50 creates an RCS subdirectory. I remember that some former versions of Emacs just created a …,v sidecar file instead. How can ...
1
vote
0answers
24 views
Possible to make vc-dir aware of (hg) subrepo changes?
vc-dir works really well for most of my needs, as I use both hg and svn repositories. But most of the hg repos I work with have subrepositories. I typically use vc-dir buffers for each of the subrepos ...
1
vote
1answer
279 views
Resolve git merge conflict by applying diff hunk to different file
I have refactored a file by splitting into two files in one git branch, and someone else has made a different change to the original file on another git branch. This has produced a merge conflict in ...
0
votes
2answers
303 views
On occasion, mode-line git information gets stuck and doesn't update
On occasion, the git information on mode-line, gets stuck and will not update. For example if I checkout to a different branch, the old branch will still be shown. Or the "mod" indicator will remain ...
0
votes
2answers
150 views
Is there a common way to open “svn-status” or “magit” depending on current buffers system?
before I sit down and reinvent the wheel for me:
I'm working with svn and git in different projects. Is there already an existing way to start svn-status or magit, depending on the vcs that is used ...
3
votes
2answers
664 views
How to change options passed to git vc-annotate?
I have a hard time using vc-annotate (my version control system is git), because the output is not very userfriendly, as it displays long filenames in a separate column in the buffer, which take up ...
1
vote
1answer
255 views
diff-refine-hunk with unified diff
Problem
Some versions of diff (notably, busybox diff in every build of BusyBox I've seen) only produce "unified" diff format output, they don't produce the output that GNU diff produces by default.
...
1
vote
1answer
124 views
Ignoring newline changes in smerge-diff-mine-other
For me, smerge-diff-mine-other seems to ignore changes in the number of whitespace characters where there is whitespace, but I would sometimes like it to ignore all whitespace, including newlines - ...
1
vote
2answers
291 views
super detailed vc-change-log
When I do l (vc-print-log) in the *vc-dir* buffer, I get the *vc-change-log* buffer with a single line per commit.
Even when I can hit RET (log-view-toggle-entry-display) there to get the details, I ...
3
votes
1answer
63 views
Version control: how to inhibit opening email buffer upon breaking lock
My work uses GNU RCS for our version control system, but I don't think the specific VCS is relevant here. (I know RCS isn't the most modern system but it suits our needs fine and has the advantage of ...
2
votes
2answers
236 views
Discarding modified hunk at current position
I'd like to discard modified hunks (and ideally, view the diff before) basing on the current buffer position.
I have diff-hl so that it's quite obvious which part of a buffer are modified. Now, how ...
2
votes
2answers
203 views
Show change log of other branch with vc-git
When using VC for a Git repository on Emacs 24.3, I want to view commits in a different branch from the one I've checked out.
It seems like C-u C-x v l should be command for that, as it asks Log from ...
0
votes
1answer
117 views
Ignore multiple files in VC mode
In VC Directory Mode, how do I ignore multiple files?
My use case is that I have a LaTeX repository (in SVN, but that should not matter) with over 15 *.aux files in a subdirectory.
Attempt 1
Mark a ...
6
votes
1answer
148 views
Indicate whether file has uncommited changes in mode line
In my mode line I can see if a buffer has unsaved changes (**- or a red x in my case, since I am using smart-mode-line).
Is there a similar way to display whether or not the file visited by the ...
2
votes
2answers
280 views
How to “svn revert <file>” with Emacs Version Control?
How can I do a svn revert <file> from Emacs Version Control?
I've read many parts of the manual, but can't find it.
I would like to do it over a file after opening it with vc-directory C-x v d, ...
3
votes
0answers
31 views
Determine if a directory is .gitignored with vc
I would like to determine if the current directory/file is ignored by .gitignore with vc. In this case, only git matters, but of course a general solution would be appreciated.
2
votes
1answer
203 views
Both VC and Magit cannot see global .gitignore
I'm using emacs on Windows and this is long bothered me. All other apps correctly ignore all listed in global .gitignore, but in emacs they are untracked/unregistered and pollute the status window.