From: Philip Oakley <philipoakley@iee.email>
To: Carlos <kaploceh@gmail.com>, git@vger.kernel.org
Subject: Re: not robust inconsistent git 2.40.1 with HEAD -> master, origin/main, origin/HEAD, origin/master, main
Date: Wed, 31 May 2023 14:22:59 +0100 [thread overview]
Message-ID: <30385b42-0c6a-3588-2b13-0552c23727f2@iee.email> (raw)
In-Reply-To: <319cfa79-a508-127f-c201-9f50d5e6fe6a@iee.email>
On 31/05/2023 11:57, Philip Oakley wrote:
> On 30/05/2023 19:14, Carlos wrote:
>> Running git 2.40.1 with HEAD -> master, origin/main, origin/HEAD, origin/master, main with initial commit on main does not show all the objects from master
>>
>>
>> ! [main] Initial commit
>> * [master] Initial commit
>> ! [origin/master] Initial commit
>> ---
>> +*+ [main] Initial commit
>>
>
> this is the output of `git show-branch` [1] which has its own special
> display format. It's not often used these days.
>
> The `!` are column markers, as is `*` for the current branch.
> You have three branches listed
> Then you have the `---` divider
>
> Finally you has the single commit, showing which branches the commit is
> 'on'.
>
> Be careful to discriminate between being 'on' a branch (at it's tip, by
> name); 'at' an oid (object id / hash); and `in` a branch (below its
> tip); etc.
>
>
> [1] https://git-scm.com/docs/git-show-branch
>
>> the chunk of objects are on master and not main, and yet it shows
>> nothing once checking out to master.
>>
>> the git-clone operation is not consistent either. It's a disaster.
>>
>> One would think that by now with the more developed work put on to git, it'd
>> be safe to assume the more sense there's on newer versions. But no. This
>> is the opposite actually.
>>
>> Now. If by any chance the git-branch operation were to return:
>>
>> main
>> * master
>>
>> after git-clone, then objects are indeed in place. That is. On master
>>
>> but not if git-branch returns
>>
>> main
>> * master
>> origin/master
>>
You may have accidentally created a local branch called `origin/master`
which you are now confusing with the (unlisted) remote tracking branches.
What does
git branch -ra
produce?
It will show the local branches first, and then your
`remotes/repo/branches` list (probably colourised).
This should help confirm what you have.
>>
>>
> Philip
P.
next prev parent reply other threads:[~2023-05-31 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 18:14 not robust inconsistent git 2.40.1 with HEAD -> master, origin/main, origin/HEAD, origin/master, main Carlos
2023-05-31 10:08 ` Kristoffer Haugsbakk
2023-05-31 10:57 ` Philip Oakley
2023-05-31 13:22 ` Philip Oakley [this message]
2023-05-31 21:35 ` Carlos
2023-05-31 22:36 ` Carlos
-- strict thread matches above, loose matches on Subject: below --
2023-05-30 17:58 Carlos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30385b42-0c6a-3588-2b13-0552c23727f2@iee.email \
--to=philipoakley@iee.email \
--cc=git@vger.kernel.org \
--cc=kaploceh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).