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

Re: bug? 'git log -M100' is different from 'git log -M100%'

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Dec 18, 2012, 04:17 UTC
Message-ID
<CAMK1S_jVuJgmdb47A=SGV7_9uH2SEj-SHYFdSY_7nSuLCNxdkQ@mail.gmail.com>
In-Reply-To
<7vfw34jgmv.fsf@alter.siamese.dyndns.org>
On Tue, Dec 18, 2012 at 6:55 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Sitaram Chamarty <sitaramc@gmail.com> writes:
>
>> When using -M with a number to act as a threshold for declaring
>> a change as being a rename, I found a... quirk.  Any 2-digit
>> number after the M will work,...
>
> That is not 2-digit number.
>
> A few historical trivia may help.
>
> Originally we said "you can use -M2 to choose 2/10" (like "gzip"
> taking compression levels between "-0" to "-9").  Then Linus came up
> with a clever idea to let people specify arbitrary precision by
> letting you say "-M25" to mean 25/100 and "-M254" to mean 254/1000.
>
> Read the numbers without per-cent as if it has decimal point before
> it (i.e. -M005 is talking about 0.005 which is 0.5%).  Full hundred
> per-cent has to be spelled with per-cent sign for obvious reasons
> with this scheme but that cannot be avoided.  It is a special case.
Oh nice.  Makes sense; thanks!
I submitted a patch to diff-options.txt (separately).
regards
sitaram
Previous: Junio C Hamano
Message 3 of 3 in “bug? 'git log -M100' is different from 'git log -M100%'”
  1. Sitaram ChamartyDec 17, 2012
  2. Junio C HamanoDec 18, 2012
  3. Sitaram ChamartyDec 18, 2012

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.