8000 zgen traverses all subdirectories (including .git directory) when updating. · Issue #94 · tarjoilija/zgen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zgen traverses all subdirectories (including .git directory) when updating. #94

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

Closed
hvindin opened this issue Jun 27, 2017 · 3 comments
Closed

Comments

@hvindin
Copy link
Contributor
hvindin commented Jun 27, 2017

On my machine with zsh 5.3.1 and the latest master for zgen I get the following output from a zgen update:

$ printf "ZSH Version: $(zsh --version)\nZgen Version: "; GIT_DIR=~/.zgen/.git git rev-parse HEAD; zgen update 2>&1 | sed -e "s#$USER#username#g" 
ZSH Version: zsh 5.3.1 (x86_64-redhat-linux-gnu)
Zgen Version: ffd3f50addf7a0106d9ea199025eb99efbb858f4
-- zgen: Updating '/home/username/.zgen/ascii-soup/zsh-url-highlighter-master/' ...
Current branch master is up to date.
-- zgen: Updating '/home/username/.zgen/.git/branches/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/.git/config' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/config
-- zgen: Updating '/home/username/.zgen/.git/description' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/description
-- zgen: Updating '/home/username/.zgen/.git/FETCH_HEAD' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/FETCH_HEAD
-- zgen: Updating '/home/username/.zgen/.git/HEAD' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/HEAD
-- zgen: Updating '/home/username/.zgen/.git/hooks/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/.git/index' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/index
-- zgen: Updating '/home/username/.zgen/.git/info/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/.git/logs/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/.git/objects/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/.git/packed-refs' ...
zgen-update:cd:3: not a directory: /home/username/.zgen/.git/packed-refs
-- zgen: Updating '/home/username/.zgen/.git/refs/' ...
fatal: This operation must be run in a work tree
-- zgen: Updating '/home/username/.zgen/unixorn/autoupdate-zgen-master/' ...
Current branch master is up to date.
-- zgen: Updating '/home/username/.zgen/zsh-users/zsh-autosuggestions-master/' ...
Current branch master is up to date.
-- zgen: Updating '/home/username/.zgen/zsh-users/zsh-completions-master/' ...
Current branch master is up to date.
-- zgen: Updating '/home/username/.zgen/zsh-users/zsh-history-substring-search-master/' ...
Current branch master is up to date.
-- zgen: Updating '/home/username/.zgen/zsh-users/zsh-syntax-highlighting-master/' ...
Current branch master is up to date.
-- zgen: Deleting `/home/username/.zgen/init.zsh` ...

This seems to be caused by this bit of zgen-update:
for repo in "${ZGEN_DIR}"/*/*; do

I've fixed this in my own fork of zgen by changing that line to:
for repo in "${ZGEN_DIR}"/(^.git)/*; do

which will match alldirectories in the zgen_dir that don't match '.git'

I'll create a pull request shortly, but I'd be interested to know if others are seeing the same issue.

@davidparsson
Copy link
Contributor

For me, * does not match dot files. Is that a zsh setting?

@hvindin
Copy link
Contributor Author
hvindin commented Oct 27, 2018

Odd, it never actually occured to me that this was something I had set in my dotfiles a few years ago, found this in my .zshenv:

setopt globdots

@davidparsson
Copy link
Contributor
davidparsson commented Oct 27, 2018

Ok, so maybe it would have been better to set NO_GLOBDOTS locally, rather than my fix in #109?

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

No branches or pull requests

2 participants
0