Skip to content
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

feat: add dot command to GitUICommands #9140

Merged
merged 1 commit into from May 8, 2021

Conversation

MrJithil
Copy link
Contributor

@MrJithil MrJithil commented May 2, 2021

Fixes #

Proposed changes

  • dot command is widespread in most applications to open the current working directory. I have added a private function to handle the . command in this pull request. For Eg: If a user wants to open their current repository in GitExtensions, he should trigger the command GitExtensions .

Screenshots

DotCommand

Before

A user needs to enter different commands to open his current repository.
GitExtensions browse . is an example.

After

By these changes, a user can open the repository in GitExtensions by just triggering the command GitExtensions .

TODO

Need documentation for this command once this PR got sufficient approvals.

Test methodology

  • I have tested the changes by modifying the project launch setting property.
  • Also, to ensure functionality, I have run the executables from a different git repository.
  • Both negative and positive cases were tested.
  • Since the added function is a private one, we don't need any unit tests.
  • I captured the evidence from my local machine in this pull request.

Test environment(s)

  • GIT
  • Windows

✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned MrJithil May 2, 2021
GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seem ok
The normal way is to use "browse " or "gitex.cmd "

GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
@MrJithil MrJithil force-pushed the feature/dotCommand branch 2 times, most recently from 3f86717 to 3a537fd Compare May 3, 2021 06:17
@MrJithil
Copy link
Contributor Author

MrJithil commented May 3, 2021

@gerhardol I have added the suggested changes. Please review.

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The normal way is to use "browse " or "gitex.cmd "

So if we start to support ".", why not any path?
I don't know the rationale why the usage of browse was forced when the CLI was designed.

GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
@RussKie RussKie added 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity 📜 status: needs cla The author needs to update contributors.txt before reviewing or merging can proceed labels May 4, 2021
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label May 4, 2021
@MrJithil MrJithil force-pushed the feature/dotCommand branch 2 times, most recently from 738dc57 to ff63360 Compare May 4, 2021 19:31
@MrJithil MrJithil requested review from gerhardol and mstv May 4, 2021 19:32
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrJithil, file another PR with your sign off in contributors.txt, please.

GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
@MrJithil
Copy link
Contributor Author

MrJithil commented May 4, 2021

@MrJithil, file another PR with your sign off in contributors.txt, please.

I have created #9148 as my sign-off. Thanks @mstv

@MrJithil
Copy link
Contributor Author

MrJithil commented May 5, 2021

@mstv @gerhardol @RussKie I have implemented the suggestion to take care path along with the . param.

Please see the evidence here. Kindly review, approve and merge if you are okay to proceed. Please feel free to revert back in case of any additional suggestions.

New

Evidence:

Video.mp4

Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

GitUI/CommandsDialogs/FormCommandlineHelp.resx Outdated Show resolved Hide resolved
GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 👍

GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
@MrJithil MrJithil force-pushed the feature/dotCommand branch 2 times, most recently from 49a2fa0 to 04c2901 Compare May 7, 2021 04:52
GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
GitUI/GitUICommands.cs Outdated Show resolved Hide resolved
@RussKie
Copy link
Member

RussKie commented May 8, 2021

Please squash and it is ready to go.

@RussKie RussKie added 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity 🖊️ status: cla signed and removed 📜 status: needs cla The author needs to update contributors.txt before reviewing or merging can proceed labels May 8, 2021
feat: handle path as param

resolved review comment

re factored the code to use `LaunchBrowse` in detached mode.

removed integration tests since we decided to proceed with detached form

added file supports too for path param

replaced args[1] with command
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label May 8, 2021
@MrJithil
Copy link
Contributor Author

MrJithil commented May 8, 2021

Please squash and it is ready to go.

Rebased the branch with master. @RussKie Please proceed.

@RussKie RussKie merged commit 51b6393 into gitextensions:master May 8, 2021
@ghost ghost added this to the 3.6 milestone May 8, 2021
@RussKie
Copy link
Member

RussKie commented May 8, 2021

Thank you

@MrJithil MrJithil deleted the feature/dotCommand branch May 8, 2021 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants