• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ESMCI / manage_externals / 153
86%

Build:
DEFAULT BRANCH: master
Ran 10 Apr 2018 06:44PM UTC
Jobs 5
Files 11
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
153

push

travis-ci

web-flow
Merge pull request #90 from ESMCI/issue-86-detached-sync-status

git: rework logic for determining in-sync and current ref name

Rework two aspects of the logic for git repositories; both of these can
change behavior in some cases when printing status:

1. Determining whether the local checkout is in-sync with the expected
   reference from the configuration file: Now we always convert the
   expected reference to a hash and compare that with the
   currently-checked-out hash. Previously, we sometimes did the
   comparison using names, e.g., just ensuring that you're on the right
   branch.

2. Determining the current ref name (e.g., the branch or tag currently
   checked out). Now we use a number of plumbing commands rather than
   relying on regex parsing of 'git branch -vv'. The previous regex
   parsing was fragile and hard to maintain, and was the source of a
   number of bugs. In addition, differences between git v. 1 and git
   v. 2 meant that the result was incorrect in some cases -
   particularly, in the case where we have "detached from foo" (which is
   the text that always appeared for a detached head in v 1, but in v 2
   means we are no longer at foo).

I have also overhauled the unit tests covering this functionality. Many
tests were no longer needed with the new logic and so I have removed
them. I have added some other tests covering the new functionality.

User interface changes?: Yes
- Subtle changes to status output, as described above
- One particular change is: If we're on a tracking branch,
  `checkout_externals -S -v` will show the name of the local branch
  rather than the tracked branch. (This is more accurate, because we may
  not actually be at the head of the tracking branch.)

Fixes: #86 (Status incorrectly reports in-sync when you have made
commits in detached head state - fixed due to the change in (1)).

Testing:
  test removed: many no-longer-relevant unit tests
  unit tests: pass... (continued)

351 of 406 branches covered (86.45%)

Branch coverage included in aggregate %.

1072 of 1159 relevant lines covered (92.49%)

3.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 153.1 10 Apr 2018 06:44PM UTC 0
90.87
Travis Job 153.1
2 153.2 10 Apr 2018 06:44PM UTC 0
91.02
Travis Job 153.2
3 153.3 10 Apr 2018 06:44PM UTC 0
90.94
Travis Job 153.3
4 153.4 10 Apr 2018 06:44PM UTC 0
90.94
Travis Job 153.4
5 153.5 10 Apr 2018 06:47PM UTC 0
90.87
Travis Job 153.5
Source Files on build 153
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #153
  • 69231197 on github
  • Prev Build on master (#150)
  • Next Build on master (#157)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc