Github Default Branch

I use github to search the Unreal Engine codebase quite frequently. Github only allows you to search the default branch and you aren’t allowed to search forks of a repository (they aren’t indexed).

It seems more useful to me if I can search master as it has the highest rate of change. Is there a strategy behind the changing of the default branch and can your team discuss the possibility of moving it to master?

Why don’t you just switch your github clone one to default to master and search that? It’s identical. Or clone it to your computer and search through all history it has?

Github doesn’t allow searching clones/forks. Github has amazing search functionality that I can’t replicate locally using any combination of visual studio, cscope and grep.

I’m working out of the stable branch. But when I find issues I try to patch them. The last two patches that I’ve gone to write, I found that they were already fixed when I got into the master branch and pulled down all the code :frowning:

It’s a pretty non trivial and time-consuming effort to pull down the latest code, possibly update your third-party binary dependencies, start a clean branch, write a patch and then build and test it. Getting halfway through the effort and then realizing you’ve been wasting your time because someone has already written the patch is frustrating.

Any free static code analysis tool recommendations are welcome.

Yeah, that sucks, sorry. We don’t want people to see that master is the default branch and to dive straight into using it thinking that it’s our best. They might give up on using source for UE because they hit a compile error that’s fixed 5 minutes after it’s committed. It’s a lot more approachable having the default branch be stable. I think most other GitHub repos do the same thing, but they usually keep master as stable and call their development branch something else.

That is totally understandable. What do you folks use internally to search through the codebase? I just saw a post that referenced wholetomato which I’m grabbing a trial for. Any other tools or visual studio plugins you find useful?

We don’t have anything much better, our latency is probably just lower. Honestly - I’ve been in the same position as you a bunch of times, and I get annoyed in the same way.

We don’t use Git internally at Epic - we use Perforce. Perforce isn’t a DVCS, and it’s built around everyone submitting to one central depot. A lot of the stupid changes you see in master would probably be weeded out by a more hierarchical branch structure, but we’re tied to it for historical reasons if nothing else. It comes up often, but I don’t know of any DVCS that handles binaries well, has good tools, and scales to the number of active developers we have.

I used perforce at another company for a few years, I liked their diff tool but branches seemed unnecessarily complicated and you had to deal with rogue devs checking out the entire codebase on accident to change 1 file :slight_smile: Anyways thanks for your input, none of this is your folks fault, I grabbed wholetomato last night and it’s making code sleuthing quite a bit more manageable. I really have nothing to complain about, the linux folks have been doing this for years with grep, cscope and git.