-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo project as a submodule #2624
Changes from all commits
9663687
b365b39
13518c0
b5eb47c
2225780
59c04c7
58e540a
2b5d84b
27f6cdf
4a7d62e
f1de444
334fc7a
2d9a1c3
f8b4fbf
32c95e1
248ef4f
3da9c27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "demo"] | ||
path = demo | ||
url = https://github.com/iterative/vscode-dvc-demo | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import { GitExecutor } from './executor' | |
import { createProcess } from '../../processExecution' | ||
import { CliResult, CliStarted } from '..' | ||
import { getMockedProcess } from '../../test/util/jest' | ||
import { standardizePath } from '../../fileSystem/path' | ||
|
||
jest.mock('vscode') | ||
jest.mock('@hediet/std/disposable') | ||
|
@@ -38,9 +39,10 @@ describe('GitExecutor', () => { | |
} as unknown as EventEmitter<CliStarted> | ||
}) | ||
|
||
const cwd = standardizePath(__dirname) as string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [F] Followed up and split this function |
||
|
||
describe('pushBranch', () => { | ||
it('should call createProcess with the correct parameters to push a branch', async () => { | ||
const cwd = __dirname | ||
const branchName = 'my-branch' | ||
mockedCreateProcess.mockReturnValueOnce( | ||
getMockedProcess( | ||
|
@@ -57,7 +59,6 @@ describe('GitExecutor', () => { | |
}) | ||
|
||
it('should call createProcess with the correct parameters to push the current branch', async () => { | ||
const cwd = __dirname | ||
mockedCreateProcess.mockReturnValueOnce( | ||
getMockedProcess('Everything up-to-date') | ||
) | ||
|
@@ -73,7 +74,6 @@ describe('GitExecutor', () => { | |
|
||
describe('stageAndCommit', () => { | ||
it('should call createProcess with the correct parameters to stage all files and then commit', async () => { | ||
const cwd = __dirname | ||
const message = 'best experiment' | ||
mockedCreateProcess.mockReturnValueOnce(getMockedProcess(cwd)) | ||
mockedCreateProcess | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Command, Flag } from './constants' | ||
import { getOptions } from './options' | ||
import { Cli } from '..' | ||
import { standardizePath } from '../../fileSystem/path' | ||
|
||
export class GitCli extends Cli { | ||
public getGitRepositoryRoot(cwd: string) { | ||
public async getGitRepositoryRoot(cwd: string) { | ||
const options = getOptions(cwd, Command.REV_PARSE, Flag.SHOW_TOPLEVEL) | ||
|
||
return this.executeProcess(options) | ||
return standardizePath(await this.executeProcess(options)) as string | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sroy3 this might cause some issues with your current setup. Definitely did for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to move the already created folder with git mv and then change the .git file and move the module under the root .git