From eff32df28abe05c5f25515faf587bf98e3791978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 30 Aug 2020 18:15:35 +0200 Subject: [PATCH] Add spacing in test Co-authored-by: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com> --- tests/functional/test_vcs_git.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/test_vcs_git.py b/tests/functional/test_vcs_git.py index 8dd0ffcd9..8b07ae667 100644 --- a/tests/functional/test_vcs_git.py +++ b/tests/functional/test_vcs_git.py @@ -258,22 +258,27 @@ def test_resolve_commit_not_on_branch(script, tmp_path): clone_path = repo_path / "clone" repo_path.mkdir() script.run("git", "init", cwd=str(repo_path)) + repo_file.write_text(u".") script.run("git", "add", "file.txt", cwd=str(repo_path)) script.run("git", "commit", "-m", "initial commit", cwd=str(repo_path)) script.run("git", "checkout", "-b", "abranch", cwd=str(repo_path)) + # create a commit repo_file.write_text(u"..") script.run("git", "commit", "-a", "-m", "commit 1", cwd=str(repo_path)) commit = script.run( "git", "rev-parse", "HEAD", cwd=str(repo_path) ).stdout.strip() + # make sure our commit is not on a branch script.run("git", "checkout", "master", cwd=str(repo_path)) script.run("git", "branch", "-D", "abranch", cwd=str(repo_path)) + # create a ref that points to our commit (repo_path / ".git" / "refs" / "myrefs").mkdir(parents=True) (repo_path / ".git" / "refs" / "myrefs" / "myref").write_text(commit) + # check we can fetch our commit rev_options = Git.make_rev_options(commit) Git().fetch_new(str(clone_path), repo_path.as_uri(), rev_options)