Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Egit is based on JGit, and "<code>not-for-merge</code>" is only used in <a href="https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java" rel="nofollow"><code>org.eclipse.jgit.transport.FetchHeadRecord</code></a></p> <p>That <code>notForMerge</code> variable of the FetchHeadRecord is set in the <a href="https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java#L418-L436" rel="nofollow"><code>org.eclipse.jgit.transport.FetchProcess#want</code></a> method.</p> <pre><code> fhr.notForMerge = spec.getDestination() != null; </code></pre> <p>If the the refspec destination isn't null, then this fetched HEAD isn't for merge.</p> <p>When you fetching a remote, the destination of a remote branches is <code>refs/remotes/yourRemote</code>, because of the local config for fetch refspec:</p> <pre><code>[remote "origin"] fetch +refs/heads/*:refs/remotes/origin/* </code></pre> <p>The one branch that would be fetched without a direct destination would be one which is tracking a remote branch:</p> <pre><code>[branch "master"] remote = origin merge = refs/heads/master </code></pre> <p>That is why, after a fetch of JGit repo (in command line, not in Eclipse Egit), I see:</p> <pre><code>C:\Users\VonC\prog\git\jgit\.git&gt;type FETCH_HEAD c2a9f9e742f7e6633af130823c154a485e6071b2 branch 'master' of https://github.com/eclipse/jgit 51d1af9489924ff03fa10ec963110c608c2882a3 not-for-merge branch 'stable-0.10' of https://github.com/eclipse/jgit 989149736ad1cd09c15e143aa598028b9f9b6502 not-for-merge branch 'stable-0.11' of https://github.com/eclipse/jgit b2b58feba7400269df8b31ef8495b695af3a9793 not-for-merge branch 'stable-0.12' of https://github.com/eclipse/jgit </code></pre> <p>Let's try to reproduce that in Egit/JGit (Luna, Egit 3.0, Win7 64-bits):</p> <p>After several fetch, I never see an entry <em>without</em> a <code>not-for-merge</code> though.<br> Even a pull which would merge new comits from a remote branch would still generate a <code>FETCH_HEAD</code> with:</p> <pre><code>220c4502ecea147ef4beaae8039b168965e148e9 not-for-merge branch 'master' of ..\..\jgit </code></pre> <p>I guess the behavior of JGit differs on that aspect.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload