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

Re: [PATCH v4 0/4] Add --no-ahead-behind to status

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 9, 2018, 16:48 UTC
Message-ID
<nycvar.QRO.7.76.6.1801091744540.37@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<c19f6469-190a-33e7-20a2-fcb17b8e45d9@gmail.com>
Hi Stolee,
On Tue, 9 Jan 2018, Derrick Stolee wrote:
Show 16 quoted lines
> On 1/9/2018 8:15 AM, Johannes Schindelin wrote:
> >
> > On Tue, 9 Jan 2018, Jeff King wrote:
> >
> > > But I don't think you can approximate both ahead and behind together
> > > without finding the actual merge base.
> > >
> > > But even still, finding small answers quickly and accurately and
> > > punting to "really far, I didn't bother to compute it" on the big
> > > ones would be an improvement over always punting.
> >
> > Indeed. The longer I think about it, the more I like the "100+ commits
> > apart" idea.
> 
> Again, I strongly suggest we drop this approach because it will be more pain
> than it is worth.

So what you are saying is if there is a commit graph with *heavy* clock skew, you might overestimate how many commits apart the tips are.

I say that this is striking the balance between correctness and usability on the *wrong* side.

Sure, it might be wrong if your commit graph suffers heavily from clock skew. In most cases, you still get a pretty darn useful hint where you're at.

The alternative would be *not* to show any useful hint in most cases, i.e. when you did not find all merge bases within <N> commits. I would really hate it if Git spent so much time and did not even give me a hint. Totally unsatisfying user experience.

Ciao, Johannes

Previous: Jeff HostetlerNext: Jeff King
Message 12 of 16 in “Add --no-ahead-behind to status”
  1. 0/4 Add --no-ahead-behind to statusJeff Hostetler, Jan 8, 2018
  2. 1/4 stat_tracking_info: return +1 when branches not equalJeff Hostetler, Jan 8, 2018
  3. 2/4 status: add --[no-]ahead-behind to status and commit for V2 format.Jeff Hostetler, Jan 8, 2018
  4. 3/4 status: update short status to respect --no-ahead-behindJeff Hostetler, Jan 8, 2018
  5. 4/4 status: support --no-ahead-behind in long formatJeff Hostetler, Jan 8, 2018
  6. Ben PeartJan 8, 2018
  7. Jeff HostetlerJan 8, 2018
  8. Jeff KingJan 9, 2018
  9. Johannes SchindelinJan 9, 2018
  10. Derrick StoleeJan 9, 2018
  11. Jeff HostetlerJan 9, 2018
  12. Johannes SchindelinJan 9, 2018
  13. Jeff KingJan 10, 2018
  14. Junio C HamanoJan 10, 2018
  15. Jeff KingJan 11, 2018
  16. Jeff KingJan 10, 2018

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.