powerline-gitstatus icon indicating copy to clipboard operation
powerline-gitstatus copied to clipboard

Git tag abbrev option

Open kmoschcau opened this issue 5 years ago • 0 comments

Hi, recently my most recent git tag output started to include the entire output of git describe with commit distance and current commit hash. I am not sure if this was caused by the update in powerline-gitstatus or a change in git itself.

In any case, I would like to change it, so it only shows the tag name. I would like to make this configurable, because not everyone might want to see it like I do. I would like to create a pull request for this, but I can't decide on how to expose this functionality in the powerline config. There are several ways I could think of:

  • simply create another option
    • pros:
      • backwards compatible
      • easy to implement
    • cons:
      • it is decoupled from the other option and might be confusing, when it does not do anything on it's own
  • add an optional suffix to the option values
    • pros:
      • backwards compatible
    • cons:
      • it's a hack
      • it is not really that clear to the user
  • replace the option with with another, that gets a JSON object with two values
    • pros:
      • the most clear to the user
    • cons:
      • not really backwards compatible, unless we add extra code to handle it

Independent from the way to add the option, I was also pondering whether one would just simply expose the --abbrev option argument to the user as a number, or to just expose a boolean, to pass the flag with 0 or not.

I would be happy for some advice and input, thank you in advance.

kmoschcau avatar Feb 28 '19 12:02 kmoschcau