TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

Include git version in yadm --version #377

Closed xeruf closed 2 years ago

xeruf commented 2 years ago

Is your feature request related to a problem? Please describe.

For bug reports and stuff, you gotta list both versions, so why not make it more convenient.

Describe the solution you'd like

❯ yadm --version
yadm 3.1.1 using git 2.33.0
lucacavallaro commented 2 years ago

It is trivial to implement this by enhancing the yadm version command, but this type of feature can easily be implemented as a hook as well.

In this specific case you can add a file called post_version in the .config/yadm/hooks folder containing a simple script like:

#!/bin/sh
git --version

So that, once the script has been made executable (chmod +x post_version), the yadm version command returns

➜  ~ yadm version
yadm 3.1.1
git version 2.30.1 (Apple Git-130)
xeruf commented 2 years ago

Sure, but it would be good to have it as default to ease the process of issue reporting

TheLocehiliosan commented 2 years ago

This has been updated in the develop branch, and will be included in the next release.