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

Support "native" Git #4478

Open
anthonyvdotbe opened this issue Aug 8, 2022 · 9 comments
Open

Support "native" Git #4478

anthonyvdotbe opened this issue Aug 8, 2022 · 9 comments
Labels
Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! git [ci] enable versioning job kind:feature A feature request

Comments

@anthonyvdotbe
Copy link
Contributor

Description

Native git should be supported because:

  • JGit inevitably lags behind native git, e.g. support for "gitattributes" [1] took over 7(!) years, and there's still no support for "git worktree" [2] and "includeIf" [3][4]
  • JGit's lack of support for certain features leads to unreliable/surprising behavior and possible data loss, e.g. [5]
  • NetBeans lags behind JGit, because it needs to upgrade the bundled JGit (currently it bundles 5.7.0, while JGit is at 6.2.0)

Previous issues:

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=342372
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=477475
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=543171
[4] https://issues.apache.org/jira/browse/NETBEANS-4264
[5] https://bugs.eclipse.org/bugs/show_bug.cgi?id=477745

Use case/motivation

Reliable git support

Related issues

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

@anthonyvdotbe anthonyvdotbe added kind:feature A feature request needs:triage Requires attention from one of the committers labels Aug 8, 2022
@Chris2011
Copy link
Contributor

I'm not deep enough into the features of JGit, but updating to a newer JGit will not fix most of your mentioned questions?

@anthonyvdotbe
Copy link
Contributor Author

I'm not deep enough into the features of JGit, but updating to a newer JGit will not fix most of your mentioned questions?

Apart from the first one, all JGit issues I mentioned are still unresolved, including the one that may result in data loss.

@neilcsmith-net
Copy link
Member

Updating to the latest JGit would also require a decision to make Git modules Java 11+. This might not be a problem.

I can see merit of also supporting CLI Git, but I'm not sure how abstracted the Git API in NetBeans is. Generally, if I want to do anything vaguely complicated I use the terminal (inside or outside NetBeans) anyway.

@neilcsmith-net neilcsmith-net added Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! and removed needs:triage Requires attention from one of the committers labels Aug 9, 2022
@anthonyvdotbe
Copy link
Contributor Author

Generally, if I want to do anything vaguely complicated I use the terminal (inside or outside NetBeans) anyway.

JGit is unable to interpret my git configuration correctly, so even basic things don't work as they should. (And NetBeans' terminal support on Windows leaves a lot to be desired.)

@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

What is meant by "support native GIT"? Or maybe more specifically what is the "acceptance criteria" to determine if this is been implemented as needed?

Assume this means either
(1) Don't do it through JGit since JGit is delayed in adding functionality (i.e. and no one is working to update JGIT to support needed functionality available in "native git")?

(2) Have some "CLI interface" within NB to make native git calls. Is basic Tools...Open Terminal not an option here?

@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

Generally, if I want to do anything vaguely complicated I use the terminal (inside or outside NetBeans) anyway.

JGit is unable to interpret my git configuration correctly, so even basic things don't work as they should. (And NetBeans' terminal support on Windows leaves a lot to be desired.)

From within Netbeans, does right clicking on project, and select Git...Repository... or "Team...Repository" and select either (1) Open Configuration or (2) Open Global Configuration provide some of what is needed here?

@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

(And NetBeans' terminal support on Windows leaves a lot to be desired.)

What is meant here? From toying around, it seems to allow git functionality to work. Is there a specific issue or "use case" where it's not acceptable?

@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

So is upgrade to JGIT 6.2.0 one of the suggestions?

@anthonyvdotbe
Copy link
Contributor Author

What is meant by "support native GIT"? Or maybe more specifically what is the "acceptance criteria" to determine if this is been implemented as needed?

Assume this means either (1) Don't do it through JGit since JGit is delayed in adding functionality (i.e. and no one is working to update JGIT to support needed functionality available in "native git")?

(2) Have some "CLI interface" within NB to make native git calls. Is basic Tools...Open Terminal not an option here?

This means (1).

Generally, if I want to do anything vaguely complicated I use the terminal (inside or outside NetBeans) anyway.

JGit is unable to interpret my git configuration correctly, so even basic things don't work as they should. (And NetBeans' terminal support on Windows leaves a lot to be desired.)

From within Netbeans, does right clicking on project, and select Git...Repository... or "Team...Repository" and select either (1) Open Configuration or (2) Open Global Configuration provide some of what is needed here?

No, the issue is that my .gitconfig file contains includeIf sections.

(And NetBeans' terminal support on Windows leaves a lot to be desired.)

What is meant here? From toying around, it seems to allow git functionality to work. Is there a specific issue or "use case" where it's not acceptable?

See #3959 and compare this to the terminal in VS Code or IntelliJ IDEA.

So is upgrade to JGIT 6.2.0 one of the suggestions?

No, see my earlier reply:

I'm not deep enough into the features of JGit, but updating to a newer JGit will not fix most of your mentioned questions?

Apart from the first one, all JGit issues I mentioned are still unresolved, including the one that may result in data loss.

@mbien mbien added the git [ci] enable versioning job label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! git [ci] enable versioning job kind:feature A feature request
Projects
None yet
Development

No branches or pull requests

5 participants