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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Regarding the various modes that are forbidden with "reset", I've been
> wondering if we can do things differently.

After being very happy about finding the
'soft-mixed-hard-path-cheat-sheet' table in 0e5a7fa (mentioned in Ævars
message that triggered the discussion)

reset:  --soft  --mixed  --hard  -- <paths>
HEAD       X       X        X        -
index      -       X        X        X
files      -       -        X        -

I was wondering:

Wouldn't the common reset soft/mixed/hard with path/commit operations
become a lot more intuitive by separating the "(1) copy [partially] from
HEAD to index [to working tree]" operation and the "(2) change HEAD and
do (1)" operation? Just as a very rough scribble of what I mean, like
this:

git wipe [<path>]            # git reset [<file>]; git checkout [<file>]
git wipe [<path>] --index-only           # git reset [--mixed] [<path>]

git set-head <commit>                    # git reset --soft [<commit>]
git set-head <commit> --wipe             # git reset --hard [<commit>]
git set-head <commit> --wipe-index-only  # git reset --mixed [<commit>]

(I know that git reset can do more than that, but this is everything I
ever wanted as porcelain-only user from git reset, thought maybe the
idea could be of use without being fully elaborated)

--
Ralf

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]