| 12 Aug 2021 |
mewp | * add an empty file, commit it and add ut to gitignore | 07:08:46 |
elonsroadster | adding it to git ignore if you commit it is not very useful | 07:09:11 |
elonsroadster | and if you commit the file, its not much better than just going in and modifying the flake in place, right? | 07:09:30 |
elonsroadster | I'm just trying to avoid constantly needing to e.g. stash my modifications for my shell | 07:09:48 |
elonsroadster | every time i switch branches | 07:09:52 |
elonsroadster | that is what i was previously doing | 07:09:59 |
elonsroadster | but then that starts to conflict with other peoples changes | 07:10:09 |
elonsroadster | its just not really a tidy solution | 07:10:19 |
mewp | I'll be in front of a computer in a minute, and I'll elaborate | 07:10:53 |
chreekat | In reply to @elonsroadster:matrix.org adding it to git ignore if you commit it is not very useful How is it not useful? | 07:11:05 |
chreekat | (off hand I forget what effect it has to ignore a tracked file. I'd actually expect it to not work, so looking for confirmation there) | 07:12:11 |
Jez (he/him) | Could you use https://github.com/edolstra/flake-compat in a shell.nix and use nix-shell instead of nix develop? | 07:13:18 |
elonsroadster | In reply to @jez:petrichor.me Could you use https://github.com/edolstra/flake-compat in a shell.nix and use nix-shell instead of nix develop? right I suggested that above | 07:13:35 |
elonsroadster | seems like probably the best solution | 07:13:47 |
mewp | All right, so. | 07:14:09 |
elonsroadster | its just such a general problem that I've had with most flakes I encountered that it seems like maybe there should be a nix native solution to me | 07:14:20 |
mewp | If you have a commited file in gitignore, your local changes won't be tracked | 07:14:22 |
mewp | and so, you don't have to stash anything | 07:14:30 |
mewp | and yet, the flake should see your version with local changes, because while it sees only paths that are in the repository, it reads the contents from the checkout (i.e. your local files) | 07:15:16 |
mewp | I am not 100% sure that this will work, as I have not tested that, but I see no reason why it would not | 07:15:41 |
elonsroadster | you mean the working tree | 07:15:42 |
elonsroadster | not the checkout, but yes | 07:15:47 |
mewp | yes | 07:15:48 |
elonsroadster | maybe im misremembering, but I thought that gitignore only had the effect of making files not report as untracked | 07:16:07 |
elonsroadster | if a file is part of the repository already I thought the gitignore does not end up mattering | 07:16:23 |
elonsroadster | but I could be wrong about that | 07:16:29 |
chreekat | That's what I thought, too, but I'm pecking at my phone right now and can't verify | 07:16:52 |
mewp | maybe I'm wrong, let's see | 07:17:27 |
chreekat | Anyway +1 to the problem being discussed. :) | 07:17:54 |
chreekat | I agree a solution would be nice | 07:18:03 |