{"thread":{"id":"13084","subject":"[BUG] --pretty=format does not work ok with rev-list","startedAt":"2008-04-12T20:40:25Z","lastAt":"2008-04-25T18:24:57Z","messageCount":3,"participants":["k0001","Jörg Sommer","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"74230","messageId":"1208032825.30817.15.camel@k0001","threadId":"13084","inReplyTo":null,"subject":"[BUG] --pretty=format does not work ok with rev-list","fromName":"k0001","fromEmail":"gnuk0001@gmail.com","sentAt":"2008-04-12T20:40:25Z","receivedAt":"2008-04-12T20:40:25Z","isPatch":false,"sender":{"key":"gnuk0001@gmail.com","avatar":null},"body":"Hello list, my name is Renzo Carbonara and I'm new here in the git\nneighborhood.\n\n\nNow back to business, when using --pretty=format:some_format with git\nrev-list, an additional non-requested line is printed before every\ncommit (\"commit <sha1_id>\"). Example:\n\ngit rev-list output (BAD):\n\nk@k0001 ~/linux-2.6 $ git rev-list -2 --pretty=format:\"%H: %cn\" master\ncommit f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed\nf4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds\ncommit 44cad261025c04327fd7e847a7088fd3031b0c3e\n44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds\n\n\ngit log output (GOOD):\n\nk@k0001 ~/linux-2.6 $ git log -2 --pretty=format:\"%H: %cn\" master\nf4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds\n44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds\n\n\n\nthis was tested with versions:\n - 1.5.3.7\n - 4cdda2b895dfb6ba084e3952cbf4274a6a2e0338\n\n\nCheers,\n\nRenzo Carbonara\n"},{"id":"75178","messageId":"slrng1386p.ujv.joerg@alea.gnuu.de","threadId":"13084","inReplyTo":"1208032825.30817.15.camel@k0001","subject":"Re: [BUG] --pretty=format does not work ok with rev-list","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-04-25T09:14:01Z","receivedAt":"2008-04-25T09:14:01Z","isPatch":false,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi,\n\nk0001 <gnuk0001@gmail.com> wrote:\n> Now back to business, when using --pretty=format:some_format with git\n> rev-list, an additional non-requested line is printed before every\n> commit (\"commit <sha1_id>\"). Example:\n>\n> git rev-list output (BAD):\n>\n> k@k0001 ~/linux-2.6 $ git rev-list -2 --pretty=format:\"%H: %cn\" master\n> commit f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed\n> f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds\n> commit 44cad261025c04327fd7e847a7088fd3031b0c3e\n> 44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds\n\nIs this a bug? I've the same “problem” in my rebase with merge patch\nseries and added a “|grep -v ^commit”. But if this is a bug, I can remove\nit.\n\nSchöne Grüße, Jörg.\n-- \nViele Leute glauben, dass sie denken, wenn sie lediglich\nihre Vorurteile neu ordnen.\n"},{"id":"75189","messageId":"7vbq3xpzba.fsf@gitster.siamese.dyndns.org","threadId":"13084","inReplyTo":"slrng1386p.ujv.joerg@alea.gnuu.de","subject":"Re: [BUG] --pretty=format does not work ok with rev-list","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-25T18:24:57Z","receivedAt":"2008-04-25T18:24:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jörg Sommer <joerg@alea.gnuu.de> writes:\n\n>> k@k0001 ~/linux-2.6 $ git rev-list -2 --pretty=format:\"%H: %cn\" master\n>> commit f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed\n>> f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed: Linus Torvalds\n>> commit 44cad261025c04327fd7e847a7088fd3031b0c3e\n>> 44cad261025c04327fd7e847a7088fd3031b0c3e: Linus Torvalds\n>\n> Is this a bug? I've the same “problem” in my rebase with merge patch\n> series and added a “|grep -v ^commit”. But if this is a bug, I can remove\n> it.\n\nI personally do not think the above is a particularly desirable output,\nbut that's how rev-list worked for a long time and existing scripts\nprobably expect it that way.\n\nrev-list is for script consumption, and giving --pretty=format that has %H\nin it would be asking for redundant information.\n"}]}