unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: emacs-devel@gnu.org
Subject: elpa - problem with stashes inside worktree
Date: Wed, 07 Apr 2021 20:52:32 +0300	[thread overview]
Message-ID: <m2eefmnfrz.fsf@fastmail.fm> (raw)

Hi, I've got this problem in elpa repo:

- make a new stash in some package (just "git stash")
- C-x v d on top-level elpa directory
- vc-git-stash-apply-at-point on the just created stash fails

Stash diff looks like this:

--8<---------------cut here---------------start------------->8---
diff --git a/javaimp.el b/javaimp.el
index 8e27452418..a9781630e9 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -577,4 +577,6 @@ cache."
 
 (provide 'javaimp)
 
+asdf
+
 ;;; javaimp.el ends here
--8<---------------cut here---------------end--------------->8---

The file path is wrong, and change is applied to the wrong file.  Looks
like Git creates stash using package worktree dir as the top directory.

From C-x v d on a package directory, stash can be applied normally.

Maybe we could extend vc-dir to specially treat this case?  I doubt that
Git worktrees are intended to be used this way (inside the main tree)…

Filipp



             reply	other threads:[~2021-04-07 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 17:52 Filipp Gunbin [this message]
2021-04-07 17:58 ` elpa - problem with stashes inside worktree Andreas Schwab
2021-04-07 20:49   ` Filipp Gunbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2eefmnfrz.fsf@fastmail.fm \
    --to=fgunbin@fastmail.fm \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).