{"thread":{"id":"44232","subject":"Format for %d includes unwanted preceding space","startedAt":"2016-10-06T09:22:29Z","lastAt":"2016-10-06T18:49:59Z","messageCount":2,"participants":["Ravi (Tom) Hale","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"303468","messageId":"a3eed8fb-505c-e9c1-6fb6-944d9df2f15d@hale.ee","threadId":"44232","inReplyTo":null,"subject":"Format for %d includes unwanted preceding space","fromName":"Ravi (Tom) Hale","fromEmail":"ravi@hale.ee","sentAt":"2016-10-06T09:22:08Z","receivedAt":"2016-10-06T09:22:29Z","isPatch":false,"sender":{"key":"ravi@hale.ee","avatar":null},"body":"The log --format=\"%d\" includes preceding space:\n\n$ git log -n1 --format=\"XX%dXX\" HEAD\nXX (HEAD -> master)XX\n\nI know of no other %<token> that is output in this way.\n\nIs there a way of removing this preceding space through the format \nstring, or will it need to be a code change?\n\n-- \nTom Hale\n"},{"id":"303512","messageId":"xmqq1sztl3d1.fsf@gitster.mtv.corp.google.com","threadId":"44232","inReplyTo":"a3eed8fb-505c-e9c1-6fb6-944d9df2f15d@hale.ee","subject":"Re: Format for %d includes unwanted preceding space","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-10-06T18:49:30Z","receivedAt":"2016-10-06T18:49:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Ravi (Tom) Hale\" <ravi@hale.ee> writes:\n\n> The log --format=\"%d\" includes preceding space:\n>\n> $ git log -n1 --format=\"XX%dXX\" HEAD\n> XX (HEAD -> master)XX\n>\n> I know of no other %<token> that is output in this way.\n\nThat is primarily because %d predates %[-+ ]<placeholder> mechanism,\nI think.  It is too late to redefine what \"%d\" means and force all\nusers to update their script to use \"% d\" instead, unfortunately.\n\n\n"}]}