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

Re: diff settings

From
Ted Pavlic <ted@tedpavlic.com>
Date
Jan 31, 2009, 19:47 UTC
Message-ID
<4984AACD.20600@tedpavlic.com>
In-Reply-To
<alpine.GSO.2.00.0901310750470.5437@kiwi.cs.ucla.edu>
> Thank you for alerting us to the Hg design.  I can appreciate the elegance of
> it, and I'm always in favor of the most general possible implementation.  But
> there is a subtle difference between diff.primer and primer.diff.

As I already discussed, Mercurial has both "diff.primer" and "primer.diff" precisely because "diff" settings affects so many Hg commands.

In particular, in my .hgrc, I have:

[diff] git = 1

which causes all Mercurial commands that need to generate a diff to use gitdiff rather than truediff. However, if I *wanted* to apply a set of flags to a particular command, I could (using the equivalent "git" commands)...

[defaults] pull = --rebase commit = -a format-patch = -M

So I see a purpose for both *.defaults and defaults.*. Of course, aliases are also nice (IIRC, Mercurial doesn't have "aliases", but I could be wrong). Mercurial users are very happy with having both available. I imagine git people would be too.

--Ted
-- 
Ted Pavlic <ted@tedpavlic.com>

   Please visit my ALS association page:
         http://web.alsa.org/goto/tedpavlic
   My family appreciates your support in the fight to defeat ALS.
Previous: Nanako ShiraishiNext: Keith Cascio
Message 12 of 13 in “diff settings”
  1. Keith CascioJan 24, 2009
  2. Jeff KingJan 24, 2009
  3. Teemu LikonenJan 24, 2009
  4. Keith CascioJan 24, 2009
  5. Ted PavlicJan 25, 2009
  6. Keith CascioJan 25, 2009
  7. Ted PavlicJan 26, 2009
  8. Ted PavlicJan 29, 2009
  9. Johannes SchindelinJan 29, 2009
  10. Keith CascioJan 29, 2009
  11. Nanako ShiraishiJan 29, 2009
  12. Ted PavlicJan 31, 2009
  13. Keith CascioJan 31, 2009

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.