Improve git commit hash lookup (#5225)

- Also get the branch name.
- Use rev-parse instead of describe to get a clean hash.
- Return the git hash and branch name in server_info for admin
  connections.
- Include git hash and branch name on separate lines in --version.
This commit is contained in:
Ed Hennis
2025-02-05 11:36:43 -05:00
committed by GitHub
parent 33e1c42599
commit f6d63082c0
5 changed files with 55 additions and 6 deletions

View File

@@ -167,6 +167,7 @@ JSS(blobs_v2); // out: ValidatorList
JSS(books); // in: Subscribe, Unsubscribe
JSS(both); // in: Subscribe, Unsubscribe
JSS(both_sides); // in: Subscribe, Unsubscribe
JSS(branch); // out: server_info
JSS(broadcast); // out: SubmitTransaction
JSS(bridge_account); // in: LedgerEntry
JSS(build_path); // in: TransactionSign
@@ -290,6 +291,7 @@ JSS(frozen_balances); // out: GatewayBalances
JSS(full); // in: LedgerClearer, handlers/Ledger
JSS(full_reply); // out: PathFind
JSS(fullbelow_size); // out: GetCounts
JSS(git); // out: server_info
JSS(good); // out: RPCVersion
JSS(hash); // out: NetworkOPs, InboundLedger,
// LedgerToJson, STTx; field