-
Notifications
You must be signed in to change notification settings - Fork 4
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
git version relies on local binary #43
Comments
This approach to get the version is actually flawed 😅. I realized this as soon I merged #41 into master but the issue with this is , the git approach works when pman is run inside the pman repo and not outside it. Also it relies on the end user having a copy of the pman source code that's up to date with remote. I looked into an alternate approach that uses build flags while building the pman binary like so
but have not gone ahead with that for now. I have pushed a temporary fix in #42 for now that removes this approach and uses hard coded versioning. |
Oh I thought your code was about using git in each project to get metadata. |
About getting a nice version into cobra, you could use this |
It was not , but it could be . . . maybe ? 😂 did you have any ideas about something that you would like to see in pman. I am planning on adding a github style heatmap and a per-project todo list of sorts sometime later. |
It's what I thought about when I started using pman, I expected to see the number of starsh, uncommitted files, local commit, local branches. Currently it's a bit manual. I also thought about features such as fork-cleaner, but in a local way. Like OK, I have nothing left with this project (and I have ways to know it's true) so I can safely delete a project. https://github.com/caarlos0/fork-cleaner I'm testing tons of projects locally. Interesting things could also be about checking metadata such a project creation, last modified, last action in git (because it could differ if you switched branch), to sort project by activity |
I tried this , and it's really convenient too but it increased the binary size from 15M to 21M. I feel just to print the version info this is too bulky. |
Thanks for the ideas! , I had not considered this but I'll be working to add more git based features and more stats and info about individual projects in the future. regarding the local fork-cleaner feature. how would that work. I would prompt the user to delete certain project dirs if the repo hasn't seen any activity in x days ? |
Indeed, I didn't expect such a consequence in term of size. BTW, I would like to recommend this tool if you are interested in following your binary size |
I'm unsure. I would say it could be interesting to say something like no pending changes, no stash, no local branch. I would say it's more something about the context. Anyway, I'm also a bit afraid this kind of features would bring the tool in reinventing the wheel while other project exists to manage multi repositories. I don't have names here, I have never find them easy and safe to use. For advanced usages on a project, I would use git-machete. |
Yeah , I don't want to implement a full-fledged git client, we already have tools like git-machete and lazygit for that. I think I'll stick to showing basic stats first like
|
I agree with you. It's better to let the tool grow at your pace, and consider adding features as the people request for them via feature request |
pman/pkg/utils/utils.go
Line 134 in db003d5
I would recommend using
https://github.com/go-git/go-git
The text was updated successfully, but these errors were encountered: