Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 208930 - Git plugin unable to diff working tree to HEAD of remote repository
Git plugin unable to diff working tree to HEAD of remote repository
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Git
7.1
PC Windows XP
: P3 with 7 votes (vote)
: 8.1
Assigned To: Ondrej Vrabec
issues@versioncontrol
:
Depends on: 207165 245076
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-28 04:12 UTC by tmswhite
Modified: 2014-10-18 05:11 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
GitHub sync tool (206.28 KB, image/png)
2013-03-30 17:31 UTC, desmond_kirrane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tmswhite 2012-02-28 04:12:32 UTC
In SVN client, it is possible to diff the current working copy of source against the HEAD of the SVN tree prior to doing an update (e.g. as a sanity check before doing something potentially destructive).

In git parlance, you would do:
(1) git fetch
(2) git diff source

Although Netbeans will do a fetch, there is no way to do a consolidated diff against the fetched HEAD revision.  Thus, there is no way to preview the changes that will occur if you do a pull.

This can result in major conflicts in local repository when doing a pull without knowing what will happen.

Furthermore, NetBeans does not list which files changed as a result of a pull, so there is no easy way to review the history of those files to identify potential issues.
Comment 1 Ondrej Vrabec 2012-02-28 09:04:18 UTC
> Although Netbeans will do a fetch, there is no way to do a consolidated diff
> against the fetched HEAD revision.  Thus, there is no way to preview the
> changes that will occur if you do a pull.
Right, there is no way to diff against anything other than the current HEAD. We're planning to make the possibility to diff against any revision.

> This can result in major conflicts in local repository when doing a pull
without knowing what will happen.
Right, after that you'll be notified about the conflicts.

> Furthermore, NetBeans does not list which files changed as a result of a pull,
so there is no easy way to review the history of those files to identify
potential issues.
Use Git -> Show History for that. Plus in Git -> Show Changes you can see all the files that need to be committed after the merge.

*** This bug has been marked as a duplicate of bug 207165 ***
Comment 2 Ondrej Vrabec 2012-02-28 09:27:29 UTC
I decided to keep this as a separate issue. We could make the pull more complex and display incoming changes (something like a dry run):
1) fetch remote branch into a temporary remote
2) diff HEAD against the temporary branch
3) delete the temporary branch
4) continue with pulling.
For that we still need to address #207165.
Comment 3 desmond_kirrane 2013-03-30 17:31:14 UTC
Created attachment 133230 [details]
GitHub sync tool
Comment 4 desmond_kirrane 2013-03-30 17:32:02 UTC
Take a look at the GitHub tool (screen shot attached).
It shows:

- all local changes with checkboxes and a 'Commit' button for the changes.

- and all local commits with an 'Undo' and a 'Sync' button for  the commits
Comment 5 Ondrej Vrabec 2014-07-16 12:42:17 UTC
Now it is already possible to show incoming commits: Git -> Remote -> Show Incoming. In the next release I'll add an option to Git -> Diff -> Diff To... to diff against a remote repository head.
Comment 6 Ondrej Vrabec 2014-10-17 11:47:01 UTC
fixed: core-main #26bc2c8a89a3
Comment 7 Quality Engineering 2014-10-18 05:11:43 UTC
Integrated into 'main-silver', will be available in build *201410180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/26bc2c8a89a3
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #208930 - Git plugin unable to diff working tree to HEAD of remote repository


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo