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

[PATCH] for-each-ref: fix setup of option-parsing for --sort

From
LHLars Hjemli <hjemli@gmail.com>
Date
Nov 10, 2007, 16:07 UTC
Message-ID
<1194710863-22868-1-git-send-email-hjemli@gmail.com>
In-Reply-To
<9e4733910711100610y478c62cend1d9af84e0ecc08b@mail.gmail.com>

The option value for --sort is already a pointer to a pointer to struct ref_sort, so just use it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 builtin-for-each-ref.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index da8c794..e909e66 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -847,7 +847,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
 		OPT_GROUP(""),
 		OPT_INTEGER( 0 , "count", &maxcount, "show only <n> matched refs"),
 		OPT_STRING(  0 , "format", &format, "format", "format to use for the output"),
-		OPT_CALLBACK(0 , "sort", &sort_tail, "key",
+		OPT_CALLBACK(0 , "sort", sort_tail, "key",
 		            "field name to sort on", &opt_parse_sort),
 		OPT_END(),
 	};
-- 
1.5.3.5.623.g0a1d
Previous: Jon SmirlNext: Johannes Schindelin
Message 9 of 10 in “gitweb, updating 'last changed' column on the project page”
  1. Jon SmirlNov 10, 2007
  2. Jakub NarebskiNov 10, 2007
  3. Jon SmirlNov 10, 2007
  4. Jon SmirlNov 10, 2007
  5. Jakub NarebskiNov 10, 2007
  6. Jon SmirlNov 10, 2007
  7. Jakub NarebskiNov 10, 2007
  8. Jon SmirlNov 10, 2007
  9. for-each-ref: fix setup of option-parsing for --sortLars Hjemli, Nov 10, 2007
  10. Johannes SchindelinNov 10, 2007

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.