From 817ca7f6679f632fee07cf6912211db0631fb534 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Wed, 25 Oct 2023 18:00:47 +0900 Subject: [PATCH] templater: use "git" constant to build HEAD@git ref name --- cli/src/commit_templater.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/commit_templater.rs b/cli/src/commit_templater.rs index ec8069e67..1d4009d23 100644 --- a/cli/src/commit_templater.rs +++ b/cli/src/commit_templater.rs @@ -24,7 +24,7 @@ use jj_lib::hex_util::to_reverse_hex; use jj_lib::id_prefix::IdPrefixContext; use jj_lib::op_store::{RefTarget, WorkspaceId}; use jj_lib::repo::Repo; -use jj_lib::rewrite; +use jj_lib::{git, rewrite}; use once_cell::unsync::OnceCell; use crate::formatter::Formatter; @@ -515,7 +515,7 @@ fn extract_git_head(repo: &dyn Repo, commit: &Commit) -> Vec { if target.added_ids().contains(commit.id()) { let ref_name = RefName { name: "HEAD".to_owned(), - remote: Some("git".to_owned()), + remote: Some(git::REMOTE_NAME_FOR_LOCAL_GIT_REPO.to_owned()), conflict: target.has_conflict(), synced: false, // has no local counterpart };