Skip to content

Instantly share code, notes, and snippets.

@ben
Created November 15, 2012 21:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben/4081592 to your computer and use it in GitHub Desktop.
Save ben/4081592 to your computer and use it in GitHub Desktop.
libgit2 summit notes

Roadmap to 1.0

What does 1.0 mean?

  • Public API stability
  • Consistency
  • Backporting fixes to past release branches
  • Semantic Versioning
  • Certain set of functionality
  • Vision: make it easy to do interesting things with git

What's missing?

Pre-1.0 (Need API design)

  • Merge (Ed)
  • Push (Michael + Phillip)
  • SSH transport (Michael)
  • Cherry-pick (?)
  • git_context_init (see below) (vmg)

Post 1.0-preview1

  • Test coverage (Emeric +1 MSFT)
  • Reflog - update on ref change, write api is internal-only (Emeric)
  • Audit error returns, kill GIT_EINVALID
  • Security audit
    • join_path escaping workdir
  • Documentation & website
    • Coordinate with libgit2sharp, objective-git, pygit, rugged
  • Filesystem issues
    • core.precomposeunicode (HFS+)
    • case sensitivity/preservation
  • Audit git-config man page (Peff will help)
  • Make cache not suck

Post 1.0

  • Rebase
  • Custom filters
  • Blame
  • Refs backends
    • Reflog backend
  • git_repository_open w/o filesystem
  • Create commits without index
  • Rename detection
  • Hook callbacks
  • Warnings
  • path-limited revwalk

Timeline

Global/static data

  • git_context_init
  • Pass context only to constructors; other objects store a reference to the context. Shouldn't be too instrusive.

CONTRIBUTING

  • pulling code in from other libraries
    • gpl: clear signoff from author
    • etc.

Security

  • MS SCI -> banned APIs

Styleguide

  • Parameter order - out(s) first
  • Const usage
    • git_repository* is almost never consted
  • Error returns
  • Documentation quality
  • Typedefing
    • function pointers
  • Option structures
  • Callback parameters
    • "payload"
    • payload is last parameter
  • Use "_id" for oid api names
  • Memory ownership transfer
  • naming: order of things
  • enums
    • enum type for single values
    • masks use unsigned int as the parameter type
  • Out parameters on failure; fill with zeros if possible
  • Version numbers for transparent structures
    • typedefs for older versions
    • try to only append to the end
  • Operations that could be done with a temp. index

Native

  • What is the lifetime of a repo object?
    • Filewatching not in libgit2; this belongs in bindings or app
    • Public api for expected filenames to watch
  • 1.1 idea: iterator apis for everything that's callback-only now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment