foriequal0 / git-trim

Automatically trims your branches whose tracking remote refs are merged or stray
MIT License
489 stars 14 forks source link

Provide porcelain output for scripts. #176

Closed siedentop closed 4 years ago

siedentop commented 4 years ago

This provides an option --porcelain=(local|remote|json)

Options:

The first two options print the to-be-deleted branches (either local or remote). This can be piped into further scripts. The second output provides all available information in the form of JSON output. This can then be filtered with gron or jq, or nushell.

#138

siedentop commented 4 years ago

@foriequal0 what do you think of this? I'm not sure if the JSON output is sufficient (and needs one test).

foriequal0 commented 4 years ago

Thank you for the contribution! But I'm really sorry to say that I want to postpone this feature after v1.0, or at least after there is serious request of this with some kind of formal specifications since providing a machine-readible interface is much harder to maintain/break/fix than an interface that requires human intervention. This is a small side project for me who has a full-time job. I want you to understand that I want git-trim as small as I can maintain.

siedentop commented 4 years ago

Thank you for the contribution! But I'm really sorry to say that I want to postpone this feature after v1.0, or at least after there is serious request of this with ...

Fully understood. This wasn’t much work, no harm done :) As there was an open ticket, I thought to give it a try.

... some kind of formal specifications since providing a machine-readible interface is much harder to maintain/break/fix than an interface that requires human intervention.

Yes, that is something I considered. Let me give my thoughts on the specifications (but please do not read this as me trying to argue for merging this):

Again, just my thoughts and not an attempt to merge this.

This is a small side project for me who has a full-time job. I want you to understand that I want git-trim as small as I can maintain.

It’s a nice project! — 🙏

foriequal0 commented 4 years ago

Thank you for understanding me. I didn't mean to be overly defensive. I'm sorry if I made you feel uncomfortable. I should learn English more.

siedentop commented 4 years ago

Thank you for understanding me. I didn't mean to be overly defensive. I'm sorry if I made you feel uncomfortable. I should learn English more.

All good 🙂 you were not overly defensive. You did not make me feel uncomfortable. And your English is very good! I understand everything you say.