[GRASS-git] [OSGeo/grass] 88fbb7: g.list: Print empty list for JSON (#6302)

Vaclav Petras noreply at github.com
Wed Sep 3 11:33:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 88fbb7ce8f1573ffb194fcb8277d5139ddf7c578
      https://github.com/OSGeo/grass/commit/88fbb7ce8f1573ffb194fcb8277d5139ddf7c578
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-09-03 (Wed, 03 Sep 2025)

  Changed paths:
    M general/g.list/list.c
    M general/g.list/tests/g_list_test.py

  Log Message:
  -----------
  g.list: Print empty list for JSON (#6302)

If nothing is found, still print an empty JSON list with format=json (but still nothing with other formats). Additionally, sort only with list with two or more items. While calling qsort on zero items should work, there is no reason to call it on zero items or one item.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list