Skip to content

Git integration inside the IDE (commit only) #4704

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

Closed
wants to merge 2 commits into from
Closed

Git integration inside the IDE (commit only) #4704

wants to merge 2 commits into from

Conversation

baydindima
Copy link

This add opportunity for commit with one-line message. New item "Commit" locate in Edit menu (I do not know how it wisely). I saw this issue arduino/arduino-ide#1880 and decided to implement this.
Please review and comment my solution.

@cmaglie
Copy link
Member

cmaglie commented Mar 24, 2016

@ArduinoBot build this please

@cmaglie cmaglie added feature request A request to make an enhancement (not a bug fix) Component: IDE user interface The Arduino IDE's user interface labels Mar 24, 2016
private String[] getArgsForProcess(String command) {
String[] args = new String[3];
if (OSUtils.isWindows()) {
args[0] = "cmd.exe";
Copy link
Member

Choose a reason for hiding this comment

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

Why not call directly git?

@cmaglie
Copy link
Member

cmaglie commented Mar 25, 2016

Ok, it seems that @ArduinoBot is on holidays, so I've tested the patch manually.

First, some comments about the patch (I've added some other minor notes inline in the commits too)

  • IMHO the "Commit" command should not appear in the menu if the "git" command is not available on the system path. As it is now you get a "file not found" error if you try to use it without git installed, but it's better to prevent the error message and not show the "Commit" command at all to the user if git is not available.
  • In case "git" is available the "Commit" menu should be disabled (grayed out) in all the cases when the commit cannot be performed, for example, if the sketch folder is not a git repository.
  • The patch doesn't handle sketch with multiple files (for example if you create a new tab with Ctrl+Shift+N the new file doesn't get committed, or if you remove a file the deletion is not committed)

Now, besides the notes above, It seems that the usecase is very narrow, becuase the user need anyway an external git client to "git clone" the sketch from a remote repository, or "git initialize" it after saving the sketch for the first time.
Also all the other operations (branching, push/pull, merge, etc..) needs an external client and seems improbable that all this being implemented in the Arduino IDE.
So I'm wondering if this patch is really worth the effort...

@NicoHood
Copy link
Contributor

The bot is on holidays?? O_o

I'd like to test a build when its available. However from what I've heard it might make more sense to just add a command line to the IDE, rather than a "not so useful half complete" git implementation.

Because windows users wont use git (or only the bright and shiny github gui) and linux users just know how to use proper software the normal way.

@baydindima baydindima closed this Apr 14, 2016
@per1234 per1234 added Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature Type: Duplicate Another item already exists for this topic and removed Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature labels Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants