From: Junio C Hamano Date: Tue, 22 Jan 2013 17:36:13 +0000 (-0800) Subject: Merge branch 'mz/reset-misc' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=772f8113988a8ad3a38323c70ecbad1034e9e699;p=git.git Merge branch 'mz/reset-misc' Various 'reset' optimizations and clean-ups, followed by a change to allow "git reset" to work even on an unborn branch. * mz/reset-misc: reset: update documentation to require only tree-ish with paths reset [--mixed]: use diff-based reset whether or not pathspec was given reset: allow reset on unborn branch reset $sha1 $pathspec: require $sha1 only to be treeish reset.c: inline update_index_refresh() reset.c: finish entire cmd_reset() whether or not pathspec is given reset [--mixed]: only write index file once reset.c: move lock, write and commit out of update_index_refresh() reset.c: move update_index_refresh() call out of read_from_tree() reset.c: replace switch by if-else reset: avoid redundant error message reset --keep: only write index file once reset.c: share call to die_if_unmerged_cache() reset.c: extract function for updating {ORIG_,}HEAD reset.c: remove unnecessary variable 'i' reset.c: extract function for parsing arguments reset: don't allow "git reset -- $pathspec" in bare repo reset.c: pass pathspec around instead of (prefix, argv) pair reset $pathspec: exit with code 0 if successful reset $pathspec: no need to discard index --- 772f8113988a8ad3a38323c70ecbad1034e9e699