keybase / keybase/client

[Git] Add ability to "View files" on non-master branches

Open
#23,503 0 comments 7 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

Using client GUI version `5.3.1-20200320154633.3e235215b3` on Linux, the "View files" button for a Git repo seems to only show the contents of the `master` branch. If `master` doesn't exist, nothing is displayed in the client, except:
![image](https://user-images.githubusercontent.com/1757771/78506200-0136b500-7746-11ea-9f19-232a02b5fcdd.png)

This is vaguely related to #22929 and #16508, but instead dealing with the client GUI. This improvement would benefit anyone using branch methodologies that rely on non-`master` branches, like [Git Flow](https://nvie.com/posts/a-successful-git-branching-model/).

One possible implementation is to introduce a dropdown in the client GUI that lists all branches. Normally, this dropdown would default to `master`, if it exists. But if it doesn't, it would default to the remote `HEAD` reference (assuming that exists). The dropdown's selection (e.g. a branch like `develop`) would cause something like this on the backend:
```
ls /keybase/team/$TEAM/.kbfs_autogit/$REPO/.kbfs_autogit_branch_develop
```
...to display the contents of the `develop` branch in the client GUI.

Theoretically, the dropdown could be expanded to include all Git refs (not just branches, but tags as well). However, that would require updates to the KBFS Git backend.

To all maintainers and contributors, thanks for a great tool!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the client GUI's "View files" flow and the KBFS Git backend behavior described in the issue, including the .kbfs_autogit_branch_develop path. Determine how branches are discovered and selected when master is absent. Done means the GUI can display a selected non-master branch and handles a repository whose master branch does not exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.