Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using new feature :depth, how can I change a single package depth? #374

Closed
nasyxx opened this issue Apr 20, 2019 · 4 comments
Closed

Comments

@nasyxx
Copy link

nasyxx commented Apr 20, 2019

When I (setq straight-vc-git-default-clone-depth 1), I found that my magit had an error. So I re-register before the straight-use-package magit in the way of that #372 .

(straight-register-package
   '(magit :type git :host github
           :repo "magit/magit"
           :depth full))

But this error still appears

Cannot determine Magit’s version (error "/Users/Nasy/.emacs.d/straight/repos/magit/lisp/magit.el" repo t static elpa dirname)

Also, it comes with a warning.
Warning (straight): Packages "git-commit" and "magit" have incompatible recipes (:depth cannot be both nil and full)

Therefore, I also re-register the depth of git-commit, but it still goes wrong.

@raxod502
Copy link
Member

You need to elaborate on what "goes wrong" when you correct the recipe for git-commit. Do you still get a warning?

@nasyxx
Copy link
Author

nasyxx commented Apr 21, 2019

Sorry for my poor English...

All of the messages and warnings are here, when using the configs below:

-- messages
Cannot determine Magit’s version (error "/Users/Nasy/.emacs.d/straight/repos/magit/lisp/magit.el" repo t static elpa dirname)
-- warnings
Warning (straight): Packages "git-commit" and "magit" have incompatible recipes (:depth cannot be both nil and full)
Warning (straight): Recipe for "magit" has been overridden (:files changed from ("lisp/magit" "lisp/magit*.el" "lisp/git-rebase.el" "Documentation/magit.texi" "Documentation/AUTHORS.md" "LICENSE" (:exclude "lisp/magit-libgit.el") "magit-pkg.el") to nil)
Warning (straight): Recipe for "git-commit" has been overridden (:files changed from ("lisp/git-commit.el" "git-commit-pkg.el") to nil)

And my configs

(setq straight-vc-git-default-clone-depth 1)
(straight-use-package 'use-package)

(straight-register-package
   '(magit :type git :host github
	   :repo "magit/magit"
	   :depth full))

(straight-register-package
   '(git-commit :type git :host github
		:repo "magit/magit"
		:depth full))


(straight-use-package 'magit)
(straight-use-package 'git-commit)

(use-package magit
  :straight t
  :hook ((magit-popup-mode-hook . no-trailing-whitespace))
  :init (setq magit-diff-refine-hunk t)
  :bind (([(meta f12)] . magit-status)
         ("C-x g"      . magit-status)
         ("C-x M-g"    . magit-dispatch-popup)
         :map magit-status-mode-map
         ("C-M-<up>"   . magit-section-up)
         :map vc-prefix-map
         ("f"          . vc-git-grep))
  :config (with-eval-after-load 'magit-todos
            (magit-todos-mode)))

(straight-use-package 'magit-todos)

(use-package git-commit
  :straight t
  :hook ((git-commit-mode . goto-address-mode)))

In addition, I made some other attempts, including -Q -l bootstrp.el and then eval the configs.

But, it did not appear warnings or errors.

Maybe it's a problem with my configuration.

I will do some more experiments.

@nasyxx
Copy link
Author

nasyxx commented Apr 21, 2019

Aha! I guess, I have fixed the warnings and errors.

Earlier, there was a package that needed magit/git-commit, before I re-register magit/git-commit.

Sorry, this is my mistake.

@nasyxx nasyxx closed this as completed Apr 21, 2019
@raxod502
Copy link
Member

Glad to hear you figured it out! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants