-
Notifications
You must be signed in to change notification settings - Fork 382
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
Weird corner-case issue with .gitignore in git init'ed repos #4222
Comments
So the issue is that I assume this will be fixed if we leverage gitoxide function to resolve paths loaded from the git config. |
I guess… I was thinking |
It wouldn't be hard to fix. We'll probably need to copy (FWIW, I noticed the config API slightly changed in the latest gitoxide version. We might need to upgrade it first.) |
Appears that both git and gix don't resolve relative paths at config layer. The |
The "git" command appears to chdir() to the --work-tree directory first, then read() the core.excludesFile file. There's no manual relative path resolution in "git". Fixes jj-vcs#4222
The "git" command appears to chdir() to the --work-tree directory first, then read() the core.excludesFile file. There's no manual relative path resolution in "git". Fixes jj-vcs#4222
The "git" command appears to chdir() to the --work-tree directory first, then read() the core.excludesFile file. There's no manual relative path resolution in "git". Fixes jj-vcs#4222
Description
So, for context: I keep my
~/.config
on version control. It started ongit
. Just for aesthetic purposes, my.gitignore
file for this repo is actually~/.config/gitignore
(note the lack of a dot). This was done using the following command:All was well and good. But also, I didn't like to do
cd .config
every time, so I aliased asconfig
this command:All was well and good. And then, I discovered
jj
and, evidently, made the switch (jj git init --colocate
and all that jazz). I changed the alias:jj --repository $XDG_CONFIG_HOME
And all was well and good, until I did
config status
, when all hell broke loose. All those large files those anoying applications keep in my beautiful config directory started resurfacing from the depths of thegitignore
,jj
trying to index them all just to fail because of some megabyte-sized monster. Oh the horrors.But more than that, I was confused. Weren't they ignored? And
jj
knows it, as the following works quite well, thank you:$ cd .config $ jj status
Steps to Reproduce the Problem
Go to some directory in your system and run the following:
Expected Behavior
The two outputs of the
status
subcommand should be the same. The same files should be ignored.Actual Behavior
They aren't.
Specifications
Comments
I'm not sure what the fix should be, or even if it should be fixed. Anyway, I'd love suggestions to deal with the situation. Specifically, I would like to be able to
gitignore
(without the dot)jj --repository $XDG_CONFIG_HOME
.The text was updated successfully, but these errors were encountered: