!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

889 Members
179 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@mewp:nurupo.plmewpI'll be in front of a computer in a minute, and I'll elaborate07:10:53
@b:chreekat.netchreekat
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
@b:chreekat.netchreekat(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:petrichor.meJez (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:matrix.orgelonsroadster
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:matrix.orgelonsroadsterseems like probably the best solution07:13:47
@mewp:nurupo.plmewpAll right, so.07:14:09
@elonsroadster:matrix.orgelonsroadsterits 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 me07:14:20
@mewp:nurupo.plmewpIf you have a commited file in gitignore, your local changes won't be tracked07:14:22
@mewp:nurupo.plmewpand so, you don't have to stash anything07:14:30
@mewp:nurupo.plmewpand 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:nurupo.plmewpI am not 100% sure that this will work, as I have not tested that, but I see no reason why it would not07:15:41
@elonsroadster:matrix.orgelonsroadsteryou mean the working tree07:15:42
@elonsroadster:matrix.orgelonsroadsternot the checkout, but yes07:15:47
@mewp:nurupo.plmewpyes07:15:48
@elonsroadster:matrix.orgelonsroadstermaybe im misremembering, but I thought that gitignore only had the effect of making files not report as untracked07:16:07
@elonsroadster:matrix.orgelonsroadsterif a file is part of the repository already I thought the gitignore does not end up mattering07:16:23
@elonsroadster:matrix.orgelonsroadsterbut I could be wrong about that07:16:29
@b:chreekat.netchreekatThat's what I thought, too, but I'm pecking at my phone right now and can't verify07:16:52
@mewp:nurupo.plmewpmaybe I'm wrong, let's see07:17:27
@b:chreekat.netchreekat Anyway +1 to the problem being discussed. :) 07:17:54
@b:chreekat.netchreekatI agree a solution would be nice07:18:03
@elonsroadster:matrix.orgelonsroadster Thanks bryan I'm glad someone else feels my pain 07:18:11
@mewp:nurupo.plmewpall right, yes, it appears I was wrong07:18:52
@mewp:nurupo.plmewpweird, I thought I remembered using that07:19:09
@b:chreekat.netchreekat +1 to that problem, too 07:20:11
@mewp:nurupo.plmewp stackoverflow says that git update-index --assume-unchanged <filename> should do that 07:20:43
@mewp:nurupo.plmewpsource: https://stackoverflow.com/questions/23673174/how-to-ignore-new-changes-to-a-tracked-file-with-git07:21:18
@b:chreekat.netchreekatI think I remember darcs has a way of keeping track of local commits that never go upstream, and since I learned darcs before git, I've always missed that feature07:21:35
@mewp:nurupo.plmewpthen again, git faq says not to do that: https://git-scm.com/docs/gitfaq#ignore-tracked-files07:22:07

Show newer messages


Back to Room ListRoom Version: 6