James Moger
2011-07-22 a2709dd91e5d6b18f573016882ccc70799573ad3
refs
author James Moger <james.moger@gitblit.com>
Friday, July 22, 2011 17:47 -0400
committer James Moger <james.moger@gitblit.com>
Friday, July 22, 2011 17:47 -0400
commita2709dd91e5d6b18f573016882ccc70799573ad3
tree 6b87a08d65c462d9f51b253e7deafb95c7167bbb tree | zip | gz
parent b1dba764c201f4708b82767b2d91edb6e189ce6f view | diff
Centralize default branch/HEAD resolution (issue-14)

If an object id was not specified Gitblit used HEAD to perform the
operation. This breaks under some conditions like working with a
repository that does not have any commits on master but does have
commits on a vcs-import branch.

The new approach is to centralize the resolution of unspecified object
ids to a common method which resolves HEAD first but uses the most
recently modified branch if HEAD points to nothing.

This commit also includes a non-functional method for creating an empty
branch. I couldn't figure out how to make JGit create an orphaned
branch.
19 files modified
439 ■■■■ changed files
distrib/users.properties 4 ●●●● diff | view | raw | blame | history
docs/00_index.mkd 1 ●●●● diff | view | raw | blame | history
docs/04_releases.mkd 1 ●●●● diff | view | raw | blame | history
src/com/gitblit/GitBlitServer.java 2 ●●● diff | view | raw | blame | history
src/com/gitblit/utils/DiffUtils.java 33 ●●●●● diff | view | raw | blame | history
src/com/gitblit/utils/FileUtils.java 22 ●●●●● diff | view | raw | blame | history
src/com/gitblit/utils/JGitUtils.java 195 ●●●● diff | view | raw | blame | history
src/com/gitblit/utils/MetricUtils.java 60 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/WicketUtils.java 25 ●●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/CommitDiffPage.java 24 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/CommitPage.java 27 ●●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/DocsPage.java 4 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/RepositoryPage.java 4 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/TicketsPage.java 4 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/pages/TreePage.java 9 ●●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/panels/BranchesPanel.java 5 ●●●● diff | view | raw | blame | history
src/com/gitblit/wicket/panels/RepositoriesPanel.java 7 ●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/GitBlitTest.java 3 ●●●● diff | view | raw | blame | history
tests/com/gitblit/tests/JGitUtilsTest.java 9 ●●●●● diff | view | raw | blame | history