-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
idea: difference reporting when running tldr --update
#332
Comments
Do you directly modify the Edit: Oh, I see. It's pages that have been modified (i.e. updated in the cache), rather than ones that you have modified. 🤦🏻 I wonder if it'd be worth having this only when a flag is applied, e.g. |
I was thinking the same thing. 👍🏻 |
This exactly! In its default form, it shouldn't report more than 3 lines containing the number of added, deleted, and updated pages. However, it is quite unlikely that this will ever get implemented. Not being backed by git is sort of tldr's original sin. It currently updates the cache by simply overwriting stuff and in order to show the suggested output, you would need to calculate diff on-the-fly on the user's machine. That would, in turn, drastically slow down the whole update process which is already unbearably slow due to index building. |
Actually, I discovered something that made be not sure that we could even use Git. See here. cc @waldyrious—is this correct? |
@bl-ue I'm not advocating switching to git, that ship has sailed away a long time ago. That was just an observation. OTOH specification defines a contract. And there was no technical dealbreaker, back then, nor now, that prevented creating one based on git workflow. It is simply a choice, one made long ago together with all pros and cons originating from it. |
@bl-ue I don't recall a decision (or a technical restriction) that determines git to be inadequate for clients' cache. The client spec was fleshed out in issue tldr-pages/tldr#1065 and PR tldr-pages/tldr#2706, and @sbrl might be the right person to ask, as he drafted the initial spec. That said, I'd point out some comments from tldr-pages/tldr#1065, such as this one by me:
...and this one by @MasterOdin:
I didn't follow the discussion in tldr-pages/tldr#2706, so there may have been relevant comments there as well. There's also some discussion on using git in tldr-pages/tldr#527, such as this comment by @sitaramc:
...and this one from @igorshubovych:
There's a tangentially related issue, tldr-pages/tldr#343, which suggest switching from
Interestingly, that comment refers to the extensive discussion from issue #9 in this very repo, which covered the topic of relying on git for the cache. Turns out it wasn't implemented, though? In any case, I'd recommend reading the threads above to give these quoted comments proper context; perhaps the authors of the comments will have relevant input here as well. it would definitely be nice to reach (or resurface) a clear decision on this topic. |
By the way, while re-reading tldr-pages/tldr#1065, I found this comment I wrote back in 2016, suggesting exactly what this issue is proposing! 😄
I actually really like Homebrew's default behavior of listing all added, updated and deleted formulas when doing |
While doing an update, the old cache directory could be (temporarily) copied and then the output of |
If there is a |
I can't imagine someone having a use for tldr on a machine that doesn't have diff..! |
As a tldr maintainer (and user), I would like to be able to see the differences between my old state my new state of the pages when I update the pages via
tldr --update
. Currently, when I runtldr --update
, it always shows the same output, regardless of whether or not any pages were created/updates.I'm thinking something like this (pretty sketchy at the moment):
I'll work on this if we decide upon it.
The text was updated successfully, but these errors were encountered: