* elpa - problem with stashes inside worktree
@ 2021-04-07 17:52 Filipp Gunbin
2021-04-07 17:58 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Filipp Gunbin @ 2021-04-07 17:52 UTC (permalink / raw)
To: emacs-devel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: elpa - problem with stashes inside worktree
2021-04-07 17:52 elpa - problem with stashes inside worktree Filipp Gunbin
@ 2021-04-07 17:58 ` Andreas Schwab
2021-04-07 20:49 ` Filipp Gunbin
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2021-04-07 17:58 UTC (permalink / raw)
To: emacs-devel
On Apr 07 2021, Filipp Gunbin wrote:
> 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:
>
> 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
>
> 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.
That is correct, as the package lives in a separate branch.
> From C-x v d on a package directory, stash can be applied normally.
The main elpa branch just doesn't contain anything related to packages.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: elpa - problem with stashes inside worktree
2021-04-07 17:58 ` Andreas Schwab
@ 2021-04-07 20:49 ` Filipp Gunbin
0 siblings, 0 replies; 3+ messages in thread
From: Filipp Gunbin @ 2021-04-07 20:49 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel
On 07/04/2021 19:58 +0200, Andreas Schwab wrote:
> The main elpa branch just doesn't contain anything related to packages.
(I've done "make setup" / "make worktrees" some time ago)
Yes, I see why the problem happens, but that doesn't help :-)
Filipp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-07 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-07 17:52 elpa - problem with stashes inside worktree Filipp Gunbin
2021-04-07 17:58 ` Andreas Schwab
2021-04-07 20:49 ` Filipp Gunbin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.