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

Re: [RFC/PATCH] git-what: explain what to do next

From
SBSanti Béjar <sbejar@gmail.com>
Date
May 28, 2008, 09:12 UTC
Message-ID
<8aa486160805280212u742a311gef61676870af147@mail.gmail.com>
In-Reply-To
<7vwslfzd0i.fsf@gitster.siamese.dyndns.org>
On Tue, May 27, 2008 at 10:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> But a problem I see with the patch as an implementation of "git-what" is
> that some commands use other commands as their internal implementation
> details.  For example, when you are in the middle of a "git rebase"
> session, which might be using "git am" as its internal implementation
> detail, if you ask the "are you in the middle of doing something, and if
> so how can I continue?" question (which is what the "git-cmd --what" is
> all about) to "git am", before you ask the same question to "git rebase",
> "am" could say "Yeah, I have applied a few patches successfully but gave
> control back to the user to resolve conflicts while applying this patch",
> which may be a truthful statement from "git am"'s point of view, but is
> not a useful information from the end user's point of view, as all s/he
> typed was "git rebase".  In addition, if Porcelain X uses Porcelain Y as
> its internal implementation, the series of commands that need to be
> followed to continue from a particular sequence point might be different
> between the case where the toplevel request was Y and the case where it
> was X.  Not just X needs to know that it uses Y, Y also needs to know that
> the toplevel command the end user gave could be X which called it and
> behave differently.  So a nice "each command knows what its doing"
> separation cannot really solve everything in practice.

This is the job of the git-what, so it first call "git rebase --what" and then "git am --what", and the individual "git cmd --what" can be declared internal.

Show 5 quoted lines
>
> In other words, "git-X --what" could give a guidance to the "I've done X,
> now what can I do?" situation, but it by itself cannot be used as a basis
> of "git-what" to answer "I'm totally lost and I do not know what I was
> doing.  Where was I and what should I do next?"  question.
I think it does, it is exactly what my patch does, IMHO.
Santi
Previous: Junio C HamanoNext: Christian Couder
Message 11 of 14 in “git-what: explain what to do next”
  1. git-what: explain what to do nextSanti Béjar, May 27, 2008
  2. Johannes SchindelinMay 27, 2008
  3. Santi BéjarMay 27, 2008
  4. Johannes SchindelinMay 27, 2008
  5. Santi BéjarMay 27, 2008
  6. Stephen R. van den BergMay 27, 2008
  7. Santi BéjarMay 27, 2008
  8. Steven WalterMay 27, 2008
  9. Junio C HamanoMay 27, 2008
  10. Junio C HamanoMay 27, 2008
  11. Santi BéjarMay 28, 2008
  12. Christian CouderMay 29, 2008
  13. Junio C HamanoMay 29, 2008
  14. Jon LoeligerMay 29, 2008

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.