mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:16:51 +00:00
23 lines
646 B
Python
23 lines
646 B
Python
|
#!/usr/bin/env python
|
||
|
# Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
||
|
# for details. All rights reserved. Use of this source code is governed by a
|
||
|
# BSD-style license that can be found in the LICENSE file.
|
||
|
#
|
||
|
# This python script is a wrapper around `git rev-parse --resolve-git-dir`.
|
||
|
# This is used for the build system to work with git worktrees.
|
||
|
|
||
|
import sys
|
||
|
import subprocess
|
||
|
|
||
|
|
||
|
def main():
|
||
|
if len(sys.argv) != 2:
|
||
|
raise Exception('Expects exactly 1 argument.')
|
||
|
|
||
|
return subprocess.call(
|
||
|
['git', 'rev-parse', '--resolve-git-dir', sys.argv[1]])
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
sys.exit(main())
|