You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, cool tool! I was looking to build something similar, but:
for cleaning up checked out repositories on my laptop
in a way that uses less "mental work" for the user of the tool. I don't want to have to manually review every single repository and read the text, because sometime the text is "benign" (like my fork has stars), and sometimes it is of vital importance (like my fork has unmerged commits)
Therefore, I think I would like to expand upon this tool. But before I start contributing PR's, i want to see if these ideas make sense.
Concretely, here's what I think:
visual indicator (via color or emoji) whether a fork is safe to delete (while keeping what you have: selecting the fork shows more details)
the rules whether a fork is safe to delete, would be as follows:
a) for forks on github:
no commits that are not pushed upstream (in any branch)
b) for forks on disk: the above, plus:
working copy is not "dirty" (i tend to create todo files, notes, or code files that is often not comitted)
index is empty
"git stash" is empty
to keep things simple, the app would probably either scan GH forks, or on disk forks, not both at once.
if you forked a repo on GH, and then cloned that code to your disk, it's possible the local fork only has a remote for the GH fork, and not for the upstream. so to keep things simple, you would probably clean up your on-disk forks first, before cleaning GH forks.
which file paths to scan on disk: i see two options:
provide a parent path, and process all git repos inside it, but some code repositories have other "sub git repositories" as part of their build process, or vendored code, so keeping the behavior proper, seems a bit tricky
rely on shell expansion to provide an explicit list of all git repos to process, like $GOPATH/src/github.com/*/*, this would avoid that problem, although it might result in "argument list too long"
The text was updated successfully, but these errors were encountered:
Hello, cool tool! I was looking to build something similar, but:
Therefore, I think I would like to expand upon this tool. But before I start contributing PR's, i want to see if these ideas make sense.
Concretely, here's what I think:
visual indicator (via color or emoji) whether a fork is safe to delete (while keeping what you have: selecting the fork shows more details)
the rules whether a fork is safe to delete, would be as follows:
a) for forks on github:
b) for forks on disk: the above, plus:
to keep things simple, the app would probably either scan GH forks, or on disk forks, not both at once.
if you forked a repo on GH, and then cloned that code to your disk, it's possible the local fork only has a remote for the GH fork, and not for the upstream. so to keep things simple, you would probably clean up your on-disk forks first, before cleaning GH forks.
which file paths to scan on disk: i see two options:
$GOPATH/src/github.com/*/*
, this would avoid that problem, although it might result in "argument list too long"The text was updated successfully, but these errors were encountered: