hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Git repository input should fetch the default branch by default

Open expipiplus1 opened this issue 9 years ago • 4 comments

At the moment if no branch is specified it fetches master. https://github.com/NixOS/hydra/blob/master/src/lib/Hydra/Plugin/GitInput.pm#L70

expipiplus1 avatar Jun 12 '16 12:06 expipiplus1

@expipiplus1 so if branch is not specified, it should just be omitted?

domenkozar avatar Jun 12 '16 19:06 domenkozar

@domenkozar yes, I think that'll do the right thing.

expipiplus1 avatar Jun 12 '16 19:06 expipiplus1

Just ran into this. The default is still master (https://github.com/NixOS/hydra/blob/master/src/lib/Hydra/Plugin/GitInput.pm#L31) instead of the actual default branch.

ajs124 avatar May 28 '21 00:05 ajs124

To fix this we'll need to identify the name of the branch that has been fetched. This is because the name of the branch is an input to the evaluation, and is therefor also an input in to the caching. Ideally the fix for this also comes with a test.

grahamc avatar Aug 17 '21 14:08 grahamc