Skip to content

Commit

Permalink
Add support for SHA-256 object format
Browse files Browse the repository at this point in the history
Actually cgit doesn't support SHA-256 object format for now because it
uses older bundled git.
However from the perspective of fugitive-cgit it's easy to support it,
so let's do it and prepare for the SHA-256 support of cgit in the future.
  • Loading branch information
sudotac committed May 5, 2024
1 parent f74d0bd commit b722752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/cgit/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function! cgit#fugitive#handler(opts, ...)
endif

" check if 'commit' is actually commit-id or not.
" FIXME: cannot handle the branch name which consists of 40 character hex string.
" FIXME: cannot handle the branch name which consists of 40 or 64 character hex string.
" It's technically possible, though I haven't seen such a branch name...
if commit =~# '^\x\{40\}'
if commit =~# '^\x\{40\}$' || commit =~# '^\x\{64\}$'
let key = 'id'
else
let key = 'h'
Expand Down

0 comments on commit b722752

Please sign in to comment.