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

Allow git repos to be submodules #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

schmir
Copy link

@schmir schmir commented Oct 17, 2024

I'm using yadm and would like to track the plugins as submodules of the yadm repository. When checking out such a submodule, .git is not a directory, but rather a file. This resulted in the following error, for each of the plugins that I track as a submodule:

% exec zsh
.znap.source:16: no directory expansion: ~[superbrothers/zsh-kubectl-prompt] 
.znap.source:16: no directory expansion: ~[mattmc3/zfunctions] 
.znap.source:16: no directory expansion: ~[olets/zsh-abbr] 
.znap.source:16: no directory expansion: ~[Aloxaf/fzf-tab]

With this commit ..znap.repos and ..znap.dirname handle that case. Please note that there are other checks in some of the scripts that do also check for a .git directory. They may still need to be changed.

Before submitting your Pull Request (PR), please check the following:

  • There is no other PR (open or closed) similar to yours. If there is, please first discuss over there.
  • Your new code in each file follows the same style as the existing code in that file.
  • Each commit messages follows the Seven Rules of a Great Commit Message.
  • Each commit message includes Fixes #<bug> or Resolves #<issue> in its body (not subject, that is, the
    first line) for each issue it resolves (if any).
  • You have squashed any redundant or insignificant commits.

I'm using yadm and would like to track the plugins as submodules of the yadm
repository. When checking out such a submodule, .git is not a directory, but
rather a file. This resulted in the following error, for each of the plugins
that I track as a submodule:

% exec zsh
.znap.source:16: no directory expansion: ~[superbrothers/zsh-kubectl-prompt]
.znap.source:16: no directory expansion: ~[mattmc3/zfunctions]
.znap.source:16: no directory expansion: ~[olets/zsh-abbr]
.znap.source:16: no directory expansion: ~[Aloxaf/fzf-tab]

With this commit ..znap.repos and ..znap.dirname handle that case. Please note
that there are other checks in some of the scripts that do also check for a .git
directory. They may still need to be changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant