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

Re: What's in git.git (stable)

From
David Kastrup <dak@gnu.org>
Date
Jul 29, 2007, 09:05 UTC
Message-ID
<85ir83zijd.fsf@lola.goethe.zz>
In-Reply-To
<20070729031612.GB17204@thunk.org>
Theodore Tso <tytso@mit.edu> writes:
> So I really am beginning to think the right answer is to give up on
> using git-mergetool to support anything other than basic emacs users
> (who just use emacs as an editor, what a concept),

In contrast, you are trying to support only people by using Emacs _not_ as an editor, but as a mergetool under the control of git. That's a mistake.

Show 5 quoted lines
> and for the H4rd C0re emacs l33t, they can use a
> contrib/git-mergetool.el that does everything inside emacs.  Since
> these are the people who want emacs to be their desktop, their
> shell, *and* their window manager, they will probably be happier
> that way....

Sorry, but you are way off here. The normal, standard use of Emacs is to start it once and do everything in it. Its startup time is such that other uses are not feasible.

(info "(emacs) Entering Emacs")
       Many editors are designed to edit one file.  When done with
    that file, you exit the editor.  The next time you want to edit a
    file, you must start the editor again.  Working this way, it is
    convenient to use a command-line argument to say which file to
    edit.
       However, killing Emacs after editing one each and starting it
    afresh for the next file is both unnecessary and harmful, since it
    denies you the full power of Emacs.  Emacs can visit more than one
    file in a single editing session, and that is the right way to use
    it.  Exiting the Emacs session loses valuable accumulated context,
    such as the kill ring, registers, undo history, and mark ring.
    These features are useful for operating on multiple files, or even
    continuing to edit one file.  If you kill Emacs after each file,
    you don't take advantage of them.
       The recommended way to use GNU Emacs is to start it only once,
    just after you log in, and do all your editing in the same Emacs
    session.  Each time you edit a file, you visit it with the
    existing Emacs, which eventually has many files in it ready for
    editing.  Usually you do not kill Emacs until you are about to log
    out.  *Note Files::, for more information on visiting more than
    one file.
       To edit a file from another program while Emacs is running, you
    can use the `emacsclient' helper program to open a file in the
    already running Emacs.  *Note Emacs Server::.

So git's mergetool philosophy is currently _straight_ set against the way Emacs is designed to work.

One solution would be to call emacs -q in order to weed out users with the impunity of customizing Emacs to suit their needs rather than those of git.

But the sanest is really to call Emacs just the way the user configured $EDITOR to call it and pass it an initial merge command. And then decide from the results on the disk what to further do.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Theodore TsoNext: Theodore Tso
Message 27 of 34 in “What's in git.git (stable)”
  1. Junio C HamanoMay 13, 2007
  2. Junio C HamanoMay 17, 2007
  3. Junio C HamanoMay 19, 2007
  4. Junio C HamanoMay 23, 2007
  5. Junio C HamanoMay 29, 2007
  6. Junio C HamanoJun 2, 2007
  7. Junio C HamanoJun 7, 2007
  8. Junio C HamanoJun 13, 2007
  9. Johannes SchindelinJun 13, 2007
  10. Johannes SixtJun 14, 2007
  11. Junio C HamanoJun 21, 2007
  12. Junio C HamanoJun 25, 2007
  13. Junio C HamanoJul 2, 2007
  14. What's in git.gitJunio C Hamano, Jul 13, 2007
  15. Draft release notes for v1.5.3, as of -rc1Junio C Hamano, Jul 13, 2007
  16. Sven VerdoolaegeJul 13, 2007
  17. Johannes SchindelinJul 14, 2007
  18. Junio C HamanoJul 14, 2007
  19. Johannes SchindelinJul 15, 2007
  20. Brian DowningJul 13, 2007
  21. Junio C HamanoJul 13, 2007
  22. Junio C HamanoJul 28, 2007
  23. David KastrupJul 28, 2007
  24. Junio C HamanoJul 28, 2007
  25. David KastrupJul 28, 2007
  26. Theodore TsoJul 29, 2007
  27. David KastrupJul 29, 2007
  28. Theodore TsoJul 29, 2007
  29. Johannes SchindelinJul 29, 2007
  30. [Untested! proposal] git-mergetool.sh: introduce ediff optionDavid Kastrup, Jul 29, 2007
  31. Theodore TsoJul 29, 2007
  32. David KastrupJul 29, 2007
  33. Thomas GlanzmannJul 28, 2007
  34. Junio C HamanoAug 7, 2007

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.