TriBITSPub / TriBITS

TriBITS: Tribal Build, Integrate, and Test System,
http://tribits.org
Other
36 stars 46 forks source link

gitdist: dist-repo-status: Display tag or SHA1 instead of 'HEAD' #587

Closed bartlettroscoe closed 1 year ago

bartlettroscoe commented 1 year ago

The output is much more useful when in a detached head state.

Produces something like:

$ gitdist-status 
----------------------------------------------------------------------------------------------------
| ID | Repo Dir                         | Branch                    | Tracking Branch  | C | M | ? |
|----|----------------------------------|---------------------------|------------------|---|---|---|
|  0 | Trilinos (Base)                  | 11976-package_source-fix2 |                  |   |   |   |
|  1 | packages/framework/GenConfig     | 924a08a                   |                  |   |   |   |
|  2 | packages/framework/son-ini-files | master                    | glex-tril/master |   |   |   |
|  3 | packages/framework/srn-ini-files | master                    | origin/master    |   |   |   |
|  4 | TriBITS                          | gitdist-head-tag-and-sha1 |                  |   | 1 |   |
|  5 | kokkos                           | 4.1.00                    |                  |   |   |   |
|  6 | kokkos-kernels                   | 4.1.00                    |                  |   |   |   |
----------------------------------------------------------------------------------------------------

instead of:

$ gitdist-status 
--------------------------------------------------------------------------------------------------------------------
| ID | Repo Dir                         | Branch                    | Tracking Branch                  | C | M | ? |
|----|----------------------------------|---------------------------|----------------------------------|---|---|---|
|  0 | Trilinos (Base)                  | 11976-package_source-fix2 |                                  |   |   |   |
|  1 | packages/framework/GenConfig     | HEAD                      |                                  |   |   |   |
|  2 | packages/framework/son-ini-files | master                    | glex-tril/master                 |   |   |   |
|  3 | packages/framework/srn-ini-files | master                    | origin/master                    |   |   |   |
|  4 | TriBITS                          | gitdist-head-tag-and-sha1 | github/gitdist-head-tag-and-sha1 |   |   |   |
|  5 | kokkos                           | HEAD                      |                                  |   |   |   |
|  6 | kokkos-kernels                   | HEAD                      |                                  |   |   |   |
--------------------------------------------------------------------------------------------------------------------