Revert "git: Intercept signing prompt from GPG when committing" (#34306)
Reverts zed-industries/zed#34096 This introduced a regression, because the unlocked key can't benefit from caching. Release Notes: - N/A
This commit is contained in:
parent
12bc8907d9
commit
625ce12a3e
9 changed files with 52 additions and 193 deletions
|
@ -1574,15 +1574,10 @@ impl GitPanel {
|
|||
|
||||
let task = if self.has_staged_changes() {
|
||||
// Repository serializes all git operations, so we can just send a commit immediately
|
||||
cx.spawn_in(window, async move |this, cx| {
|
||||
let askpass_delegate = this.update_in(cx, |this, window, cx| {
|
||||
this.askpass_delegate("git commit", window, cx)
|
||||
})?;
|
||||
let commit_task = active_repository.update(cx, |repo, cx| {
|
||||
repo.commit(message.into(), None, options, askpass_delegate, cx)
|
||||
})?;
|
||||
commit_task.await?
|
||||
})
|
||||
let commit_task = active_repository.update(cx, |repo, cx| {
|
||||
repo.commit(message.into(), None, options, cx)
|
||||
});
|
||||
cx.background_spawn(async move { commit_task.await? })
|
||||
} else {
|
||||
let changed_files = self
|
||||
.entries
|
||||
|
@ -1599,13 +1594,10 @@ impl GitPanel {
|
|||
|
||||
let stage_task =
|
||||
active_repository.update(cx, |repo, cx| repo.stage_entries(changed_files, cx));
|
||||
cx.spawn_in(window, async move |this, cx| {
|
||||
cx.spawn(async move |_, cx| {
|
||||
stage_task.await?;
|
||||
let askpass_delegate = this.update_in(cx, |this, window, cx| {
|
||||
this.askpass_delegate("git commit".to_string(), window, cx)
|
||||
})?;
|
||||
let commit_task = active_repository.update(cx, |repo, cx| {
|
||||
repo.commit(message.into(), None, options, askpass_delegate, cx)
|
||||
repo.commit(message.into(), None, options, cx)
|
||||
})?;
|
||||
commit_task.await?
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue