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

Re: [PATCH v2 2/3] advice: fix an unexpected leading space

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2024, 01:21 UTC
Message-ID
<xmqqa5pbcpnx.fsf@gitster.g>
In-Reply-To
<d5fbdb05-d16a-4390-946e-22a5a7a1b56a@gmail.com>
Rubén Justo <rjusto@gmail.com> writes:
Show 15 quoted lines
> [ ... ]
> diff --git a/advice.h b/advice.h
> index 0f584163f5..2affbe1426 100644
> --- a/advice.h
> +++ b/advice.h
> @@ -49,6 +49,7 @@ struct string_list;
>         ADVICE_UPDATE_SPARSE_PATH,
>         ADVICE_WAITING_FOR_EDITOR,
>         ADVICE_SKIPPED_CHERRY_PICKS,
> +       ADVICE_WORKTREE_ADD_ORPHAN,
>  };
>
> Note the hunk header, instead of a much more expected:
>
> @@ -49,6 +49,7 @@ enum advice_type

Next time, don't include "diff" output in the proposed log message without indenting. It makes it hard to read and parse.

The attached is what I queued in my tree.
Thanks.
------- >8 ------------- >8 ------------- >8 ------------- >8 -------
From: Rubén Justo <rjusto@gmail.com>
Subject: [PATCH] advice: fix an unexpected leading space

This space was introduced, presumably unintentionally, in b3b18d1621 (advice: revamp advise API, 2020-03-02)

I notice this space due to confuse diff outputs while doing some changes to enum advice_type.

As a reference, a recent change we have to that enum is:
    $ git show 35f0383
    ...
    diff --git a/advice.h b/advice.h
    index 0f584163f5..2affbe1426 100644
    --- a/advice.h
    +++ b/advice.h
    @@ -49,6 +49,7 @@ struct string_list;
	    ADVICE_UPDATE_SPARSE_PATH,
	    ADVICE_WAITING_FOR_EDITOR,
	    ADVICE_SKIPPED_CHERRY_PICKS,
    +       ADVICE_WORKTREE_ADD_ORPHAN,
     };
Note the hunk header, instead of a much more expected:
    @@ -49,6 +49,7 @@ enum advice_type
Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 advice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/advice.h b/advice.h
index 9396bcdcf1..74d44d1156 100644
--- a/advice.h
+++ b/advice.h
@@ -10,7 +10,7 @@ struct string_list;
  * Add the new config variable to Documentation/config/advice.txt.
  * Call advise_if_enabled to print your advice.
  */
- enum advice_type {
+enum advice_type {
 	ADVICE_ADD_EMBEDDED_REPO,
 	ADVICE_ADD_EMPTY_PATHSPEC,
 	ADVICE_ADD_IGNORED_FILE,
-- 
2.43.0-283-ga54a84b333
Previous: Rubén JustoNext: Rubén Justo
Message 8 of 12 in “branch: error description when deleting a not fully merged branch”
  1. branch: error description when deleting a not fully merged branchRubén Justo, Jan 10, 2024
  2. Junio C HamanoJan 10, 2024
  3. Junio C HamanoJan 10, 2024
  4. Rubén JustoJan 11, 2024
  5. 0/3 branch: error description when deleting a not fully merged branchRubén Justo, Jan 11, 2024
  6. 1/3 advice: sort the advice related listsRubén Justo, Jan 11, 2024
  7. 2/3 advice: fix an unexpected leading spaceRubén Justo, Jan 11, 2024
  8. Junio C HamanoJan 12, 2024
  9. Rubén JustoJan 12, 2024
  10. Junio C HamanoJan 12, 2024
  11. Junio C HamanoJan 12, 2024
  12. 3/3 branch: make the advice to force-deleting a conditional oneRubén Justo, Jan 11, 2024

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.