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

Add Git log, globalConfig, and tree diff API #64826

Merged
merged 2 commits into from Jan 28, 2019

Conversation

Projects
None yet
2 participants
@IlyaBiryukov
Copy link

IlyaBiryukov commented Dec 11, 2018

Fix for #62609,
cc @joaomoreno

@joaomoreno joaomoreno added this to the December 2018 milestone Dec 12, 2018

@IlyaBiryukov

This comment has been minimized.

Copy link
Author

IlyaBiryukov commented Dec 14, 2018

The test failures doesn't look to have anything to do with my changes.

@@ -697,6 +700,38 @@ export class Repository {
});
}

async getLog(options?: GitLogOptions): Promise<Commit[]> {

This comment has been minimized.

@joaomoreno

joaomoreno Dec 20, 2018

Member

Let's call this log instead.

I would prefer if there's a default maxEntries option instead of leaving it unbounded.

return [];
}

const entries = gitResult.stdout.split('\x00\x00');

This comment has been minimized.

@joaomoreno

joaomoreno Dec 20, 2018

Member

This will get expensive. We should instead do a while regex exec loop and keep matching commits until we reach the end of gitResult.stdout.

@@ -851,25 +886,41 @@ export class Repository {
return result.stdout;
}

async diffWithHEAD(path: string): Promise<string> {
async diffWithHEAD(path?: string): Promise<string | Change[]> {

This comment has been minimized.

@joaomoreno

joaomoreno Dec 20, 2018

Member

Could we move those cool overloads also here?

 	diffWithHEAD(): Promise<Change[]>;
 	diffWithHEAD(path: string): Promise<string>;
 	diffWithHEAD(path?: string | undefined): Promise<string | Change[]> {
@joaomoreno

This comment has been minimized.

Copy link
Member

joaomoreno commented Jan 7, 2019

@joaomoreno joaomoreno merged commit 04c3dde into Microsoft:master Jan 28, 2019

2 checks passed

VS Code #20190107.52 succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment