psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

remove `--rename` from `onyo set` #650

Closed aqw closed 2 months ago

aqw commented 2 months ago

I'm not 100% sold on this, but I might be coming around to Ben's argument from long ago. (Paraphrasing):

What is the difference between a commit (or set) that changes key values, versus a commit that changes key values that result in a rename.

And now that I am using Onyo in reality... I can't say that I feel a difference.

I wanted to make consistent some variances in capitalization:

❱ onyo get --keys make -s make | uniq
 ─────────────── 
  make           
 ─────────────── 
  apple
  ctouch
  dasgip
  dell
  Dell
  delta
  eizo
  Eizo
...

So I filtered for it and piped into onyo set.

❱ onyo get -H --match make=Eizo --keys path | xargs -d "\n" onyo --yes set --keys make=eizo --rename --asset

Taking a look at the onyo set flags:

All of the flags seems necessary and obvious except for --rename. It's guarding against... a mistake? Signaling to the user that the field they're setting is "more important" than other fields. Which doesn't hold, as useless information can be used for fields in the file name.

In short, I think we should remove --rename. I'm interested in your thoughts.

aqw commented 2 months ago

A conversation on Matrix resulted in a consensus that --rename should be retired.

Points made: