Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchGit: Fix handling of local repo when not using 'master' branch #1755

Merged
merged 1 commit into from Dec 27, 2017

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Dec 22, 2017

Add tests checking this behavior.

Currently, fetchGit behavior does the following when working on a local git checkout (with branches "master" and "dev"):

  • fetchGit ./., HEAD=master, clean: -> master
  • fetchGit ./., HEAD=master, dirty -> master+changes to tracked files
  • fetchGit ./., HEAD=dev, clean -> master (!!)
  • fetchGit ./., HEAD=dev, dirty -> dev+changes to tracked files

This PR changes behavior so that the item marked (!!) above follows the pattern and uses "dev" instead of "master".

This is particularly relevant as of 6d80870: cloning nix, checking out a branch, committing changes, and then using release.nix to test it.... results in building 'master' instead! 馃槙

Copy link
Member

@shlevy shlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge mid-week barring objection.

@shlevy shlevy merged commit 2e6f06c into NixOS:master Dec 27, 2017
@dtzWill dtzWill deleted the fix/fetchGit-clean-branch branch January 29, 2018 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants