wojtek opened 2 years ago
|
|||||
Robin Shen changed state to 'Closed' 2 years ago
|
|||||
This is by design. OneDev build always runs against fixed commit. Runs "git fetch origin master" if you want to do something on branches. |
|||||
I'm aware it runs against fixed commit and it makes perfect sense, though even in detached HEAD state I should be able to do things with git so I'm wondering what's different in case of 1dev and errors without |
|||||
There is no branch/tag retrieved by default to save time. So if you do something against branch/tag, it will show some errors unless you fetch them first. This is normal. |
|||||
OK, but branch/tag is miniscule compared to history, and during build by default you clone whole repository either way so why skimp on branch/tag retrieval if it doesn't make a difference in comparison? |
|||||
I filed an improvement request to switch repository to current branch instead of detached head: Issue #925 |
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Affected Versions |
Not Found
|
I was trying to perform some actions getting information from git repository only to realise that git repository during build is somewhat odd - it's in detached state (which is fine) but no branch nor tag is available. Running first
git fetch
resolves the issue. At first I was thinking it was caused byShallow copy
but no such option is set thus no shallow copy is performed (and git seems to think it's not shallow copied because throws an error when we include--unshallow
ingit fetch
.Is it by design? Could it be made that git repository during build behaves like any normal git repository after clone?