Revert "[infra] Make worktrees work (again?)"
This reverts commit a531b78369.
Reason for revert: Doesn't work on Windows.
Original change's description:
> [infra] Make worktrees work (again?)
>
> History:
>
> * Back in (pre June) 2018 worktrees in git just worked.
> * https://dart-review.googlesource.com/c/sdk/+/48091 made it not work.
> * https://github.com/dart-lang/sdk/issues/33619 was filed.
> * https://dart-review.googlesource.com/c/sdk/+/127485 was created to
> work around the problem.
>
> I don't know when it happened, but I can't make the above workaround
> work (at least not anymore) --- adding a `default_git_folder` to my
> `args.gn` has no effect.
>
> This CL builds on it and automatically sets the correct path based on
> a call to `git rev-parse --resolve-git-dir .git` which gives the
> correct dir for both worktrees and non-worktrees.
>
> Change-Id: I4dcf0445a44348621752fb88d4dab4c99c6ddd1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190522
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Jens Johansen <jensj@google.com>
TBR=whesse@google.com,rmacnak@google.com,jensj@google.com,sigmund@google.com
Change-Id: I7681a7b48abdd6e5901f1e445015adc9bf51ef77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191361
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
a531b78369
commit
7e2cc73da8
+1
-4
@@ -18,10 +18,7 @@ declare_args() {
|
||||
#
|
||||
# to out/ReleaseX64/args.gn. The path above can be extracted from the `.git`
|
||||
# file under the git worktree folder.
|
||||
# The script run here should take care of everything automatically though.
|
||||
default_git_folder = exec_script("$_dart_root/tools/get_dot_git_folder.py",
|
||||
[ rebase_path("$_dart_root/.git") ],
|
||||
"trim string")
|
||||
default_git_folder = "$_dart_root/.git"
|
||||
|
||||
# Whether to enable the SDK hash check that will prevent loading a kernel
|
||||
# into a VM which was built with a different SDK.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/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())
|
||||
Reference in New Issue
Block a user