Closed simonweil closed 9 years ago
Sorry for not adding any explanation.
I use your plugin as a git submodule for my dot files.
This file is always created and as it's not ignored, when I run git status
the repo is dirty:
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: janus/vim-fetch (untracked content)
no changes added to commit (use "git add" and/or "git commit -a")
Ignoring the file will resolve this.
Well, as I said, these are ignored on my end and thus not part of the repo. They are created on your end by Vim when you install the plug-in (as a result of running :helptags
). Rather than creating a local ignore file in the repo that is redundant, I would suggest you exclude tags
files from version control globally: these are almost always state that need not be committed.
I could do this but it's just not very nice for people to need to do it, better user experience out of the box. Well, it's your choice, I will enjoy your plugin anyway :)
I'm all in favour of a good out of the box experience, but in this case, I think the plugin is not at fault: keeping state out of third party repos (remember vim-fetch’s repo itself is free of state) is something best solved by a bit of global user configuration. This notwithstanding, thanks for your PR and for discussing your usage case with me, and I am glad you are enjoying the plugin.
Ok, your choice. How do you ignore globally?
Quoting the Git - gitignore Documentation:
Which file to place a pattern in depends on how the pattern is meant to be used.
- Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that all developers will want to ignore) should go into a
.gitignore
file.- Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live inside the repository but are specific to one user’s workflow) should go into the
$GIT_DIR/info/exclude
file.- Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user’s editor of choice) generally go into a file specified by
core.excludesFile
in the user’s~/.gitconfig
. Its default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore is used instead.
The last item of the quote describes global ignore configuration.
Thank you!
Hmm, I have tags files excluded globally, and until now that seems to have kept them out of the repo, so I'm not entirely sure what you are aiming for with this PR…