-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Feature: Git Integration #12020
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
Merged
yaira2
merged 23 commits into
files-community:main
from
ferrariofilippo:Git_Integration
Apr 19, 2023
Merged
Feature: Git Integration #12020
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fd6e10a
Initial Push
ferrariofilippo 270d745
Add branch dialog and small optimization
ferrariofilippo cb2dc94
Third party notice
ferrariofilippo 7ed3209
Merge branch 'main' into Git_Integration
ferrariofilippo 88a6a6a
Branch name validation
ferrariofilippo c3ce768
Bug Fix
ferrariofilippo da29329
Revert Phase 2 Changes
ferrariofilippo cbe62f8
Leftovers
ferrariofilippo 54c384c
Merge branch 'main' into Git_Integration
ferrariofilippo 211d7d8
Use built-in methods
ferrariofilippo 05c4174
Update branch name if any item changed
ferrariofilippo f8783e0
Using
ferrariofilippo cecbcad
Merge branch 'main' into Git_Integration
ferrariofilippo 7e47c42
Auto update branch name
ferrariofilippo 972e9e4
Merge branch 'Git_Integration' of https://github.com/ferrariofilippo/…
ferrariofilippo f676ae9
Merge branch 'main' into Git_Integration
ferrariofilippo ee1faf5
Reset watcher task
ferrariofilippo bfb887b
New line
ferrariofilippo 7d3f9e7
Merge branch 'main' into Git_Integration
ferrariofilippo 1a8301d
Merge branch 'main' into Git_Integration
ferrariofilippo 7f8d804
Merge branch 'main' into Git_Integration
ferrariofilippo 5c5ff08
Merge branch 'main' into Git_Integration
yaira2 fc7477e
Removed button
yaira2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,4 +223,4 @@ public static DynamicDialog GetFor_CredentialEntryDialog(string path) | |
return dialog; | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using LibGit2Sharp; | ||
using System; | ||
using Files.App.Filesystem.StorageItems; | ||
|
||
namespace Files.App.Helpers | ||
{ | ||
public static class GitHelpers | ||
{ | ||
public static string? GetGitRepositoryPath(string? path, string root) | ||
{ | ||
if (root.EndsWith('\\')) | ||
root = root.Substring(0, root.Length - 1); | ||
|
||
if ( | ||
string.IsNullOrWhiteSpace(path) || | ||
path.Equals(root, StringComparison.OrdinalIgnoreCase) || | ||
path.Equals("Home", StringComparison.OrdinalIgnoreCase) || | ||
ShellStorageFolder.IsShellPath(path) | ||
) | ||
return null; | ||
|
||
return Repository.IsValid(path) | ||
? path | ||
: GetGitRepositoryPath(PathNormalization.GetParentDir(path), root); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.