This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Git merge support should allow to specify fast-forward behavior | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | terje7601 |
Component: | Git | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | apireviews, git |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
API change
ui part |
Description
terje7601
2014-06-25 13:53:47 UTC
i believe the default in NetBeans is not "-ff" but whatever is stated in .git/config. So it always defaults to "merge.ff". When do you expect NetBeans asks for this? Would it be enough to have this option in the Merge dialog? Please review the API change. Needed to overload GitClient.merge method to accept a new enum (FastForwardOption) specifiying either fast-forward, fast-forward-only or no-fast-forward merge. The enum was added to GitRepository final class and its default value for the repo and current branch can be got from GitRepository.getFastForwardOption method. Created attachment 147782 [details]
API change
Created attachment 147783 [details]
ui part
(In reply to Ondrej Vrabec from comment #1) > i believe the default in NetBeans is not "-ff" but whatever is stated in > .git/config. So it always defaults to "merge.ff". I just tested this & it didn't work for me. So if NetBeans is supposed to honor the merge.ff setting, this seems to be a bug. To reproduce (nothing special about it): 1) create a Java application 2) do a git commit 3) create a new branch "next" & check "checkout new branch" 4) change something & create a new commit 5) switch back to the master branch 6) set merge.ff to false in the .git/config file At this point, doing a merge in NetBeans just does a fast forward. Doing the same merge from the command-line does create the extra merge commit (git version 1.8.3.msysgit.0) Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2 Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) > When do you expect NetBeans asks for this? Would it be enough to have this > option in the Merge dialog? Yes, if Netbeans by default does whatever is stated in .git/config, then an option in the Merge dialog would be enough for me. Please try a dev build, it uses a newer JGit, support for merge.ff was added to JGit around this January: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=48e36d8cb335382b99ec829d0dfe34be71ed49bb and made it only into a dev build of NetBeans (not present in 8.0) (In reply to Ondrej Vrabec from comment #6) > Please try a dev build, it uses a newer JGit, support for merge.ff was added > to JGit around this January: > http://git.eclipse.org/c/jgit/jgit.git/commit/ > ?id=48e36d8cb335382b99ec829d0dfe34be71ed49bb and made it only into a dev > build of NetBeans (not present in 8.0) Ah yes, it works in the dev build, thanks. Integrated into 'main-silver', will be available in build *201407040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9eb37931b8ca User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #245236 - Git merge support should allow to specify fast-forward behavior - add new GitClient.merge method - add new enum FastForwardOption - add new method GitRepository.getFastFrowardOption returning the default value |