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

Re: Diffs "from" working directory

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Nov 20, 2005, 17:43 UTC
Message-ID
<20051120174359.GA24177@fieldses.org>
In-Reply-To
<200511201817.15780.blaisorblade@yahoo.it>
On Sun, Nov 20, 2005 at 06:17:15PM +0100, Blaisorblade wrote:
> I've given a look at commit fcc1ad70be5ff89996358b6d770cd229fec2a3ba, and 
> while it may or may not be the right thing to do, there's a misunderstanding 
> at the base.
What misunderstanding?  Could you quote it?
Show 14 quoted lines
> For instance, in the stg tree, before that patch, I can do:
> 
> $ echo ciao >> README
> $ stg diff -r HEAD:
> $ stg diff -r HEAD
> diff --git a/README b/README
> index 184ded8..adb3970 100644
> --- a/README
> +++ b/README
> @@ -12,3 +12,4 @@ StGIT commands.
> 
>  For the latest version see http://www.procode.org/stgit/
>  For a tutorial see http://wiki.procode.org/cgi-bin/wiki.cgi/StGIT_Tutorial
> +ciao

That's a diff *to* the working directory. My complaint was that there wasn't a convenient way to get a diff *from* the working directory.

It's nice to have a convenient shorthand for the current working directory, and since there's already a shorthand for the HEAD ("HEAD") it seemed more sensible to make "" the current working directory.

It's a minor point, but it seems convenient.
--b.
Next: Linus Torvalds
Message 1 of 12 in “Re: Diffs "from" working directory”
  1. J. Bruce FieldsNov 20, 2005
  2. Linus TorvaldsNov 20, 2005
  3. J. Bruce FieldsNov 20, 2005
  4. Chuck LeverNov 21, 2005
  5. Catalin MarinasNov 21, 2005
  6. Junio C HamanoNov 21, 2005
  7. Catalin MarinasNov 21, 2005
  8. Chuck LeverNov 22, 2005
  9. Linus TorvaldsNov 22, 2005
  10. Chuck LeverNov 22, 2005
  11. Linus TorvaldsNov 22, 2005
  12. Catalin MarinasNov 22, 2005

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.