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

Re: [PATCH] builtin/describe: introduce --broken flag

From
Stefan Beller <sbeller@google.com>
Date
Mar 21, 2017, 22:50 UTC
Message-ID
<CAGZ79kYfrKRbs40UH73VCgMsJgFyh1aG5ZrYMj3O_wGdu6rSUA@mail.gmail.com>
In-Reply-To
<xmqqvar2mevi.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 21, 2017 at 3:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 26 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> AFAICT, someone is (was?) using a version of Git that doesn't contain
>> f8eaa0ba98 (submodule--helper, module_clone: always operate
>> on absolute paths, 2016-03-31). So then the submodule paths were
>> made absolute paths on creation of the Gerrit repo.
>>
>> And then someone moved the repo and the absolute paths broke.
>>
>> Even after an upgrade of Git to its latest and greatest version, the underlying
>> issue of having broken submodule paths remains in that case.
>>
>> So there are a couple of ways forward
>> 0) as an immediate fix, manually fix the absolute path or make them relative
>>
>> 1A) have more error resilient tools in Git
>> 1B) have a tool in git (e.g. "git submodule fsck-setup") that rewrites
>>     the .git file link and the core.worktree setting to be relative and correct.
>>
>> I think we should do both A and B, I decided to go with A first, specifically
>> "git-describe" as that was reported to not work well in this situation with the
>> given broken data
>
> Sounds sensible.  I would say that we should do less 1A (i.e. hiding
> problems under the rug) and more 1B.  Of course, making the problem
> less likely to happen in the first place would be more important ;-)

Agreed on not introducing bugs as often. For (B), I wonder what the right place is.

Maybe "reset --hard", in combination with "--recurse-submodules" would also fix these submodule path issues. The made up "git submodule fsck-setup" sounds like it would only detect (and not fix) the problems. But these absolute paths issues are known how to fix, so a "fsck"-y tool may convey a wrong impression.

Previous: Junio C HamanoNext: Stefan Beller
Message 11 of 15 in “git-describe deals gracefully with broken submodules”
  1. 0/3 git-describe deals gracefully with broken submodulesStefan Beller, Mar 21, 2017
  2. 1/3 submodule.c: port is_submodule_modified to use porcelain 2Stefan Beller, Mar 21, 2017
  3. 3/3 builtin/describe: introduce --submodule-error-as-dirty flagStefan Beller, Mar 21, 2017
  4. 2/3 revision machinery: gentle submodule errorsStefan Beller, Mar 21, 2017
  5. Junio C HamanoMar 21, 2017
  6. Junio C HamanoMar 21, 2017
  7. builtin/describe: introduce --broken flagStefan Beller, Mar 21, 2017
  8. Junio C HamanoMar 21, 2017
  9. Stefan BellerMar 21, 2017
  10. Junio C HamanoMar 21, 2017
  11. Stefan BellerMar 21, 2017
  12. builtin/describe: introduce --broken flagStefan Beller, Mar 21, 2017
  13. Junio C HamanoMar 22, 2017
  14. Jakub NarębskiMar 22, 2017
  15. Stefan BellerMar 21, 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.