<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:41:07 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LUDOC-212] git pull alternates between origin/HEAD and origin/master</title>
                <link>https://jira.whamcloud.com/browse/LUDOC-212</link>
                <project id="10070" key="LUDOC">Lustre Documentation</project>
                    <description>&lt;p&gt;In my local copy of the Lustre manual git repository, &apos;git pull&apos; alternates between pulling origin/HEAD and origin/master, and causes merge conflicts.&lt;/p&gt;

&lt;p&gt;Here is the output and the steps to reproduce the problem:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;haasken@lnx-haasken whamcloud $ git clone git://git.whamcloud.com/doc/manual lustre-manual
Cloning into &apos;lustre-manual&apos;...
remote: Counting objects: 1387, done.
remote: Compressing objects: 100% (603/603), done.
remote: Total 1387 (delta 990), reused 1156 (delta 781)
Receiving objects: 100% (1387/1387), 1.30 MiB | 593 KiB/s, done.
Resolving deltas: 100% (990/990), done.
haasken@lnx-haasken whamcloud $ cd lustre-manual/
haasken@lnx-haasken lustre-manual $ git status
# On branch master
nothing to commit, working directory clean
haasken@lnx-haasken lustre-manual $ git pull
From git://git.whamcloud.com/doc/manual
 + e405045...5b5e7eb HEAD       -&amp;gt; origin/HEAD  (forced update)
Already up-to-date.
haasken@lnx-haasken lustre-manual $ git status
# On branch master
# Your branch and &apos;origin/master&apos; have diverged,
# and have 69 and 1 different commit each, respectively.
#
nothing to commit, working directory clean
haasken@lnx-haasken lustre-manual $ git pull
From git://git.whamcloud.com/doc/manual
 + 5b5e7eb...e405045 master     -&amp;gt; origin/master  (forced update)
Already up-to-date.
haasken@lnx-haasken lustre-manual $ git status
# On branch master
nothing to commit, working directory clean
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The git pull will continue alternating between origin/master and origin/HEAD.  Note the &quot;69 and 1 different commit each&quot; message reported by git status.  This looks similar to the issue reported in this stack overflow question: &lt;a href=&quot;http://stackoverflow.com/questions/7900471/git-pull-alternates-between-two-different-origin-master-branches&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/7900471/git-pull-alternates-between-two-different-origin-master-branches&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please look into what is causing this and fix it.  This is interfering with my work.  I am not sure whether origin/master or origin/HEAD is correct.&lt;/p&gt;</description>
                <environment>Running git version 1.8.0 on SLED 11 SP2.</environment>
        <key id="22361">LUDOC-212</key>
            <summary>git pull alternates between origin/HEAD and origin/master</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="rhenwood">Richard Henwood</assignee>
                                    <reporter username="haasken">Ryan Haasken</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Dec 2013 23:56:48 +0000</created>
                <updated>Thu, 6 Feb 2014 20:40:35 +0000</updated>
                            <resolved>Thu, 6 Feb 2014 20:25:09 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="73476" author="rhenwood" created="Fri, 13 Dec 2013 15:12:28 +0000"  >&lt;p&gt;I can&apos;t reproduce your issue - but the discussion on the link you&apos;ve included indicates something isn&apos;t right with the repo. I will investigate.&lt;/p&gt;</comment>
                            <comment id="73477" author="rhenwood" created="Fri, 13 Dec 2013 15:21:39 +0000"  >&lt;p&gt;I do not have sufficient privileges to delete the remove HEAD branch so I&apos;ve requested assistance.&lt;/p&gt;</comment>
                            <comment id="73478" author="haasken" created="Fri, 13 Dec 2013 15:22:43 +0000"  >&lt;p&gt;It&apos;s strange that you can&apos;t reproduce the issue.  Am I cloning the correct git repo?&lt;/p&gt;

&lt;p&gt;Here are the versions of git with which I have seen the problem:&lt;/p&gt;

&lt;p&gt;git version 1.7.10.4 on SLES 11 SP2&lt;br/&gt;
git version 1.8.0 on SLES 11 SP2&lt;/p&gt;

&lt;p&gt;I don&apos;t think that should matter, but I&apos;m providing the info just in case.&lt;/p&gt;</comment>
                            <comment id="73479" author="haasken" created="Fri, 13 Dec 2013 15:25:27 +0000"  >&lt;p&gt;Thanks, Richard.  Are you sure that would be the correct solution?  I just want to be sure we don&apos;t lose commits because of that &quot;69 and 1 different commit each, respectively&quot; message.&lt;/p&gt;</comment>
                            <comment id="73529" author="morrone" created="Sat, 14 Dec 2013 00:05:01 +0000"  >&lt;p&gt;I believe that Richard&apos;s solution is the correct one.&lt;/p&gt;

&lt;p&gt;&quot;HEAD&quot; is a special reference that, generally speaking, really only makes sense in a local repository.  It is a symbolic reference that always points to the last commit that was checked out.  It is &lt;em&gt;not&lt;/em&gt; the name of a branch, though it may point to a branch name.&lt;/p&gt;

&lt;p&gt;Since the server&apos;s repository should usually be &quot;bare&quot; (meaning there is not checked out code) there should not really be a HEAD.  But sometimes HEAD on the server is used to point to the default branch that should be checked out on a clone operation (that is right, &quot;master&quot; does not necessarily need to be the default branch.  You could have a repository without a master branch altogether.)&lt;/p&gt;

&lt;p&gt;If you do ls-remote on the server there are two &quot;HEAD&quot; references:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ git ls-remote origin |grep HEAD
59d5a7081e4e2fbf90cf9eaefc3fa2854f1391f1	HEAD
5b5e7eb8786cbbe31809177129acf027d2a6bd5b	refs/heads/HEAD
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The latter is the one that is causing problems and needs removal.&lt;/p&gt;

&lt;p&gt;So don&apos;t worry about losing commits.  refs/heads/HEAD was just a mistake from back on March 19th.&lt;/p&gt;</comment>
                            <comment id="75514" author="haasken" created="Thu, 23 Jan 2014 18:19:03 +0000"  >&lt;p&gt;Per Christopher&apos;s analysis, it seems like this should be an easy fix if somebody has the proper permissions.  Richard, what happened with your request for assistance?&lt;/p&gt;</comment>
                            <comment id="75869" author="rhenwood" created="Wed, 29 Jan 2014 17:36:02 +0000"  >&lt;p&gt;I&apos;m asking the admin team if there is any update on this work.&lt;/p&gt;</comment>
                            <comment id="76389" author="rhenwood" created="Thu, 6 Feb 2014 20:25:09 +0000"  >&lt;p&gt;I&apos;m pleased to report this issue was fixed recently by one of the team.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ git ls-remote origin | grep HEAD
5ab432e3aa43fa289eaa747db0cec6969797202f	HEAD
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="76391" author="haasken" created="Thu, 6 Feb 2014 20:40:35 +0000"  >&lt;p&gt;That&apos;s great!  As expected, I don&apos;t see the alternating git pull anymore, thanks!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwatb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11927</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>