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

Re: [PATCH] git.el: Diff only file at point by default

From
AJAlexandre Julliard <julliard@winehq.org>
Date
Aug 30, 2008, 18:29 UTC
Message-ID
<87r686we4z.fsf@wine.dyndns.org>
In-Reply-To
<871w0bmn6w.fsf@lysator.liu.se>
David Kågedal <davidk@lysator.liu.se> writes:
Show 10 quoted lines
> Use prefix (C-u) to diff all marked files.
>
> Signed-off-by: David Kågedal <davidk@lysator.liu.se>
> ---
>  contrib/emacs/git.el |   62 +++++++++++++++++++++++++++++---------------------
>  1 files changed, 36 insertions(+), 26 deletions(-)
>
> Here is an updated patch that udpate the stage diff commands as
> well. It doesn't touch git-diff-file-merge-head since that already
> uses prefix arguments. Don't know if there is a solution to that.

I'd suggest to change git-diff-file-merge-head to act on the current file too. This means that the behavior is consistent across all diff functions, even if we lose the ability to do git-diff-file-merge-head on all marked files. Later on we may want to use a different mechanism than the prefix arg to toggle the marked file behavior for all diff functions (something like the pcl-cvs toggle-marks function).

Also make sure to check the callers of the diff functions you are changing; at least git-log-edit-diff got broken by your change, there may be others.

-- 
Alexandre Julliard
julliard@winehq.org
Previous: Junio C Hamano
Message 7 of 7 in “git.el: Diff only file at point by default”
  1. git.el: Diff only file at point by defaultDavid Kågedal, Aug 22, 2008
  2. Junio C HamanoAug 24, 2008
  3. Alexandre JulliardAug 25, 2008
  4. David KågedalAug 25, 2008
  5. git.el: Diff only file at point by defaultDavid Kågedal, Aug 26, 2008
  6. Junio C HamanoAug 27, 2008
  7. Alexandre JulliardAug 30, 2008

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.