Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
* text=auto
*.rkt text eol=lf
*.scrbl text eol=lf
21 changes: 21 additions & 0 deletions Makefile.rkt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
#lang racket

(require racket-makefile
package-zipper
)


(target all
(displayln "use (make clean) or (make package)")
)

(target clean
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2" #px"([.]bak|~)$" #:recursive #t))
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "libgit2" #px"(compiled|doc)$" #:recursive #t))
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "libgit2/scribblings" #px"[.](css|js|html)$"))
)

(target package
(deps clean)
(zip-package))

8 changes: 4 additions & 4 deletions libgit2/include/blame.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,19 +24,19 @@
([version _uint]
[flags _uint32]
[min_match_chars _uint16]
[newest_commit _git_oid-pointer]
[oldest_commit _git_oid-pointer]
[newest_commit _git_oid]
[oldest_commit _git_oid]
[min_line _size]
[max_line _size]))

(define GIT_BLAME_OPTS_VERSION 1)

(define-cstruct _git_blame_hunk
([lines_in_hunk _size]
[final_commit_id _git_oid-pointer]
[final_commit_id _git_oid]
[final_start_line_number _size]
[final_signature _git_signature-pointer]
[orig_commit_id _git_oid-pointer]
[orig_commit_id _git_oid]
[orig_path _string]
[orig_sart_line_number _size]
[orig_signature _git_signature-pointer]
Expand Down
3 changes: 1 addition & 2 deletions libgit2/include/blob.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,8 +52,7 @@
git_blob_free)

(define-libgit2 git_blob_owner
(_fun _git_blob -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_blob -> _git_repository))

(define-libgit2 git_blob_rawcontent
(_fun _git_blob -> _bytes))
Expand Down
9 changes: 6 additions & 3 deletions libgit2/include/branch.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,10 +70,13 @@
; see https://github.com/libgit2/libgit2/blob/v0.25.1/include/git2/branch.h

(define-libgit2/check git_branch_upstream_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_upstream_remote
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))

(define-libgit2/check git_branch_remote_name
(_fun (_git_buf/bytes-or-null) _git_repository _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_repository _string -> _int
-> out))
12 changes: 6 additions & 6 deletions libgit2/include/checkout.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,11 +52,11 @@
[chmod_calls _size]))

(define _git_checkout_notify_cb
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _bytes -> _int))
(_fun _git_checkout_notify_t _string _git_diff_file-pointer _git_diff_file-pointer _git_diff_file-pointer _pointer -> _int))
(define _git_checkout_progress_cb
(_fun _string _size _size _bytes -> _void))
(_fun _string _size _size _pointer -> _void))
(define _git_checkout_perfdata_cb
(_fun _git_checkout_perfdata-pointer _bytes -> _void))
(_fun _git_checkout_perfdata-pointer _pointer -> _void))

(define-cstruct _git_checkout_opts
;; FIXME: constructor will need a wrapper to
Expand All@@ -69,9 +69,9 @@
[file_open_flags _int]
[notify_flags _uint]
[notify_cb _git_checkout_notify_cb]
[notify_payload _bytes]
[notify_payload _pointer]
[progress_cb _git_checkout_progress_cb]
[progress_payload _bytes]
[progress_payload _pointer]
[paths _git_strarray]
[baseline _git_tree]
[baseline_index _git_index]
Expand All@@ -80,7 +80,7 @@
[our_label _string]
[their_label _string]
[perfdata_cb _git_checkout_perfdata_cb]
[perfdata_payload _bytes]))
[perfdata_payload _pointer]))

; Functions

Expand Down
8 changes: 4 additions & 4 deletions libgit2/include/clone.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,9 +21,9 @@
GIT_CLONE_LOCAL_NO_LINKS)

(define _git_remote_create_cb
(_fun (_cpointer _git_remote) _git_repository _string _string _bytes -> _int))
(_fun (_cpointer _git_remote) _git_repository _string _string _pointer -> _int))
(define _git_repository_create_cb
(_fun (_cpointer _git_repository) _string _int _bytes -> _int))
(_fun (_cpointer _git_repository) _string _int _pointer -> _int))

(define-cstruct _git_clone_opts
([version _uint]
Expand All@@ -33,9 +33,9 @@
[local _git_clone_local_t]
[checkout_branch _string]
[repository_cb _git_repository_create_cb]
[repository_cb_payload _bytes]
[repository_cb_payload _pointer]
[remote_cb _git_remote_create_cb]
[remote_cb_payload _bytes]))
[remote_cb_payload _pointer]))

(define GIT_CLONE_OPTS_VERSION 1)

Expand Down
19 changes: 14 additions & 5 deletions libgit2/include/commit.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,11 @@
(_fun _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))

(define-libgit2/check git_commit_create_buffer
(_fun (_git_buf/bytes-or-null) _git_repository _git_signature-pointer _git_signature-pointer _string _string _git_tree _size (_cpointer (_cpointer _git_commit)) -> _int))
(_fun [out : (_git_buf/bytes-or-null)]
_git_repository _git_signature-pointer _git_signature-pointer
_string _string _git_tree _size (_cpointer (_cpointer _git_commit))
-> _int
-> out))

(define (git_commit_create_v id repo update_ref author committer encoding message tree parent_count . parents)
(define itypes (append (list _git_oid-pointer _git_repository _string _git_signature-pointer _git_signature-pointer _string _string _git_tree _size)
Expand All@@ -57,10 +61,16 @@
git_commit_free)

(define-libgit2/check git_commit_extract_signature
(_fun (_git_buf/bytes-or-null) (_git_buf/bytes-or-null) _git_repository _git_oid-pointer _string -> _int))
(_fun [signature : (_git_buf/bytes-or-null)]
[signed-data : (_git_buf/bytes-or-null)]
_git_repository _git_oid-pointer _string
-> _int
-> (values signature signed-data)))

(define-libgit2/check git_commit_header_field
(_fun (_git_buf/bytes-or-null) _git_commit _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_commit _string
-> _int
-> out))

(define-libgit2 git_commit_id
(_fun _git_commit -> _git_oid-pointer))
Expand All@@ -87,8 +97,7 @@
git_commit_free)

(define-libgit2 git_commit_owner
(_fun _git_commit -> _git_repository)
#:wrap (allocator git_repository_free))
(_fun _git_commit -> _git_repository))

(define-libgit2/alloc git_commit_parent
(_fun _git_commit _git_commit _uint -> _int)
Expand Down
39 changes: 24 additions & 15 deletions libgit2/include/config.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@
(only-in "types.rkt"
_git_config
_git_config_backend
_git_repository
_git_transaction)
"../private/buffer.rkt"
"../private/base.rkt")
Expand All@@ -24,13 +25,14 @@
(define-cstruct _git_config_entry
([name _string]
[value _string]
[include_depth _uint]
[level _git_config_level_t]
[free (_fun _git_config_entry-pointer -> _void)]
[payload _bytes]))
[payload _pointer]))
(define _config_entry _git_config_entry-pointer)

(define _git_config_foreach_cb
(_fun _git_config_entry-pointer _bytes -> _int))
(_fun _git_config_entry-pointer _pointer -> _int))

(define _config_iterator (_cpointer 'git_config_iterator))

Expand All@@ -48,13 +50,13 @@
; Functions

(define-libgit2/check git_config_add_backend
(_fun _git_config _git_config_backend _git_config_level_t _bool -> _int))
(_fun _git_config _git_config_backend _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_add_file_ondisk
(_fun _git_config _string _git_config_level_t _bool -> _int))
(_fun _git_config _string _git_config_level_t (_or-null _git_repository) _bool -> _int))

(define-libgit2/check git_config_backend_foreach_match
(_fun _git_config_backend _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config_backend _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_delete_entry
(_fun _git_config _string -> _int))
Expand All@@ -66,22 +68,26 @@
(_fun _config_entry -> _void))

(define-libgit2/check git_config_find_global
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_programdata
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_system
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_find_xdg
(_fun (_git_buf/bytes-or-null) -> _int))
(_fun [out : (_git_buf/bytes-or-null)] -> _int
-> out))

(define-libgit2/check git_config_foreach
(_fun _git_config _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_foreach_match
(_fun _git_config _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/dealloc git_config_free
(_fun _git_config -> _void))
Expand All@@ -103,16 +109,18 @@
(_fun _int _git_config _string _git_cvar_map-pointer _size -> _int))

(define-libgit2/check git_config_get_multivar_foreach
(_fun _git_config _string _string _git_config_foreach_cb _bytes -> _int))
(_fun _git_config _string _string _git_config_foreach_cb _pointer -> _int))

(define-libgit2/check git_config_get_path
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/alloc git_config_get_string
(_fun _string _git_config _string -> _int))

(define-libgit2/check git_config_get_string_buf
(_fun (_git_buf/bytes-or-null) _git_config _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _git_config _string -> _int
-> out))

(define-libgit2/check git_config_init_backend
(_fun _git_config_backend _uint -> _int))
Expand DownExpand Up@@ -172,7 +180,8 @@
(_fun _int64 _string -> _int))

(define-libgit2/check git_config_parse_path
(_fun (_git_buf/bytes-or-null) _string -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _string -> _int
-> out))

(define-libgit2/check git_config_set_bool
(_fun _git_config _string _bool -> _int))
Expand Down
3 changes: 2 additions & 1 deletion libgit2/include/describe.rkt
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,8 @@
git_describe_result_free)

(define-libgit2/check git_describe_format
(_fun (_git_buf/bytes-or-null) _describe_result _git_describe_format_opts-pointer/null -> _int))
(_fun [out : (_git_buf/bytes-or-null)] _describe_result _git_describe_format_opts-pointer/null -> _int
-> out))

(define-libgit2/alloc git_describe_workdir
(_fun _describe_result _git_repository _git_describe_opts-pointer/null -> _int)
Expand Down
Loading