{"thread":{"id":"55749","subject":"Formatting options are ignored when tracking functions","startedAt":"2021-05-21T21:18:59Z","lastAt":"2021-05-23T02:28:21Z","messageCount":2,"participants":["Aidan","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"425239","messageId":"63cf407c-95bd-fdda-88ec-5eca36d24998@gmail.com","threadId":"55749","inReplyTo":null,"subject":"Formatting options are ignored when tracking functions","fromName":"Aidan","fromEmail":"aidgal2@gmail.com","sentAt":"2021-05-21T21:18:52Z","receivedAt":"2021-05-21T21:18:59Z","isPatch":false,"sender":{"key":"aidgal2@gmail.com","avatar":null},"body":"Git log with formatting options do not work when using -L:<funcname>:<file>\n\nWorks as intended for path\n---------------------------\naidan@AidanLaptop:~/Repos/git$ git log --oneline -- advice.c\na20f70478f add: warn when asked to update SKIP_WORKTREE entries\n3b990aa645 push: parse and set flag for \"--force-if-includes\"\nc4a09cc9cc Merge branch 'hw/advise-ng'\n---------------------------\n\nWorks as intended for revision range\n---------------------------\naidan@AidanLaptop:~/Repos/git$ git log 91e70e00ac..HEAD --oneline\n107691cb07 (HEAD -> master, origin/master, origin/HEAD) Merge branch \n'ds/sparse-index-protections'\n2b8b1aa6ad Merge branch 'tz/c-locale-output-is-no-more'\nc69f2f8c86 Merge branch 'cs/http-use-basic-after-failed-negotiate'\n---------------------------\n\nDoes not work tracking a function\n---------------------------\naidan@AidanLaptop:~/Repos/git$ git log -L:vadvise:advice.c --oneline\nb3b18d1621 advice: revamp advise API\ndiff --git a/advice.c b/advice.c\n--- a/advice.c\n+++ b/advice.c\n@@ -99,19 +141,23 @@\n-static void vadvise(const char *advice, va_list params)\n+static void vadvise(const char *advice, int display_instructions,\n+                   const char *key, va_list params)\n  {\n         struct strbuf buf = STRBUF_INIT;\n         const char *cp, *np;\n\n         strbuf_vaddf(&buf, advice, params);\n\n---------------------------\n\nIs this a bug or am I invoking the command incorrectly?\n\nKind regards,\nAidan\n"},{"id":"425354","messageId":"60a9bdbf37fb7_87b7e208f0@natae.notmuch","threadId":"55749","inReplyTo":"63cf407c-95bd-fdda-88ec-5eca36d24998@gmail.com","subject":"RE: Formatting options are ignored when tracking functions","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2021-05-23T02:28:15Z","receivedAt":"2021-05-23T02:28:21Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Aidan wrote:\n> Does not work tracking a function\n> ---------------------------\n> aidan@AidanLaptop:~/Repos/git$ git log -L:vadvise:advice.c --oneline\n> b3b18d1621 advice: revamp advise API\n> diff --git a/advice.c b/advice.c\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -99,19 +141,23 @@\n> -static void vadvise(const char *advice, va_list params)\n> +static void vadvise(const char *advice, int display_instructions,\n> +                   const char *key, va_list params)\n>   {\n>          struct strbuf buf = STRBUF_INIT;\n>          const char *cp, *np;\n> \n>          strbuf_vaddf(&buf, advice, params);\n> \n> ---------------------------\n> \n> Is this a bug or am I invoking the command incorrectly?\n\nAccording to the documentation -L implies --patch, so you need to do:\n\n  git log -L:vadvise:advice.c --oneline --no-patch\n\nI would not expect such behavior so to me that's a bug.\n\n-- \nFelipe Contreras"}]}