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

Re: [PATCH] TIG: Fix to reinstate proper operation with no arguments

From
DNDrew Northup <n1xim.email@gmail.com>
Date
Jul 19, 2013, 11:55 UTC
Message-ID
<CAM9Z-n=_vV2+TOXqj_p+wbuFVX8DEU8p_NtytqGepziLdJeong@mail.gmail.com>
In-Reply-To
<CAFuPQ1K=hWUSCEhaGsuW8PeoGQcj6AoPo61zUTDbjLE802h+7g@mail.gmail.com>
On Fri, Jul 19, 2013 at 12:07 AM, Jonas Fonseca <fonseca@diku.dk> wrote:
Show 5 quoted lines
> On Thu, Jul 18, 2013 at 9:30 AM, Drew Northup <n1xim.email@gmail.com> wrote:
>>
>> Somehow this patch breaks the main view to not open the correct commit in diff view when <enter> is pressed. Back to the debugger...
>
> Does this (possibly white-space damaged) patch work for you?

I did look back at that sort of fix, but I kept getting compiler warnings about a pointer conversion. Yes, it does work (I was actually initializing the whole buffer to NULL), but I'd prefer doing so without the implicit int* conversion warnings.

Show 15 quoted lines
> diff --git a/tig.c b/tig.c
> index ba9ba98..74a2928 100644
> --- a/tig.c
> +++ b/tig.c
> @@ -3104,7 +3104,7 @@ format_expand_arg(struct format_context *format,
> const char *name)
>  static bool
>  format_append_arg(struct format_context *format, const char
> ***dst_argv, const char *arg)
>  {
> - format->bufpos = 0;
> + format->buf[0] = format->bufpos = 0;
>
>   while (arg) {
>   char *next = strstr(arg, "%(");

-- -Drew Northup -------------------------------------------------------------- "As opposed to vegetable or mineral error?" -John Pescatore, SANS NewsBites Vol. 12 Num. 59

Previous: Jonas FonsecaNext: Drew Northup
Message 4 of 7 in “TIG: Fix to reinstate proper operation with no arguments”
  1. TIG: Fix to reinstate proper operation with no argumentsDrew Northup, Jul 18, 2013
  2. Drew NorthupJul 18, 2013
  3. Jonas FonsecaJul 19, 2013
  4. Drew NorthupJul 19, 2013
  5. Drew NorthupJul 24, 2013
  6. TIG: Fix to reinstate proper operation with no argumentsDrew Northup, Jul 24, 2013
  7. Jonas FonsecaJul 29, 2013

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.