totten / git-scan

CLI tool for scanning/updating git repos
33 stars 7 forks source link

Add tag the output #12

Closed beathorst closed 7 years ago

beathorst commented 7 years ago

This adds the git tag to the output if there is no branch checkedout

totten commented 7 years ago

Thanks, @beathorst !

Two things:

  1. There's a relevant test, testClonedTag(), which is based on the old behavior. Could you update it accordingly? (To execute, just download+run phpunit. PHPUnit 3/4/5 should work.) This helps validate the behavior in few different version of git/php.
  2. For an output convention, how attached are you to Tags: 1.2.34? Using tags/1.2.3.4 would feel more consistent IMHO -- all the outputs under "Local Branch" would valid git expressions that you can copy to git checkout (etal).
totten commented 7 years ago

Looks good. Tests pass in PHP 5.3 and PHP 7 using with git 1.7 and git 2.6. Merged.