Open mpariente opened 2 years ago
Hey, glad it works for you!
I think that's a nice follow on feature from the last issue, let me see what I can do (when I can find the time)!
If you right click a folder in the explorer you should get a new submenu now:
Just read it was for files & folders... I'll add files too...
This is great ! Thank you very much for this feature, it really helps ! About the file excluding method, which one do you recommend most "Sweep file by adding to exclude file" ?
Thanks again !
Hey,
The "Exclude Folder" does not work for me when it's an absolute path somehow. When I change it to relative path, it works though. Is it the same for you ?
Hi,
I'm not quite sure I understand what's going on, can you send me a screenshot or two please?
Does the right click menu allow you to Exclude folder and does .git/info/exclude file change at all for you?
Cheers
Thanks for your quick answer !
In the following example. I used the right click menu to exclude the to_ignore
folder. And the file inside it is not ignored.
If I change the folder name in .git/info/exclude to the relative path to_ignore/*
instead of /home/.../tmp_sweep/to_ignore/*
, the file does get ignored.
Does it make sense ?
I see what you mean now, how strange! I'll have a look...
It shouldn't be using the absolute path, what does git rev-parse --show-toplevel
show for you?
I couldn't reproduce here but I think it might have to do with a Windows/*nix difference & I've tried to fix it. Could you try out the latest version please & see if it still happens for you?
This is what I get now :
And git rev-parse --show-toplevel
gives me /home/mparient/code/cloned/tmp_sweep
.
Thanks again for looking into this!
Hmm not good! I won't be able to work on this for about a week but I'll have another go then & give you a shout, looks like it might have a little trouble with the home dir tilde ~
...
I didn't see your question earlier sorry:
About the file excluding method, which one do you recommend most "Sweep file by adding to exclude file" ?
I always use --skip-worktree
for files that are in the repository and adding to the exclude file for new files and directories. It might be better in a future version if the extension worked out what was best for you.
Hey - sorry for the delay getting back to you!
I'm trying to reproduce on a Ubuntu box & I'm still not getting any clues on how to fix it for you. I've made a pre-release version if you could please use that and let me know what the output is.
To use the pre-release version, go into the GitSweep extension:
And click the Switch to Pre-Release Version:
It should install a new version which has a little bit more debug. If you go to output in the terminal window and click GitSweep from the dropdown, you should see something like this when you sweep/unsweep a file/folder:
You might notice from my example that it uses the git root to truncate the file/folder paths to make them relative paths. Your Git root seems to be: /home/mparient/code/cloned/tmp_sweep
but the folder path is /user/mparient/home/code/cloned/tmp_sweep/to_ignore
. The git root doesn't match the start of the folder path so it ends up going all the way out to root (../../../../../
) to get to your folder. Any idea why they don't match? I don't use Linux much at all but there's no symlink or anything like that is there?
Hey @mpariente , did you get to try out the pre-release version? Or find out what the issue was yourself & save me the effort 😄
Hey @jellyedwards , sorry no, I didn't take the time to do it yet, but it's on my todo-list for ever now. I edited the exclude file manually since then, so it's a dirty fix but it works for now. Sorry for not taking the time.
No worries, if you do get around to having a look let me know.
The new functionality introduced in #10 is really great, I love it saves me tons of time, thanks a lot !
Would it be possible to implement an option that when we right-click on a folder or file in Explorer view, we could "GitSweep : Sweep file/folder under the rug"?
I would just add the file or folder to the .git/info/exclude file, and remove the need for the user to even open this file to exclude folders. This would be especially necessary for folders, because there is no way to exclude them in the Source Control view.