Bug 573014 - Destination ref not filled when using Custom URI
Summary: Destination ref not filled when using Custom URI
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-20 11:36 EDT by Patrick Tasse CLA
Modified: 2021-04-21 11:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tasse CLA 2021-04-20 11:36:09 EDT
Compare these two use cases:

A1. Right-click repository in Git Repositories
A2. Select 'Remote' > 'Fetch...'
A3. Select 'Configured remote repository'
A4. Click 'Next'
A5. 'Source ref' and 'Destination ref' are blank
A6. Select 'mybranch [branch]' from 'Source ref' drop-down menu
A7. 'Destination ref' is automatically filled with 'refs/remotes/origin/mybranch'
A8. Click 'Cancel'

B1. Copy a custom URI to clipboard
B2. Right-click repository in Git Repositories
B3. Select 'Remote' > 'Fetch...'
B4. Select 'Custom URI'
B5. Click 'Next'
B6. 'Source ref' and 'Destination ref' are blank
B7. Select 'mybranch [branch]' from 'Source ref' drop-down menu
B8. 'Destination ref' is left blank

I would like 'Destination ref' to be filled with a suggested branch name at step B8 just like it does at step A7.
Comment 1 Thomas Wolf CLA 2021-04-21 08:25:24 EDT
You probably don't want to override accidentally an existing remote tracking ref that "belongs" to a configured remote by something fetched from a custom URI.

I wound tend towards "leave it as it is".
Comment 2 Thomas Wolf CLA 2021-04-21 09:36:26 EDT
s/wound/would/
Comment 3 Patrick Tasse CLA 2021-04-21 10:15:50 EDT
Hi Thomas,

Perhaps you can help me find a good way of working for my use case. We recently started to work on a project that uses GitHub. My use case is for fetching a branch for a commit under review to try it out in Eclipse.

With Gerrit:

A1. From the change web page, take note of the patch number
A2. Right-click repository in Git Repositories
A3. Select 'Fetch from Gerrit...'
A4. Press Ctrl+space in 'Change' text box
A5. Select the patch set from the drop-down list
A6. Click 'Finish'

With GitHub:

B1. From the pull request web page, click the link 'user:mybranch'
B2. Click the 'Code' button
B3. Click the 'Copy to clipboard' button
B4. Right-click repository in Git Repositories
B5. Select 'Remote' > 'Fetch...'
B6. Select 'Custom URI'
B7. Click 'Next'
B8. Select 'mybranch [branch]' from 'Source ref' drop-down menu
B9. Select any unrelated existing branch in 'Destination ref' drop-down menu
B10. Manually edit the 'Destination ref' to remove that existing branch name
B11. Manually type-in 'mybranch' in its place
B12. Click 'Add Spec'
B13. Click 'Finish'

I may be doing it wrong, but I absolutely hate this.
Comment 4 Thomas Wolf CLA 2021-04-21 11:34:45 EDT
Yes, EGit has no Github PR integration.

IIRC the EGit-Github bundles (Mylyn integration) have support for fetching PRs.

Doing some integration directly in EGit similar to "Fetch from Gerrit..." is the topic of bug 544815. I started with that, but it's stalled (didn't get very far yet). Not enough hours in a day...