git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: When does git check for branch-X being uptodate with origin/branch-X?

From
Stefan Beller <sbeller@google.com>
Date
Mar 21, 2016, 23:18 UTC
Message-ID
<CAGZ79kYWPjRLHsG=mfA6Z7pjoYLxGtiGCvXCBcdyL5yyikS=1Q@mail.gmail.com>
In-Reply-To
<xmqqlh5bjvvf.fsf@gitster.mtv.corp.google.com>
On Mon, Mar 21, 2016 at 3:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> On> 494398473714dcbedb38b1ac79b531c7384b3bc4 Stefan Beller
>> <sbeller@google.com> 1455150849 -0800 rebase -i (start): checkout
>> origin/master: fast-forward
>>
>> I do understand the "fetch --append origin fast-forward", (I assume
>> they are coming from regular fetches). But the "rebase -i (start):
>> checkout origin/master: fast-forward" seems to have recorded there in
>> error as I never rebased origin/master itself, but only other stuff on
>> top of origin/master.
>> Why would we have such an entry in there?
>
> You tell us--what did you do back then?  ;-)

I wish I knew, my memories are not as good as a disk. It was Thursday 11th 2016, around 4:30 pm local time. I would assume I exercised Git the "usual" way as always.

This entry doesn't appear in .git/logs/HEAD.
However
    grep -r "rebase -i (start): checkout origin/master: fast-forward"
-- .git/logs
yields
.git/logs/refs/remotes/origin/master
.git/logs/refs/remotes/origin/nd/exclusion-regression-fix
.git/logs/refs/remotes/origin/ew/connect-verbose
.git/logs/refs/remotes/origin/next
.git/logs/refs/remotes/kernelorg/todo
.git/logs/refs/remotes/kernelorg/master
.git/logs/refs/remotes/kernelorg/next
.git/logs/refs/remotes/kernelorg/next

For example I am pretty sure I never touched origin/nd/exclusion-regression-fix and origin/ew/connect-verbose directly myself (i.e. checking them out or anything. The only way I got in contact with them is via "git fetch --all" and the remote side merging these branches into various other branches.

Show 24 quoted lines
>
> It indeed looks strange.  You shouldn't be able to check out a
> remote-tracking branch, so any log for local operation would be in
> HEAD's reflog, but not in remotes' reflog.
>
> I was curious to see what kind of entries I have and I do not seem
> to have anything strange.
>
> $ find .git/logs/refs/remotes/ -type f -print0 |
>   xargs -0 sed -Ee '
>     s/^[0-9a-f]{40} [0-9a-f]{40} [^>]*> [0-9]* [-+][0-9]{4}       //
>   ' |
>   sort -u
> fetch --append l10n: fast-forward
> fetch git-gui: fast-forward
> fetch -v git-svn: fast-forward
> fetch -v paulus: fast-forward
> pull git-svn: fast-forward
> pull git-svn: forced-update
> pull -s subtree paulus: fast-forward
> pull -v git-svn ks/svn-pathnameencoding-4: storing head
> update by push
>
> Puzzled...

doing a similar thing here: $ find .git/logs/refs/remotes/ -type f -print0 | xargs -0 cat |cut -c134-|sort -u fetch --append origin: fast-forward fetch --append origin: forced-update fetch --append origin: storing head [omitting lots of other remotes which also have "fetch --append" lines] rebase -i (start): checkout origin/master: fast-forward rebase -i (start): checkout origin/master: storing head update by push

As I have lots of terminals open, I suspect my confusing workflow doesn't help either, i.e. a normal thing for me is: term1: git rebase -i origin/master term1: <resolve merge conflict, edit patches, etc> term2: git fetch --all term1: continue on <resolve merge conflict, edit patches, etc> term1: actually finish the rebase

I tried reproducing this quickly, but I did not succeed. I'll try to keep an eye on this.

Thanks, Stefan

Previous: Junio C HamanoNext: Philip Oakley
Message 13 of 16 in “When does git check for branch-X being uptodate with origin/branch-X?”
  1. Thomas AdamMar 21, 2016
  2. Jeff KingMar 21, 2016
  3. Thomas AdamMar 21, 2016
  4. Junio C HamanoMar 21, 2016
  5. Jeff KingMar 21, 2016
  6. Thomas AdamMar 21, 2016
  7. Jeff KingMar 21, 2016
  8. Thomas AdamMar 21, 2016
  9. Stefan BellerMar 21, 2016
  10. Junio C HamanoMar 21, 2016
  11. Stefan BellerMar 21, 2016
  12. Junio C HamanoMar 21, 2016
  13. Stefan BellerMar 21, 2016
  14. Philip OakleyMar 22, 2016
  15. Stefan BellerMar 21, 2016
  16. Junio C HamanoMar 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.