Skip to content

Add command for tagging commit #187

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

Merged

Conversation

cruessler
Copy link
Collaborator

@cruessler cruessler commented Jul 8, 2020

Opened as a draft for getting early feedback.

Open questions:

  • Do you want to validate the tag before calling repo.tag or do you want
    to rely on git refusing invalid tags?
  • Should the dialog have just a single line?

Will close #103.

@extrawurst
Copy link
Collaborator

extrawurst commented Jul 9, 2020

@cruessler thanks for tackling this.

Do you want to validate the tag before calling repo.tag or do you want
to rely on git refusing invalid tags?

I would rely on git refusing an invalid tag. we have a reusable error message box for that already.

Should the dialog have just a single line?

Not exactly sure what you mean? I would expect the same dialog we already use for the stash-name.

edit: you can run - the currently failing - clippy checks locally by simply using make check (combining fmt check and clippy)

@cruessler
Copy link
Collaborator Author

@extrawurst Thanks for the feedback! I have incorporated it and am now able to locally tag commits. The revlog does not update, though, after a commit is tagged and I have found no way to change that. InternalEvent::Update(NeedsUpdate::ALL) is pushed to the queue after the commit is tagged. Am I missing something?

@extrawurst
Copy link
Collaborator

extrawurst commented Jul 9, 2020

@cruessler I could help you more when you would push those changes you made :)

edit: just checked, new tags were never picked up in the revlog, has nothing todo with your PR: #190

@extrawurst
Copy link
Collaborator

@cruessler as of #195 new tags will be refetched every 2s.

when you add a tag you can also force a refetch (because we know a new one is gonna be there) in Revlog:

self.git_tags.request(Duration::from_secs(0), true)?;

@cruessler cruessler force-pushed the add-dialog-for-tagging-commits branch from e52ff1c to 3bd9c51 Compare July 15, 2020 14:55
@cruessler
Copy link
Collaborator Author

cruessler commented Jul 15, 2020

@extrawurst I updated the branch with your feedback. I did not need to explicitly ask the Revlog to re-load the tags, they showed up immediately.

@cruessler cruessler marked this pull request as ready for review July 15, 2020 19:17
@extrawurst extrawurst merged commit 70423c5 into gitui-org:master Jul 15, 2020
@extrawurst
Copy link
Collaborator

@cruessler nice work! thank you! ❤️

@cruessler cruessler deleted the add-dialog-for-tagging-commits branch May 13, 2021 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tag commit
2 participants