Skip to content

Commit

Permalink
Build in checkout
Browse files Browse the repository at this point in the history
The only differences in behavior should be:

 - git checkout -m with non-trivial merging won't print out
   merge-recursive messages (see the change in t7201-co.sh)

 - git checkout -- paths... will give a sensible error message if
   HEAD is invalid as a commit.

 - some intermediate states which were written to disk in the shell
   version (in particular, index states) are only kept in memory in
   this version, and therefore these can no longer be revealed by
   later write operations becoming impossible.

 - when we change branches, we discard MERGE_MSG, SQUASH_MSG, and
   rr-cache/MERGE_RR, like reset always has.

I'm not 100% sure I got the merge recursive setup exactly right; the
base for a non-trivial merge in the shell code doesn't seem
theoretically justified to me, but I tried to match it anyway, and the
tests all pass this way.

Other than these items, the results should be identical to the shell
version, so far as I can tell.

[jc: squashed lock-file fix from Dscho in]

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Daniel Barkalow authored and Junio C Hamano committed Feb 16, 2008
1 parent c369e7b commit 782c2d6
Show file tree
Hide file tree
Showing 6 changed files with 481 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ BASIC_CFLAGS =
BASIC_LDFLAGS =

SCRIPT_SH = \
git-bisect.sh git-checkout.sh \
git-bisect.sh \
git-clone.sh \
git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
git-pull.sh git-rebase.sh git-rebase--interactive.sh \
Expand Down Expand Up @@ -329,6 +329,7 @@ BUILTIN_OBJS = \
builtin-bundle.o \
builtin-cat-file.o \
builtin-check-attr.o \
builtin-checkout.o \
builtin-checkout-index.o \
builtin-check-ref-format.o \
builtin-clean.o \
Expand Down
Loading

0 comments on commit 782c2d6

Please sign in to comment.