4 ms·
> But technically its true. Is it though? Consider a bank telling a store I am buying things at "This person has has €450 in their bank account", when at that
by Y-bar 3y ago
> But technically its true.
Is it though?
Consider a bank telling a store I am buying things at "This person has has €450 in their bank account", when at that moment I have €310. The store would be rightfully pissed at the bank for effectively lying when it is made clear later on that the transaction could not be completed and the bank answers "well, the person had €450 a few days prior to you asking us".
Without an explicit temporal information it is explicitly now.
Without an explicit status on sync status it is implicitly saying sync is up-to-date.
It's a lie of omission.
- fernandotakai 3y ago>It's a lie of omission. but it's not? if you have an old bank receipt that says you have $450 in your account, but you actually have $310, you need to "get" a new receipt that has the newest value. you do that by issuing git fetch origin. then you can git merge origin/master to make everything up-to-date.
- Y-bar 3y agoBank receipts always have a date and time, that's _exactly_ the point I am making, the omission is part of the lie.
- fernandotakai 3y agoyou are getting confused here. what you have is a "paper receipt" (your checked out version) from your bank. something that, if you need an up-to-date version (from another remote), you need to request a new one (by issuing git fetch). git is, by default, distributed, so whenever you need to see the world outside, you need to be explicit. linus made it this way because back in the day (not sure right now tbf) tons of kernel developers do work without any internet connection, and would only connect to pull/send patches. this talk[0] by linus from 2007 (i remember watching it on google videos lol) explains really well where the git mentality came from. i really recommend it to you, since it feels like you are not really getting how git works. [0]https://www.youtube.com/watch?v=4XpnKHJAok8 https://www.youtube.com/watch?v=4XpnKHJAok8
- SAI_Peregrinus 3y agoIf you have a paper recipt (git status) it tells you when it was up to date, so you can determine whether you need a new one. Git doesn't provide that info. That's the problem, not that it can be outdated, but that it omits the date/time!
- metabagel 3y agoIt’s a little offensive to tell another person that they are confused. If they are confused, they can say so.
- ksenzee 3y agoVery good point. “Up to date with origin/master as of 4 hours ago” would be an improvement.
- pests 3y agoThat is a lie though. Who knows if the remote has been updated? You wouldn't find out about that 4 hours until you did a fetch. You can't go to the hotel desk clerk and ask if you have any messages. Then for the next four hours keep telling people "the front desk has no messages for me" despite you not asking them in the last 4 hours. Things could change!
- ksenzee 3y agoNo, this is exactly like a receipt from the ATM. “Your bank balance is $300.00 as of 10/10/23 10:10.” That was weeks ago, so I know to ignore it. The wording can likely be improved. Maybe “You are up to date with origin/master as last fetched 4 hours ago”.
- pests 3y ago> That was weeks ago, so I know to ignore it. But you haven't talked to your bank, used an ATM, or been on the app in weeks! Your balance could be totally different - bills have came out, you got paid, interest, etc. You are making my point! You know to ignore it because its old, outdated information. Then why are you telling me this? How is it useful to me? Of course youre up to date with what you last fetched - that is _always_ the case. Why mention being up to date even? Just tell the user when they last synced with their remote(s).
- SAI_Peregrinus 3y agoYou're making their point! `git status`tells you the status as of whenever you last fetched, and omits that timestamp. You can't tell if it's outdated, because it doesn't tell you when the last update was!
- 3y ago
- globular-toast 3y agoGit is a distributed system by design. A problem it has is there is now a generation of developers who don't know why we don't use centralised VC any more.
- Y-bar 3y agoYes. Which is why temporal data and status is so important and makes things worse when left out.
- yCombLinks 3y agoEveryone uses git as a centralized vcs. You could remove the distributed part and 99% of people wouldn't notice. The killer feature was branches, which are orthogonal
- globular-toast 3y agoCase in point. I take it you don't remember (or don't know) that truly centralised systems like Subversion required a network connection just to make a commit? The commit happened in the repository. There was no local clone. You could check stuff out. That was it.
- yCombLinks 3y agoYeah, I've used subversion a bit. The DAG aspect and commits do not require a distributed system. I'm talking about the idea that git users would pull commits directly from other users and "build consensus" across the network, rather than push and pull from a central repo
- steveBK123 3y agoYes. I've never had a job in 20 years across 7 companies where I could code and not be on the corporate network. I am on a person device, remoting into a corporate network desktop, from which I am then ssh'ing into a linux box. Walking around with code on a local machine is practically a fireable offense. For the vast majority of companies signing up for Github/Gitlab/whatever licenses, the remote/decentralized part of git is pointless. So the decentralized aspects of git just add a layer of complexity/indirection for a lot of use cases. Many extra "git pull"s in my workday.
- capableweb 3y ago> Is it though? Yes, yes it is. origin/master is not saying that the remote has/hasn't changed. It's comparing your local copy of origin/master, not giving you the status about if remote has/hasn't changed. You need to explicitly ask if remote/origin/master has changed or not if you want to know. Which in your analogy would be like if the store forgot to actually ask the bank if the customer had the money or not, and instead relying on whatever information they have "cached" in the store. Instead, the store has to first ask the bank (remote) if there is any changes. I do agree that it could be worded better to actually help the user understand, as it seems to be a common misconception. Sidenote: I'd be driven to absolute insanity if `git status` started doing remote requests to check the remote origin/master status each time I invoked it.
- metabagel 3y ago> You need to explicitly ask if remote/origin/master has changed or not if you want to know. Git hurts my brain.
- capableweb 3y agoSeriously, what is the alternative? For `git status` to make a request to each of your remotes every time you run it?
- Izkata 3y ago> Consider a bank telling a store I am buying things at "This person has has €450 in their bank account", when at that moment I have €310. That's pretty close to how holds / unresolved transactions work.