summaryrefslogtreecommitdiff
path: root/t/t2017-checkout-orphan.sh
AgeCommit message (Collapse)AuthorFilesLines
2010-07-21tests: correct "does reflog exist?" testsLibravatar Junio C Hamano1-39/+8
These two tests weren't about how "git reflog show <branch>" exits when there is no reflog, but were about "checkout" and "branch" create or not create reflog when creating a new <branch>. Update the tests to check what we are interested in, using "git rev-parse --verify". Also lose tests based on "test -f .git/logs/refs/heads/<branch>" from nearby, to avoid exposing this particular implementation detail unnecessarily. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-21t/: work around one-shot variable assignment with test_must_failLibravatar Brandon Casey1-6/+30
See e2007832552ccea9befed9003580c494f09e666e Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-03checkout --orphan: respect -l option alwaysLibravatar Erick Mattos1-21/+57
Added changes to satisfy a corner case: creating reflogs by using -l when core.logAllRefUpdates is set to false. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21git checkout: create unparented branch by --orphanLibravatar Erick Mattos1-0/+90
Similar to -b, --orphan creates a new branch, but it starts without any commit. After running "git checkout --orphan newbranch", you are on a new branch "newbranch", and the first commit you create from this state will start a new history without any ancestry. "git checkout --orphan" keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch. When creating a branch whose trees have no resemblance to the ones from the original branch, it may be easier to start work on the new branch by untracking and removing all working tree files that came from the original branch, by running a 'git rm -rf .' immediately after running "checkout --orphan". Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>