Questions tagged [vc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Change vc-print-log split axis

I recently updated to emacs 28.2. Prior to this if I hit C-x v l (vc-print-log) to see a file's git history, the window split horizontally. I'd have the file on one side and the commit history in what ...
1 vote
0 answers
22 views

Potential reason why vc-annotate output is sometimes incomplete?

On Emacs 27.1 running on Linux, with Subversion backend, vc-annotate does not always annotate the complete file (seen on 3000-lines, 110KB text file). The vc-annotate-mode buffer holds the beginning ...
  • 641
0 votes
0 answers
35 views

Run pre-commit hooks when using magit, poetry, and tramp

This is an emacs & magit version of the following question, with an added twist. https://stackoverflow.com/questions/72839263/access-python-interpreter-in-vscode-version-controll-when-using-pre-...
0 votes
0 answers
18 views

File is not under version control (Subversion/svn)

I have a Subversion checkout which works fine (I can do svn st, svn diff etc.) However, Emacs doesn't recognise that the files are in Subversion. E.g. if I do M-x vc-diff I get File is not under ...
1 vote
1 answer
112 views

Is there a way to see a log of the backend commands issued by VC commands?

I'd like to see the what commands are issued by the child process used by the various VC commands. Is there a way to log them or collect them without modifying the VC code? For example, I'd like to ...
  • 641
0 votes
1 answer
56 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 ...
3 votes
1 answer
79 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 ...
  • 7,421
0 votes
0 answers
32 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 ...
1 vote
1 answer
130 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
0 answers
137 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-...
  • 131
0 votes
1 answer
56 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
1 answer
90 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 ...
  • 111
1 vote
0 answers
60 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 ...
  • 121
0 votes
2 answers
144 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. ...
2 votes
1 answer
102 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 ...
  • 23
3 votes
0 answers
211 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
1 answer
831 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 ...
  • 1,068
5 votes
1 answer
2k 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?
  • 359
3 votes
1 answer
178 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,180
1 vote
2 answers
232 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 ((
  • 3,180
1 vote
0 answers
28 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
1 answer
40 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
1 answer
314 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 ...
3 votes
1 answer
1k 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 ...
  • 278
0 votes
2 answers
177 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 ...
  • 461
3 votes
2 answers
295 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 ...
  • 145
1 vote
3 answers
878 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 ...
  • 3,755
1 vote
1 answer
330 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. ...
  • 143
1 vote
2 answers
693 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 ...
  • 281
1 vote
1 answer
142 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
2 answers
363 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 ...
  • 5,529
2 votes
2 answers
286 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 ...
  • 123
3 votes
1 answer
67 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 ...
  • 377
0 votes
2 answers
360 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
1 answer
135 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
1 answer
193 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 ...
  • 4,635
2 votes
2 answers
235 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 ...
  • 5,924
4 votes
2 answers
766 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 ...
  • 281
2 votes
2 answers
324 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, ...
  • 2,099
3 votes
0 answers
34 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.
  • 10.1k
2 votes
1 answer
219 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.
  • 49
8 votes
3 answers
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....
's user avatar