mirror of
https://seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE.git
synced 2026-11-29 14:30:32 +08:00
feat: turn of advice about detached head
Previously, every run log would contain:
Note: switching to 'HEAD^'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2d0d98e feat: add branch or patch information to run log
This should now be gone.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
@@ -176,6 +176,7 @@ impl Run {
|
||||
}
|
||||
|
||||
fn git_checkout(&mut self, commit: Oid, src: &Path) -> Result<(), RunError> {
|
||||
self.runcmd(&["git", "config", "advice.detachedHead", "false"], src)?;
|
||||
self.runcmd(&["git", "checkout", &commit.to_string()], src)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user