diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-07-07 09:57:55 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-07-07 09:57:55 +0200 |
| commit | 4d2455edac06dc4cb0ed98c074a97dd67b4f3275 (patch) | |
| tree | 1bb65a889bee5db81320f99aa8e2491f21b15033 | |
| parent | b531e46456bca2cc604c1987a881f756acbb285d (diff) | |
Use ls-remote to find revision rather than cloning.
| -rwxr-xr-x | cdist | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1356,12 +1356,7 @@ def main(): target.command('bash') elif args.command == 'revision': - - target = SourceTarget() - tree = globals.trees.get(args.project, args.checkout, target) - with TreeDirectory(tree): - print(command_and_read('git rev-parse HEAD')[0].strip()[:7]) - target.cleanup() + print(command_and_read('git ls-remote %s/%s.git %s' % (config.get('git_prefix'), args.project, args.checkout))[0].strip()[:7]) elif args.command == 'checkout': |
