-
Notifications
You must be signed in to change notification settings - Fork 1
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
Topic commit deletion #25
base: main
Are you sure you want to change the base?
Conversation
0e00935
to
e302d7d
Compare
eb1d993
to
948af8a
Compare
e302d7d
to
442ab17
Compare
ToDo: visually display an element to drag to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is still a misunderstanding:
Based on the screenshoot if I would confirm, I would delete all commits and keep only the latest? This was not my intention.
I wanted to be able to delete any arbitrary single commit. Although it might be nice to delete commit ranges, I'd say this is out of scope for this PR.
Also there are a few warnings when build as release. A better approach instead of ignoring all warnings would be to convert all of them to errors (e.g. via -Werror
) and then make exceptions for specific warnings like the deprecated one.
Also clang tidy finds a lot of things that do not get classified as errors since |
The problem with removing arbitrary single commits is that, by default, all commits preceding the deleted one do not belong to a branch anymore (as the recursive "parent-traverse" can't find those now orphaned commits anymore). I guess what you would be looking for is something like a |
I also looked into this and you are right, ostree is not designed to drop arbitrary commits.
With that and the move commit between branches I'm able to do everything I need. |
An other question: ostree --repo=/path/to/repo reset <branch> <previous-commit-hash>
# Make sure we clean up unused refs
ostree --repo=/path/to/repo prune --refs-only |
This is already implemented. If you delete the latest commit, only that one will be deleted. Delete any other commit and all preceding will be dropped, too. This is also visually indicated in the deletion-window, when deleting the latest (or not latest) commit. That's what I didn't tell you before to see, if the current implementation is intuitive or not. I guess they could be separate delete-options as well, but I thought I might keep it simple & with less buttons and options, when combining both into one deletion feature. |
It always also prunes the deleted commit (and in the case that it is not the latest commit: all preceding commits as well). |
Ah, perfect! Then the best we can do now is make sure the tool tip reflects this (I did not check if it already does). |
It doesn't yet, as tool-tips kinda went out the window when I eliminated the commit-promotion tab on the right. I may re-add them to the new promotion- and deletion-windows. Although I might push that to another issue / PR. |
Description
This is a follow-up PR of #21. It implements the possibility to delete commits from branches.
Features
d
for deletionWork to do
cpplibostree
inPromotionMode
to generally support different view modes (default, promotion, deletion)