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

Re: [PATCH] git-reset [--mixed] <tree> [--] <paths>...

From
Junio C Hamano <junkio@cox.net>
Date
Dec 14, 2006, 20:41 UTC
Message-ID
<7v3b7i2osc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<slrneo2atm.nqa.Peter.B.Baumann@xp.machine.xx>

Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de> writes:

Show 7 quoted lines
> Why not make
>
> 	git-reset --hard <treeish> -- file
>
> aquivalent to
>
> 	git-checkout <treeish> -- file

Theoretically we could, but I'd rather keep "reset --hard" something that people would think a bit about before actually running (I am not enthused about giving "reset --mixed" this feature for the same reason, but I think it is safe enough).

I'd want to avoid overloading different meanings to the --hard form. Mis-typing checkout (say, accidentally having <RETURN> before "-- file" part while cut & paste) would not be so dangeous; mis-typing "reset --hard" the same way could be disastrous.

> PS:	Your patch didn't apply cleanly.

As I said there is one bug I've fixed in my tree but the branches were not pushed out yet.

Previous: Peter Baumann
Message 4 of 4 in “git-reset [--mixed] <tree> [--] <paths>...”
  1. git-reset [--mixed] <tree> [--] <paths>...Junio C Hamano, Dec 14, 2006
  2. Junio C HamanoDec 14, 2006
  3. Peter BaumannDec 14, 2006
  4. Junio C HamanoDec 14, 2006

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.