mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
git: import refs after pushing to git remote
This makes it so `jj git push` effectively runs `jj git refresh` after pushing. That's useful so the user sees the updated remote-tracking branch.
This commit is contained in:
parent
19b542b318
commit
f4a6732d35
1 changed files with 3 additions and 0 deletions
|
@ -2080,6 +2080,9 @@ fn cmd_git_push(
|
|||
let branch_name = cmd_matches.value_of("branch").unwrap();
|
||||
git::push_commit(&git_repo, &commit, remote_name, branch_name)
|
||||
.map_err(|err| CommandError::UserError(err.to_string()))?;
|
||||
let mut tx = repo.start_transaction("import git refs");
|
||||
git::import_refs(&mut tx, &git_repo).map_err(|err| CommandError::UserError(err.to_string()))?;
|
||||
tx.commit();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue