public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Manuel Quiñones" <manuel.por.aca@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: Usability issue: "Your branch is up to date"
Date: Mon, 03 Feb 2025 08:56:20 -0800	[thread overview]
Message-ID: <xmqqh65b2ci3.fsf@gitster.g> (raw)
In-Reply-To: <CAPpV+OaMcViVKok5U0-4HaYyPMKEA7BBzw4t113uAaMndjs5Cg@mail.gmail.com> ("Manuel Quiñones"'s message of "Mon, 3 Feb 2025 13:45:36 -0300")

Manuel Quiñones <manuel.por.aca@gmail•com> writes:

> that can be fetched from the remote. My proposal: Add the timestamp of
> the last fetch to the message. For example:
>
> ```
> $ git switch main
> Switched to branch 'main'
> Your branch is up to date with 'origin/main'. Last check was 2 hours ago.
> ```
>
> It looks like the timestamp of file `.git/FETCH_HEAD` would be enough
> to implement it.

Not generally.  Your last fetch may not have been about origin/main
(e.g., "git fetch origin next"), or it may even have been about a
totally different remote (e.g., "git fetch elsewhere").

The timestamp of the last entry of the reflog of origin/main may be
a lot better place to look for the information, if available.

  reply	other threads:[~2025-02-03 16:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 16:45 Usability issue: "Your branch is up to date" Manuel Quiñones
2025-02-03 16:56 ` Junio C Hamano [this message]
2025-02-04  0:10   ` Junio C Hamano
2025-02-04  0:28     ` Bram van Oosterhout
     [not found]       ` <CAPx1GveyP4+yn5NMgvO3JpbOwPRT5=tb9YBx7U1Ufvae7gFnHQ@mail.gmail.com>
     [not found]         ` <CAMoUM6LstYx3PJcx-Sz3Dfs-1BxF1uP373MO8+eknbO7j-S01Q@mail.gmail.com>
2025-02-04  0:51           ` Fwd: " Bram van Oosterhout
2025-02-04  2:08       ` D. Ben Knoble
2025-02-04 12:53         ` Manuel Quiñones
2025-02-05  3:55         ` Bram van Oosterhout
2025-02-04 12:38     ` Manuel Quiñones
2025-02-04 17:43       ` Junio C Hamano
2025-02-05  6:54         ` Patrick Steinhardt
2025-02-05 18:40           ` Junio C Hamano
2025-02-06  9:53             ` Patrick Steinhardt
2025-02-07  8:20               ` Karthik Nayak

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=xmqqh65b2ci3.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=manuel.por.aca@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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