Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
GitButler Integration Commit
Browse files Browse the repository at this point in the history
This is an integration commit for the virtual branches that GitButler is tracking.

Due to GitButler managing multiple virtual branches, you cannot switch back and
forth between git branches and virtual branches easily. 

If you switch to another branch, GitButler will need to be reinitialized.
If you commit on this branch, GitButler will throw it away.

Here are the branches that are currently applied:
 - main (refs/gitbutler/main)
   branch head: ed2230b
   - src/main.rs
   - Cargo.lock
   - .env

Your previous branch was: refs/heads/main

The sha for that commit was: fe6a2f6

For more information about what we're doing here, check out our docs:
https://docs.gitbutler.com/features/virtual-branches/integration-branch
  • Loading branch information
gitbutler-client committed Mar 1, 2024
1 parent fe6a2f6 commit bf9c6d4
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,16 @@ async fn main() -> Result<(), anyhow::Error> {

/// Handle a gateway [`Event`].
async fn handle(event: Event) {
let skip = match &event {
Event::ChannelUpdate(c) => BOT
.cache
.channel(c.id)
.is_some_and(|cached| cached.permission_overwrites == c.permission_overwrites),
Event::RoleUpdate(r) => BOT
.cache
.role(r.role.id)
.is_some_and(|cached| cached.permissions == r.role.permissions),
_ => false,
};
let skip = matches!(&event, Event::ChannelUpdate(c)
if BOT
.cache
.channel(c.id)
.is_some_and(|cached| cached.permission_overwrites == c.permission_overwrites))
|| matches!(&event, Event::RoleUpdate(r)
if BOT
.cache
.role(r.role.id)
.is_some_and(|cached| cached.permissions == r.role.permissions));

BOT.cache.update(&event);

Expand Down

0 comments on commit bf9c6d4

Please sign in to comment.