git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: Formatting options are ignored when tracking functions
@ 2021-05-22  1:58 Philippe Blain
  2021-05-22  3:55 ` Bagas Sanjaya
  2021-05-23 18:11 ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe Blain @ 2021-05-22  1:58 UTC (permalink / raw)
  To: aidgal2; +Cc: git

Hi Aidan,

I believe this is working as advertised: only the first line of the commit message is shown. 
However as mentioned in the doc, the -L option also triggers patch output (-p), 
which you can omit if you explicitely add --no-patch (or shorter, -s). 

Cheers,
Philippe. 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Formatting options are ignored when tracking functions
@ 2021-05-21 21:18 Aidan
  2021-05-23  2:28 ` Felipe Contreras
  0 siblings, 1 reply; 7+ messages in thread
From: Aidan @ 2021-05-21 21:18 UTC (permalink / raw)
  To: git

Git log with formatting options do not work when using -L:<funcname>:<file>

Works as intended for path
---------------------------
aidan@AidanLaptop:~/Repos/git$ git log --oneline -- advice.c
a20f70478f add: warn when asked to update SKIP_WORKTREE entries
3b990aa645 push: parse and set flag for "--force-if-includes"
c4a09cc9cc Merge branch 'hw/advise-ng'
---------------------------

Works as intended for revision range
---------------------------
aidan@AidanLaptop:~/Repos/git$ git log 91e70e00ac..HEAD --oneline
107691cb07 (HEAD -> master, origin/master, origin/HEAD) Merge branch 
'ds/sparse-index-protections'
2b8b1aa6ad Merge branch 'tz/c-locale-output-is-no-more'
c69f2f8c86 Merge branch 'cs/http-use-basic-after-failed-negotiate'
---------------------------

Does not work tracking a function
---------------------------
aidan@AidanLaptop:~/Repos/git$ git log -L:vadvise:advice.c --oneline
b3b18d1621 advice: revamp advise API
diff --git a/advice.c b/advice.c
--- a/advice.c
+++ b/advice.c
@@ -99,19 +141,23 @@
-static void vadvise(const char *advice, va_list params)
+static void vadvise(const char *advice, int display_instructions,
+                   const char *key, va_list params)
  {
         struct strbuf buf = STRBUF_INIT;
         const char *cp, *np;

         strbuf_vaddf(&buf, advice, params);

---------------------------

Is this a bug or am I invoking the command incorrectly?

Kind regards,
Aidan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-23 19:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22  1:58 Formatting options are ignored when tracking functions Philippe Blain
2021-05-22  3:55 ` Bagas Sanjaya
2021-05-23 18:11 ` Junio C Hamano
2021-05-23 18:20   ` Philippe Blain
2021-05-23 19:28     ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2021-05-21 21:18 Aidan
2021-05-23  2:28 ` Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).