git/contrib/examples
Carlos Rica 0e5a7faa3a Make "git reset" a builtin.
This replaces the script "git-reset.sh" with "builtin-reset.c".

A few git commands used in the script are called from the builtin also:
"ls-files" to check for unmerged files, "read-tree" for resetting
the index file in "mixed" and "hard" resets, and "update-index" to
refresh at the end in the "mixed" reset and also for the option that
gets selected paths into the index.

The reset option with paths was implemented by Johannes Schindelin.

Since the option that gets selected paths into the index is not
a "reset" like the others because it does not change the HEAD at all,
now the command is showing a warning when the "--mixed" option
is supplied for that purpose.

The following table shows the behaviour of "git reset" for
the different supported options, where X means "changing"
the HEAD, index or working tree:

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

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-12 13:25:07 -07:00
..
git-gc.sh Rewrite "git-frotz" to "git frotz" 2007-07-02 22:52:14 -07:00
git-reset.sh Make "git reset" a builtin. 2007-09-12 13:25:07 -07:00
git-resolve.sh Rewrite "git-frotz" to "git frotz" 2007-07-02 22:52:14 -07:00
git-tag.sh Make git tag a builtin. 2007-07-20 01:27:25 -07:00
git-verify-tag.sh Make verify-tag a builtin. 2007-07-26 22:51:27 -07:00