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

Re: [PATCH] reset: Better warning message on git reset --mixed <paths>

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 15, 2010, 20:51 UTC
Message-ID
<AANLkTik+yGn_0PR9uO2_EsZgQPW187P4qmZx4fJSbAWO@mail.gmail.com>
In-Reply-To
<7vr5hzg1u1.fsf@alter.siamese.dyndns.org>
On Sun, Aug 15, 2010 at 18:36, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> What if we:
>
>  - change "reset --hard [<commit>] -- <pathspec>" to internally run the
>   moral equivalent "checkout" without complaining;
>
>  - change "reset --mixed [<commit>] -- <pathspec>" to do the same thing as
>   it has always done without complaining; and
>
>  - make sure "reset --soft [<commit>] -- <pathspec>" barfs loudly.
>
> Do people see major downside?

Generally I'd like to see Git move towards have a more internally consistent UI and less warts.

Doing what you suggest would make git-reset(1) more internally consistent, while duplicating the git-checkout functionality.

So it's a question of whether git-reset should do all reset-y things without complaining, even when that infringes on git-checkout's domain.

I don't know which should be picked, but it's something to consider.

One thing I'd like to see is some documentation showing how we'd like Git to act if we didn't have to worry about backwards compatibility. I sometimes see little warts like mixing of cached/index/stage, but I haven't seen any plan for these sort of things. Are we planning to change some of these things in the future? If so when, and what should be changed?

It's hard to say whether a UI change like this makes sense without the bigger picture.

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 18 in “reset: Better warning message on git reset --mixed <paths>”
  1. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 14, 2010
  2. Jonathan NiederAug 14, 2010
  3. Junio C HamanoAug 15, 2010
  4. Miles BaderAug 15, 2010
  5. Ævar Arnfjörð BjarmasonAug 15, 2010
  6. Junio C HamanoAug 15, 2010
  7. Jonathan NiederAug 15, 2010
  8. Junio C HamanoAug 15, 2010
  9. Ævar Arnfjörð BjarmasonAug 15, 2010
  10. Junio C HamanoAug 15, 2010
  11. Miles BaderAug 16, 2010
  12. Ævar Arnfjörð BjarmasonAug 16, 2010
  13. Ralf EbertAug 15, 2010
  14. Jonathan NiederAug 16, 2010
  15. David FriesAug 15, 2010
  16. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 15, 2010
  17. Junio C HamanoAug 16, 2010
  18. Ævar Arnfjörð BjarmasonAug 16, 2010

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.