aboutsummaryrefslogtreecommitdiff
path: root/t/t2020-checkout-detach.sh
Commit message (Collapse)AuthorAge
* status: add advice on how to push/pull to tracking branchMatthieu Moy2012-11-16
| | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/checkout-detach-count'Junio C Hamano2012-05-10
|\ | | | | | | | | | | | | | | | | | | | | | | When checking out another commit from an already detached state, we used to report all commits that are not reachable from any of the refs as lossage, but some of them might be reachable from the new HEAD, and there is no need to warn about them. By Johannes Sixt * js/checkout-detach-count: checkout (detached): truncate list of orphaned commits at the new HEAD t2020-checkout-detach: check for the number of orphaned commits
| * checkout (detached): truncate list of orphaned commits at the new HEADJohannes Sixt2012-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When git checkout switches from a detached HEAD to any other commit, then all orphaned commits were listed in a warning: Warning: you are leaving 2 commits behind...: a5e5396 another fixup 6aa1af6 fixup foo But if the new commit is actually one from this list (6aa1af6 in this example), then the list in the warning can be truncated at the new HEAD, because history beginning at HEAD is not "left behind". This makes it so. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t2020-checkout-detach: check for the number of orphaned commitsJohannes Sixt2012-05-04
| | | | | | | | | | | | | | | | | | | | | | Change the test that orphans commits to leave 2 commits behind. Add a test that leaves only one of these behind. The next patch will truncate the list of orphaned commits earlier. With this preliminary update, its effect will become more obvious. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | test: do not rely on US English tracking-info messagesJonathan Nieder2012-04-14
|/ | | | | | | | | | | | | | When v1.7.9.2~28^2 (2012-02-02) marked "Your branch is behind" and friends for translation, it forgot to adjust tests not to check those messages when tests are being run with git configured to write its output in another language. With this patch applied, t2020 and t6040 pass again with GETTEXT_POISON=YesPlease. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Explained-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout: check for "Previous HEAD" notice in t2020René Scharfe2011-10-03
| | | | | | | | | | If we leave a detached head, exactly one of two things happens: either checkout warns about it being an orphan or describes it as a courtesy. Test t2020 already checked that the warning is shown as needed. This patch also checks for the description. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200Junio C Hamano2011-04-13
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: mark checkout plural warning for translationÆvar Arnfjörð Bjarmason2011-04-12
| | | | | | | | | | | | Mark the "Warning: you are leaving %d commit(s) behind" message added in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD to leave commits behind) by Junio C Hamano for translation. This message requires the use of ngettext() features, and is the first message to use the Q_() wrapper around ngettext(). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout: clear commit marks after detached-orphan checkJeff King2011-03-20
| | | | | | | | | | | | | When leaving a detached HEAD, we do a revision walk to make sure the commit we are leaving isn't being orphaned. However, this leaves crufty marks in the commit objects which can confuse later walkers, like the one in stat_tracking_info. Let's clean up after ourselves to prevent this conflict. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout: add basic tests for detached-orphan warningJeff King2011-03-20
| | | | | | | | | Commit 8e2dc6ac added a warning when we leave a detached HEAD whose commit is not reachable from any ref tip. Let's add a few basic tests to make sure it works. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout: introduce --detach synonym for "git checkout foo^{commit}"Junio C Hamano2011-02-08
For example, one might use this when making a temporary merge to test that two topics work well together. Patch by Junio, with tests from Jeff King. [jn: with some extra checks for bogus commandline usage] Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>