Implement Git by Yourself (2: Data provider)

1 Init

if (this.fileSystem.Directory.Exists(this.GitDir)){    this.fileSystem.Directory.Delete(this.GitDir, true);}this.fileSystem.Directory.CreateDirectory(this.GitDir);this.fileSystem.Directory.CreateDirectory(Path.Join(this.GitDir, "objects"));

2 Object

byte[] GetObject(string oid, string expected="blob");
string HashObject(byte[] data, string type="blob");

3 Ref

How does ugit know which branch it belongs to?

4 Index

--

--

--

A software developer in Microsoft at Suzhou. Most articles spoken language is Chinese. I will try with English when I’m ready

Love podcasts or audiobooks? Learn on the go with our new app.

Multiple Benefits of AWS Consulting

4 Reasons To Choose Python

Scaling an engineering organisation: It’s no easy feat

Sharp Notes to SQL Users Migrating to DynamoDB

AWS vs. Google Cloud: Face-Off Between The Best

Launch your project on CrossPad

Desktop support for Flutter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Feng Gao

Feng Gao

A software developer in Microsoft at Suzhou. Most articles spoken language is Chinese. I will try with English when I’m ready

More from Medium

How to do Unit Testing using XUnit and Moq in C#

Force merge in Git

Learn Full Stack Development Hacks Ever

Customize the version number for .NET 6 Web API applications in Azure DevOps Pipelines