MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029013Open CASCADE[OCCT] TOOLS:Jenkins Certification Toolpublic2017-08-18 10:052017-08-18 16:49
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029013: Jenkins Certification Tool - optimize git checkout
DescriptionWhile looking for a log of git checkout command, I've noticed that current procedure performs unnecessary steps
[Took 1 min 59 sec on debian8-03]:
...
++ git fetch --all
Fetching origin
From git.dev.opencascade.org:occt
   c765ab6..dfdfa61  master     -> origin/master
 * [new branch]      CR0-710-CEVT -> origin/CR0-710-CEVT
   079b936..4654adf  CR0-710-CRFRM -> origin/CR0-710-CRFRM
 * [new branch]      CR0-710-FixAS_1 -> origin/CR0-710-FixAS_1
 * [new branch]      CR0-IR-2017-06-08 -> origin/CR0-IR-2017-06-08
.... <<< A LOT OF BRANCHES HERE !!!
 * [new tag]         V_01_2017_06_30 -> V_01_2017_06_30
++ git reset --hard origin/master
Checking out files:   0% (157/34108)   
Checking out files:   0% (262/34108)   
...
Checking out files: 100% (34108/34108)   
Checking out files: 100% (34108/34108), done.
HEAD is now at dfdfa61 Update of tests database
++ git reset --hard HEAD
HEAD is now at dfdfa61 Update of tests database
++ git clean -f -d
++ git pull
Already up-to-date.
++ test CR29011 '!=' master
++ git checkout -b CR29011 origin/CR29011
Switched to a new branch 'CR29011'
Branch CR29011 set up to track remote branch CR29011 from origin.
++ git log origin/CR29011
++ head -1
commit a25d3845d03240d11048e4b74dce108895f83ed2
++ git branch
* CR29011
  master


In particular, git fetches ALL updates from remote, while only one branch will be used.
The following procedure might be considered instead:
git fetch origin CR29011 --depth=1
git checkout --detach origin/CR29011 --force
git reset --hard HEAD
git log origin/CR29011 head -1

Steps To ReproduceN/A
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(0069577)
bugmaster (administrator)
2017-08-18 14:15

On Windows and MacOS works well.
On Linux:
++ cd /dn62/builds//IR-2017-07-28_IR-2017-07-28//OCCT_SRC
++ test IR-2017-07-28 '!=' master
++ git fetch origin IR-2017-07-28 --depth=1
From git.dev.opencascade.org:occt
 * branch IR-2017-07-28 -> FETCH_HEAD
++ git checkout --detach origin/IR-2017-07-28 --force
fatal: git checkout: --detach does not take a path argument
(0069595)
bugmaster (administrator)
2017-08-18 16:49

I added Fedora 24 with
++ git --version
git version 2.7.4

Procedure works well on all platforms

- Issue History
Date Modified Username Field Change
2017-08-18 10:05 kgv New Issue
2017-08-18 10:05 kgv Assigned To => bugmaster
2017-08-18 14:15 bugmaster Note Added: 0069577
2017-08-18 14:15 bugmaster Status new => feedback
2017-08-18 16:49 bugmaster Note Added: 0069595
2017-08-18 16:49 bugmaster Status feedback => closed
2017-08-18 16:49 bugmaster Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker