Giter Club home page Giter Club logo

ue4-git-controller's Introduction

What is this?

This is an Unreal Engine 4 Plugin that you can operator Git Repository. Support C++ and Blueprint.

How do use?

Wrapper Interface:

UCLASS()
class GITSOURCECONTROLEX_API UFlibSourceControlHelper : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintCallable, BlueprintPure, Category = "GitSourceControlEx|Flib")
		static FString GetGitBinary();

	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool RunGitCommandWithFiles(const FString& InCommand, const FString& InPathToGitBinary, const FString& InRepositoryRoot, const TArray<FString>& InParameters, const TArray<FString>& InFiles, TArray<FString>& OutResults, TArray<FString>& OutErrorMessages);
	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool RunGitCommand(const FString& InCommand, const FString& InPathToGitBinary, const FString& InRepositoryRoot, const TArray<FString>& InParameters, TArray<FString>& OutResults, TArray<FString>& OutErrorMessages);

	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool DiffVersion(const FString& InGitBinaey, const FString& InRepoRoot, const FString& InBeginCommitHash, const FString& InEndCommitHash, TArray<FString>& OutResault, TArray<FString>& OutErrorMessages);
	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool GitLog(const FString& InGitBinaey, const FString& InRepoRoot, TArray<FGitCommitInfo>& OutCommitInfo);

	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool GetBranchName(const FString& InPathToGitBinary, const FString& InRepositoryRoot, FString& OutBranchName);
	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool GetRemoteUrl(const FString& InPathToGitBinary, const FString& InRepositoryRoot, FString& OutRemoteUrl);


	/**
	 * Run a Git "log" command and parse it.
	 *
	 * @param	InPathToGitBinary	The path to the Git binary
	 * @param	InRepositoryRoot	The Git repository from where to run the command - usually the Game directory
	 * @param	InFile				The file to be operated on
	 * @param	bMergeConflict		In case of a merge conflict, we also need to get the tip of the "remote branch" (MERGE_HEAD) before the log of the "current branch" (HEAD)
	 * @param	OutErrorMessages	Any errors (from StdErr) as an array per-line
	 * @param	OutHistory			The history of the file
	 * @param   InHistoryDepth		return history depth default is MAX_Int32
	 */
	UFUNCTION(BlueprintCallable,Category="GitSourceControlEx|Flib")
		static bool RunGetHistory(const FString& InPathToGitBinary, const FString& InRepositoryRoot, const FString& InFile, bool bMergeConflict, TArray<FString>& OutErrorMessages, TArray<FGitSourceControlRevisionData>& OutHistory,int32 InHistoryDepth);

	UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
		static bool GetFileLastCommit(const FString& InPathToGitBinary, const FString& InRepositoryRoot, const FString& InFile, bool bMergeConflict, TArray<FString>& OutErrorMessages, FGitSourceControlRevisionData& OutHistory);

};

ue4-git-controller's People

Contributors

hxhb avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.