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

Re: [RFC PATCH 0/4] git-status reports relation to superproject

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 8, 2017, 22:36 UTC
Message-ID
<20171108143646.2e1870a82360072557094e01@google.com>
In-Reply-To
<20171108195509.7839-1-sbeller@google.com>

On Wed, 8 Nov 2017 11:55:05 -0800 Stefan Beller <sbeller@google.com> wrote:

Show 14 quoted lines
>   $ git -c status.superprojectinfo status
>   HEAD detached at v2.15-rc2
>   superproject is 6 commits behind HEAD 7070ce2..5e6d0fb
>   nothing to commit, working tree clean
> 
> How cool is that?
> 
> This series side steps the questions raised in
> https://public-inbox.org/git/xmqq4lq6hmp2.fsf_-_@gitster.mtv.corp.google.com/
> which I am also putting together albeit slowly.
> 
> This series just reports the relationship between the superprojects gitlink
> (if any) to HEAD. I think that is useful information in the current
> world of submodules.

The relationship is indeed currently useful, but if the long term plan is to strongly discourage detached submodule HEAD, then I would think that these patches are in the wrong direction. (If the long term plan is to end up supporting both detached and linked submodule HEAD, then these patches are fine, of course.) So I think that the plan referenced in Junio's email (that you linked above) still needs to be discussed.

About the patches themselves, they look OK to me. Some minor things off the top of my head are to retain the "ours" and "theirs" (instead of "one" and "two"), and to replicate the language in remote.c more closely ("This submodule is (ahead of/behind) the superproject by %d commit(s)") instead of inventing your own.

Previous: Stefan BellerNext: Stefan Beller
Message 6 of 16 in “git-status reports relation to superproject”
  1. 0/4 git-status reports relation to superprojectStefan Beller, Nov 8, 2017
  2. 1/4 remote, revision: factor out exclusive counting between two commitsStefan Beller, Nov 8, 2017
  3. 3/4 submodule.c: get superprojects gitlink valueStefan Beller, Nov 8, 2017
  4. 4/4 git-status: report reference to superprojectStefan Beller, Nov 8, 2017
  5. 2/4 submodule.c: factor start_ls_files_dot_dot out of get_superproject_working_treeStefan Beller, Nov 8, 2017
  6. Jonathan TanNov 8, 2017
  7. [RFD] Long term plan with submodule refs?Stefan Beller, Nov 9, 2017
  8. Jonathan TanNov 9, 2017
  9. Junio C HamanoNov 9, 2017
  10. Junio C HamanoNov 9, 2017
  11. Stefan BellerNov 9, 2017
  12. Jacob KellerNov 9, 2017
  13. Stefan BellerNov 9, 2017
  14. Jacob KellerNov 10, 2017
  15. Stefan BellerNov 10, 2017
  16. Jacob KellerNov 11, 2017

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.