doom purge should respect value of :depth in straight recipe when regrafting
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
I have the following recipe in my packages.el file:
```
(package! org-pomodoro-third-time
:recipe (:host github :repo "telotortium/org-pomodoro-third-time"
:fork (:host nil :repo "git@github.com:telotortium/org-pomodoro-third-time")
:depth full))
```
When I run `doom sync -up`, I expect most packages to be regrafted to `HEAD`, since my value of `straight-vc-git-default-clone-depth` is `(1 single-branch)`. However, for packages with `:depth full`, I expect all commits to be present in the cloned repository.
### What actually happened?
`doom purge` (which I was running via `doom sync -up`) is [unconditionally running `git replace --graft HEAD`](https://github.com/hlissner/doom-emacs/blob/f73ae8eee176b46fc8d02d8702d2da9bc25b3472/core/cli/packages.el#L524), no matter the value of `:depth`, unless I run `doom purge -g` instead.
I would expect `doom purge` to respect the value of `:depth` in the straight recipe.
### Describe your attempts to resolve the issue
_No response_
### Steps to reproduce
See above.
### System Information
https://pastebin.com/Fhhd3GAS
Contributor guide
Assessment
This issue has not been assessed yet.