Skip to content

Commit

Permalink
Reset state variables when selecting a commit with no reference
Browse files Browse the repository at this point in the history
  • Loading branch information
koutcher committed Mar 23, 2024
1 parent e62abd9 commit 3c2cdb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Bug fixes:
- Fix tig blame --reverse. (#1300)
- Fix status view lockup.
- Fix untracked changes and chunk staging behaviour in plain stage view.
- Reset state variables when selecting a commit with no reference.

tig-2.5.8
---------
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ main_select(struct view *view, struct line *line)
}
if (ref)
ref_update_env(view->env, ref, true);
else
view->env->tag[0] = view->env->remote[0] = view->env->branch[0] = view->env->refname[0] = 0;
}
string_copy_rev(view->env->commit, commit->id);
}
Expand Down

0 comments on commit 3c2cdb4

Please sign in to comment.