Line data Source code
1 : /*! 2 : * \file esys/repo/progress/repophase.cpp 3 : * \brief 4 : * 5 : * \cond 6 : * __legal_b__ 7 : * 8 : * Copyright (c) 2026 Michel Gillet 9 : * Distributed under the MIT License. 10 : * (See accompanying file LICENSE.txt or 11 : * copy at https://opensource.org/licenses/MIT) 12 : * 13 : * __legal_e__ 14 : * \endcond 15 : * 16 : */ 17 : 18 : #include "esys/repo/esysrepo_prec.h" 19 : #include "esys/repo/progress/repophase.h" 20 : 21 : namespace esys::repo::progress 22 : { 23 : 24 1158 : RepoPhase phase_from_fetch_step(git::FetchStep fetch_step) 25 : { 26 1158 : switch (fetch_step) 27 : { 28 : case git::FetchStep::RECEIVING: return RepoPhase::RECEIVING; 29 : case git::FetchStep::RESOLVING: return RepoPhase::RESOLVING; 30 : case git::FetchStep::ENUMERATING: 31 : case git::FetchStep::COUNTING: 32 : case git::FetchStep::COMPRESSING: 33 : case git::FetchStep::TOTAL: 34 : case git::FetchStep::UPDATE_TIPS: return RepoPhase::RECEIVING; 35 : case git::FetchStep::NOT_SET: return RepoPhase::NOT_SET; 36 : default: return RepoPhase::NOT_SET; 37 : } 38 : } 39 : 40 : } // namespace esys::repo::progress