actually respect the correct setting

This commit is contained in:
Scott Chacon 2023-07-20 10:12:57 +02:00 committed by GitButler
parent 37e1e42ca2
commit c77a5dae44
3 changed files with 15 additions and 4 deletions

View File

@ -641,7 +641,7 @@ impl Repository {
pub fn git_signatures(&self) -> Result<(git2::Signature<'_>, git2::Signature<'_>)> {
let user = self.users_store.get().context("failed to get user")?;
let committer = git2::Signature::now("GitButler", "gitbutler@gitbutler.com")?;
let mut committer = git2::Signature::now("GitButler", "gitbutler@gitbutler.com")?;
let mut author = match user {
None => committer.clone(),
@ -660,6 +660,11 @@ impl Repository {
author = git2::Signature::now(&name?, &email?)?;
}
let no_commiter_mark = config.get_string("gitbutler.utmostDiscretion");
dbg!(&no_commiter_mark);
if no_commiter_mark.is_ok() && no_commiter_mark? == "1" {
committer = author.clone();
}
Ok((author, committer))
}

View File

@ -1834,6 +1834,12 @@ pub fn update_gitbutler_integration(
message.push_str(" - ");
message.push_str(branch.name.as_str());
message.push('\n');
if branch.head != target.sha {
message.push_str(" branch head: ");
message.push_str(&branch.head.to_string());
message.push('\n');
}
for file in &branch.ownership.files {
message.push_str(" - ");
message.push_str(&file.file_path.display().to_string());

View File

@ -86,14 +86,14 @@
annotateCommits = value;
git_set_config({
key: 'gitbutler.utmostDiscretion',
value: value ? '1' : '0'
value: value ? '0' : '1'
});
};
$: annotateCommits = false;
$: annotateCommits = true;
git_get_config({ key: 'gitbutler.utmostDiscretion' }).then((value) => {
annotateCommits = value === '1';
annotateCommits = value ? value === '0' : true;
});
const onDeleteClicked = () =>