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

Re: [PATCH v6b 5/8] branch: drop non-commit error reporting

From
Karthik Nayak <karthik.188@gmail.com>
Date
Sep 25, 2015, 18:37 UTC
Message-ID
<CAOLa=ZRi+x_GUoETK4fQc57=UnDFbCzZoswAZxoxHo2BYrQXmg@mail.gmail.com>
In-Reply-To
<xmqq4mii5w0m.fsf@gitster.mtv.corp.google.com>
On Fri, Sep 25, 2015 at 9:30 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 53 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Karthik Nayak <karthik.188@gmail.com> writes:
>>
>>> Remove the error "branch '%s' does not point at a commit" in
>>> apppend_ref() which reports branch refs which do not point to
>>> commits. Also remove the error "some refs could not be read" in
>>> print_ref_list() which is triggered as a consequence of the first
>>> error.
>>>
>>> This seems to be the wrong codepath whose purpose is not to diagnose
>>> and report a repository corruption. If we care about such a repository
>>> corruption, we should report it from fsck instead.
>>
>> (We actually already report it from fsck indeed)
>>
>>> This also helps in a smooth port of branch.c to use ref-filter APIs
>>> over the following patches. On the other hand, ref-filter ignores refs
>>> which do not point at commits silently.
>>
>> Seems much better. Thanks,
>
> Yes, it seems that I can just replace 5/8 with this and the
> remainder can stay as they are.
>
> While I was trying to address your "actually already report", I
> spotted a typo and then found that the early part of the second
> paragraph is a bit hard, so here is what I ended up with.
>
>     branch: drop non-commit error reporting
>
>     Remove the error "branch '%s' does not point at a commit" in
>     append_ref(), which reports branch refs which do not point to
>     commits.  Also remove the error "some refs could not be read" in
>     print_ref_list() which is triggered as a consequence of the first
>     error.
>
>     The purpose of these codepaths is not to diagnose and report a
>     repository corruption.  If we care about such a corruption, we
>     should report it from fsck instead, which we already do.
>
>     This also helps in a smooth port of branch.c to use ref-filter APIs
>     over the following patches. On the other hand, ref-filter ignores refs
>     which do not point at commits silently.
>
>     Based-on-patch-by: Jeff King <peff@peff.net>
>     Helped-by: Junio C Hamano <gitster@pobox.com>
>     Mentored-by: Christian Couder <christian.couder@gmail.com>
>     Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
>     Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
>     Signed-off-by: Junio C Hamano <gitster@pobox.com>
>
> Thanks.
Looks good to me, thanks :)
-- 
Regards,
Karthik Nayak
Previous: Matthieu Moy
Message 27 of 27 in “port branch.c to use the filtering part of ref-filter.”
  1. 0/8 port branch.c to use the filtering part of ref-filter.Karthik Nayak, Sep 23, 2015
  2. 1/8 branch: refactor width computationKarthik Nayak, Sep 23, 2015
  3. 2/8 branch: bump get_head_description() to the topKarthik Nayak, Sep 23, 2015
  4. 3/8 branch: roll show_detached HEAD into regular ref_listKarthik Nayak, Sep 23, 2015
  5. 4/8 branch: move 'current' check down to the presentation layerKarthik Nayak, Sep 23, 2015
  6. 5/8 branch: drop non-commit error reportingKarthik Nayak, Sep 23, 2015
  7. Matthieu MoySep 23, 2015
  8. Karthik NayakSep 24, 2015
  9. Junio C HamanoSep 23, 2015
  10. Matthieu MoySep 23, 2015
  11. Junio C HamanoSep 23, 2015
  12. Junio C HamanoSep 23, 2015
  13. Junio C HamanoSep 23, 2015
  14. Matthieu MoySep 24, 2015
  15. Junio C HamanoSep 23, 2015
  16. Karthik NayakSep 24, 2015
  17. 6/8 branch.c: use 'ref-filter' data structuresKarthik Nayak, Sep 23, 2015
  18. 7/8 branch.c: use 'ref-filter' APIsKarthik Nayak, Sep 23, 2015
  19. 8/8 branch: add '--points-at' optionKarthik Nayak, Sep 23, 2015
  20. Matthieu MoySep 23, 2015
  21. Junio C HamanoSep 23, 2015
  22. Karthik NayakSep 24, 2015
  23. 5/8 branch: drop non-commit error reportingKarthik Nayak, Sep 24, 2015
  24. Matthieu MoySep 25, 2015
  25. Junio C HamanoSep 25, 2015
  26. Matthieu MoySep 25, 2015
  27. Karthik NayakSep 25, 2015

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.