Skip to content

[WIP] Implement an interactive label disambiguation

Max Rossmannek requested to merge diff_renderer into master

As brought up in #99 (closed), the unconditional, automatic label disambiguation actually caused a regression, in the sense that duplicate entries would no longer be detected. To solve this, while still enabling label disambiguation, this MR implements an interactive prompt into the add command which will allow a user to pick the desired action at runtime. This is important, because one may not know a priori how to resolve a conflict (whether to update, skip, or disambiguate). To make the prompt more useful, a git-like diff of the existing and new entry is rendered, to aid the user in his choice.

Tasks:

  • implement diff renderer
  • integrate diff renderer add command
  • use interactive prompt to query user choice:
    • during CLI operation
    • during TUI operation
  • unittest the behavior

CLI changes:

  • add a new CLI argument to let the user specify the intended answer ahead of time
  • use the above to replace the previous --update argument
  • do the same for the previous --skip-existing argument

Closes #99 (closed)

Edited by Max Rossmannek

Merge request reports