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

Re: Diff topic branch + working copy changes?

From
Samuel Lijin <sxlijin@gmail.com>
Date
May 17, 2017, 21:17 UTC
Message-ID
<CAJZjrdX6iDQeAV4v7S=_OV6McNFe8Tax3sNUatwhrg+nEOR0jA@mail.gmail.com>
In-Reply-To
<CAHd499DNa1zFm+ktWJb-4Rp09DjSc+p4HMqoHiXDj57muwxukw@mail.gmail.com>
On Wed, May 17, 2017 at 9:39 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
Show 5 quoted lines
>
> Would be nice in the future to have another revision specification
> like @{wc} for "HEAD + working copy". I guess this technically isn't a
> revision, but something along those lines. Or maybe just an
> --include-wc for diff or something.

I think the spec would *just* be the working tree, if it ever got implemented - I don't think it makes much sense to say "HEAD + working copy".

Maybe something like this would do what you want?
# Diff Merge Base

dmb = "!f() { : git diff ; ref=$(git rev-parse --abbrev-ref HEAD); git reset --soft $(git merge-base @{upstream} HEAD); git diff; git reset --soft \"$ref\"; }; f"

Previous: Robert Dailey
Message 5 of 5 in “Diff topic branch + working copy changes?”
  1. Robert DaileyMay 16, 2017
  2. Junio C HamanoMay 17, 2017
  3. Robert DaileyMay 17, 2017
  4. Robert DaileyMay 17, 2017
  5. Samuel LijinMay 17, 2017

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.