c-git-compatibility.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. .. _c-git-compatibility:
  2. ========================
  3. C Git Compatibility
  4. ========================
  5. This document lists Git functionality and indicates what Dulwich supports.
  6. Dulwich is a pure Python implementation of Git that provides wire-format
  7. and repository format compatibility with C Git.
  8. Legend:
  9. * ✓ - Fully supported
  10. * ◐ - Partially supported
  11. * ✗ - Not supported
  12. Main Porcelain Commands
  13. ========================
  14. Repository Management
  15. ---------------------
  16. * ✓ ``git init`` - Initialize repository
  17. * ✓ ``git clone`` - Clone repository
  18. * ✓ ``git config`` - Read and write configuration
  19. Working with Files
  20. ------------------
  21. * ✓ ``git add`` - Add file contents to the index
  22. * ✓ ``git rm`` - Remove files from working tree and index
  23. * ✓ ``git mv`` - Move or rename file, directory, or symlink
  24. * ✓ ``git restore`` - Restore working tree files
  25. * ✓ ``git reset`` - Reset current HEAD to specified state
  26. * ✓ ``git clean`` - Remove untracked files
  27. Commits
  28. -------
  29. * ✓ ``git commit`` - Record changes to the repository
  30. * ✓ ``git show`` - Show various types of objects
  31. * ✓ ``git log`` - Show commit logs
  32. * ✓ ``git shortlog`` - Summarize git log output
  33. * ✓ ``git describe`` - Describe a commit using the most recent tag
  34. * ✓ ``git annotate`` - Annotate file lines with commit information
  35. * ✓ ``git blame`` - Show what revision and author last modified each line
  36. * ✗ ``git citool`` - Graphical alternative to git-commit
  37. * ✗ ``gitk`` - Git repository browser
  38. Branches
  39. --------
  40. * ✓ ``git branch`` - List, create, or delete branches
  41. * ✓ ``git checkout`` - Switch branches or restore working tree files
  42. * ✓ ``git switch`` - Switch branches
  43. * ✓ ``git show-branch`` - Show branches and their commits
  44. * ✓ ``git worktree`` - Manage multiple working trees
  45. Tags
  46. ----
  47. * ✓ ``git tag`` - Create, list, delete, or verify tags
  48. * ✓ ``git verify-tag`` - Check GPG/SSH signature of tags
  49. * ✓ ``git verify-commit`` - Check GPG/SSH signature of commits
  50. Merging
  51. -------
  52. * ✓ ``git merge`` - Join two or more development histories
  53. * ✓ ``git merge-base`` - Find common ancestor for merge
  54. * ✗ ``git mergetool`` - Run merge conflict resolution tool interactively
  55. * ✓ ``git rebase`` - Reapply commits on top of another base tip
  56. * ◐ ``git rebase -i`` - Interactive rebase (limited support)
  57. * ✓ ``git cherry-pick`` - Apply changes introduced by existing commits
  58. * ✓ ``git revert`` - Revert existing commits
  59. * ✓ ``git cherry`` - Find commits not merged upstream
  60. Remotes
  61. -------
  62. * ✓ ``git fetch`` - Download objects and refs from another repository
  63. * ✓ ``git pull`` - Fetch from and integrate with another repository
  64. * ✓ ``git push`` - Update remote refs along with associated objects
  65. * ✓ ``git remote`` - Manage set of tracked repositories
  66. * ✓ ``git ls-remote`` - List references in a remote repository
  67. Inspection
  68. ----------
  69. * ✓ ``git status`` - Show the working tree status
  70. * ✓ ``git diff`` - Show changes between commits, commit and working tree, etc
  71. * ✓ ``git grep`` - Print lines matching a pattern
  72. * ✓ ``git bisect`` - Use binary search to find commit that introduced a bug
  73. Patching
  74. --------
  75. * ✓ ``git format-patch`` - Prepare patches for email submission
  76. * ✗ ``git am`` - Apply series of patches from mailbox
  77. * ✗ ``git apply`` - Apply patch to files
  78. * ✓ ``git mailsplit`` - Simple UNIX mbox splitter program
  79. * ✓ ``git mailinfo`` - Extracts patch and authorship from a single email
  80. * ✗ ``git send-email`` - Send collection of patches as emails
  81. * ✗ ``git request-pull`` - Generate summary of pending changes
  82. Debugging
  83. ---------
  84. * ✓ ``git fsck`` - Verify connectivity and validity of objects
  85. * ✓ ``git check-ignore`` - Debug gitignore / exclude files
  86. * ✓ ``git check-mailmap`` - Show canonical names and email addresses
  87. * ✗ ``git instaweb`` - Instantly browse your working repository
  88. Administration
  89. --------------
  90. * ✓ ``git gc`` - Cleanup unnecessary files and optimize repository
  91. * ✓ ``git reflog`` - Manage reflog information
  92. * ✓ ``git filter-branch`` - Rewrite branches
  93. * ✓ ``git maintenance`` - Run tasks to optimize Git repository data
  94. * ✓ ``git prune`` - Prune all unreachable objects
  95. * ✓ ``git repack`` - Pack unpacked objects in a repository
  96. * ✓ ``git count-objects`` - Count unpacked number of objects
  97. Server Side
  98. -----------
  99. * ✓ ``git daemon`` - A really simple server for Git repositories
  100. * ✓ ``git update-server-info`` - Update auxiliary info file
  101. * ✓ ``git upload-pack`` - Send objects packed back to git-fetch-pack
  102. * ✓ ``git receive-pack`` - Receive what is pushed into the repository
  103. Other
  104. -----
  105. * ✓ ``git archive`` - Create archive of files from named tree
  106. * ✓ ``git bundle`` - Create, unpack, and manipulate bundle files
  107. * ✓ ``git stash`` - Stash changes in dirty working directory
  108. * ✓ ``git submodule`` - Initialize, update or inspect submodules
  109. * ✓ ``git notes`` - Add or inspect object notes
  110. * ✓ ``git replace`` - Create, list, delete refs to replace objects
  111. * ✓ ``git rerere`` - Reuse recorded resolution of conflicted merges
  112. * ✓ ``git help`` - Display help information
  113. * ◐ ``git fast-export`` - Export repository data (API only, see fastexport module)
  114. * ◐ ``git fast-import`` - Import repository data (API only, see fastexport module)
  115. * ✗ ``git gui`` - Portable graphical interface to Git
  116. * ✗ ``git web--browse`` - Launch web browser to view HTML documentation
  117. * ✗ ``git difftool`` - Show changes using external diff tool
  118. * ✗ ``git range-diff`` - Compare two commit ranges
  119. * ✗ ``git bugreport`` - Collect information for bug reports
  120. * ✓ ``git diagnose`` - Display diagnostic information about the environment
  121. * ✗ ``git fsmonitor--daemon`` - Filesystem monitor daemon
  122. * ✗ ``git scalar`` - Manage large Git repositories
  123. Plumbing Commands
  124. =================
  125. Manipulation
  126. ------------
  127. * ✗ ``git apply`` - Apply patch to files
  128. * ◐ ``git checkout-index`` - Copy files from index to working tree (API only)
  129. * ✓ ``git commit-tree`` - Create new commit object
  130. * ◐ ``git hash-object`` - Compute object ID (API only)
  131. * ◐ ``git index-pack`` - Build pack index file (API only)
  132. * ◐ ``git merge-file`` - Run three-way file merge (API only)
  133. * ✓ ``git merge-tree`` - Show three-way merge without touching index
  134. * ◐ ``git mktag`` - Create tag object (API only)
  135. * ✓ ``git pack-objects`` - Create packed archive of objects
  136. * ◐ ``git prune-packed`` - Remove extra objects (API only)
  137. * ◐ ``git read-tree`` - Read tree information into index (API only)
  138. * ✓ ``git symbolic-ref`` - Read, modify and delete symbolic refs
  139. * ✓ ``git unpack-objects`` - Unpack objects from packed archive
  140. * ◐ ``git update-index`` - Register file contents in working tree to index (API only)
  141. * ◐ ``git update-ref`` - Update object name stored in a ref (API only)
  142. * ✓ ``git write-tree`` - Create tree object from current index
  143. * ✗ ``git mktree`` - Build tree object from ls-tree formatted text
  144. Interrogation
  145. -------------
  146. * ◐ ``git cat-file`` - Provide content or type and size information (API only)
  147. * ◐ ``git diff-files`` - Compare files in working tree and index (API only)
  148. * ◐ ``git diff-index`` - Compare content and mode of blobs (API only)
  149. * ✓ ``git diff-tree`` - Compare content and mode of trees
  150. * ✓ ``git for-each-ref`` - Output information on each ref
  151. * ✓ ``git ls-files`` - Show information about files in index and working tree
  152. * ✓ ``git ls-remote`` - List references in remote repository
  153. * ✓ ``git ls-tree`` - List contents of tree object
  154. * ✓ ``git merge-base`` - Find common ancestor
  155. * ◐ ``git name-rev`` - Find symbolic names for revisions (API only)
  156. * ✓ ``git pack-refs`` - Pack heads and tags for efficient repository access
  157. * ✓ ``git rev-list`` - List commit objects in reverse chronological order
  158. * ◐ ``git rev-parse`` - Pick out and massage parameters (API only, see objectspec module)
  159. * ◐ ``git show-index`` - Show packed archive index (API only)
  160. * ✓ ``git show-ref`` - List references in local repository
  161. * ✓ ``git var`` - Show Git logical variable
  162. * ◐ ``git verify-pack`` - Validate packed Git archive files (API only)
  163. Syncing
  164. -------
  165. * ◐ ``git fetch-pack`` - Receive missing objects from another repository (CLI available)
  166. * ◐ ``git http-fetch`` - Download from remote Git repository via HTTP (API only)
  167. * ◐ ``git send-pack`` - Push objects over Git protocol to another repository (API only)
  168. * ✓ ``git update-server-info`` - Update auxiliary info for dumb servers
  169. * ✗ ``git http-push`` - Push objects over HTTP to another repository
  170. * ✗ ``git upload-archive`` - Send archive back to git-archive
  171. Pack Management
  172. ---------------
  173. * ◐ ``git multi-pack-index`` - Manage multi-pack-index (API only, see midx module)
  174. Internal Helpers
  175. ----------------
  176. * ◐ ``git check-attr`` - Display gitattributes information (API only, see attrs module)
  177. * ✓ ``git check-ignore`` - Debug gitignore / exclude files
  178. * ✓ ``git check-mailmap`` - Show canonical names and email addresses
  179. * ✓ ``git column`` - Display data in columns
  180. * ◐ ``git credential`` - Retrieve and store user credentials (basic support)
  181. * ✗ ``git fmt-merge-msg`` - Produce merge commit message
  182. * ✓ ``git interpret-trailers`` - Add or parse structured information in commit messages
  183. * ✓ ``git mailinfo`` - Extract patch and authorship from single email message
  184. * ✓ ``git mailsplit`` - Simple UNIX mbox splitter
  185. * ✗ ``git merge-one-file`` - Standard helper program to use with git-merge-index
  186. * ◐ ``git patch-id`` - Compute unique ID for patch (API only, see patch module)
  187. * ✓ ``git stripspace`` - Remove unnecessary whitespace
  188. * ✗ ``git sh-setup`` - Common Git shell script setup code
  189. * ✗ ``git sh-i18n`` - Git's i18n setup code for shell scripts
  190. File Formats & Protocols
  191. =========================
  192. Repository Format
  193. -----------------
  194. * ✓ Object storage (loose objects)
  195. * ✓ Pack files (.pack)
  196. * ✓ Pack indexes (.idx)
  197. * ✓ Multi-pack index (.midx)
  198. * ✓ Pack bitmaps
  199. * ✓ Commit graphs
  200. * ✓ SHA-1 object format
  201. * ✓ SHA-256 object format
  202. * ✓ Reftable format
  203. Configuration Files
  204. -------------------
  205. * ✓ .git/config
  206. * ✓ .gitignore
  207. * ✓ .gitattributes
  208. * ✓ .mailmap
  209. * ✓ .git/info/exclude
  210. * ✓ .git/info/attributes
  211. * ✓ .gitmodules
  212. Ref Storage
  213. -----------
  214. * ✓ Loose refs (refs/heads/, refs/tags/, etc.)
  215. * ✓ Packed refs (packed-refs)
  216. * ✓ Reflog
  217. * ✓ Reftable
  218. Network Protocols
  219. -----------------
  220. * ✓ SSH protocol
  221. * ✓ Git protocol (git://)
  222. * ✓ HTTP/HTTPS (smart protocol)
  223. * ✓ HTTP/HTTPS (dumb protocol)
  224. * ✓ File protocol (file://)
  225. * ✓ Local repositories
  226. * ◐ Protocol v2 (client fetch only, server limited)
  227. Transfer Capabilities
  228. ---------------------
  229. Fetch/Upload-Pack:
  230. * ✓ thin-pack - Server: ✓, Client: ✓
  231. * ✓ ofs-delta - Server: ✓, Client: ✓
  232. * ✓ multi_ack - Server: ✓, Client: ✓
  233. * ✓ multi_ack_detailed - Server: ✓, Client: ✓
  234. * ✓ side-band-64k - Server: ✓, Client: ✓
  235. * ✓ shallow - Server: ✓, Client: ✓
  236. * ✓ deepen-since - Server: ✓, Client: ✓
  237. * ✓ deepen-not - Server: ✓, Client: ✓
  238. * ✓ deepen-relative - Server: ✓, Client: ✓
  239. * ✓ include-tag - Server: ✓, Client: ✓
  240. * ◐ no-progress - Server: ✓, Client: ✗
  241. * ✓ symref - Server: ✓, Client: ✓
  242. * ◐ filter - Server: ✓, Client: ◐ (basic support)
  243. Push/Receive-Pack:
  244. * ✓ report-status - Server: ✓, Client: ✓
  245. * ✓ delete-refs - Server: ✓, Client: ✓
  246. * ✓ quiet - Server: ✓, Client: ✓
  247. * ✓ atomic - Server: ✓, Client: ✓
  248. * ✓ ofs-delta - Server: ✓, Client: ✓
  249. * ✓ side-band-64k - Server: ✓, Client: ✓
  250. General:
  251. * ✓ object-format - Server: ✓, Client: ✓
  252. * ✓ agent - Server: ✓, Client: ✓
  253. Advanced Features
  254. =================
  255. Signatures
  256. ----------
  257. * ✓ GPG commit signing
  258. * ✓ GPG tag signing
  259. * ✓ GPG signature verification (verify-commit, verify-tag)
  260. * ✓ SSH commit signing
  261. * ✓ SSH tag signing
  262. * ✓ SSH signature verification
  263. Filters & Attributes
  264. --------------------
  265. * ✓ Clean/smudge filters
  266. * ✓ Text/binary detection
  267. * ✓ End-of-line conversion (CRLF/LF)
  268. * ✓ .gitattributes processing
  269. * ✗ Working tree encoding
  270. * ✓ Whitespace handling
  271. Hooks
  272. -----
  273. * ✓ Hook execution
  274. * ✓ pre-commit
  275. * ✗ prepare-commit-msg
  276. * ✓ commit-msg
  277. * ✓ post-commit
  278. * ✗ pre-rebase
  279. * ✗ post-checkout
  280. * ✗ post-merge
  281. * ✗ pre-push
  282. * ✗ pre-receive
  283. * ✗ update
  284. * ✓ post-receive
  285. * ✗ post-update
  286. * ✗ push-to-checkout
  287. Git LFS
  288. -------
  289. * ✓ git-lfs init
  290. * ✓ git-lfs track
  291. * ✓ git-lfs untrack
  292. * ✓ git-lfs ls-files
  293. * ✓ git-lfs fetch
  294. * ✓ git-lfs pull
  295. * ✓ git-lfs push
  296. * ✗ git-lfs checkout
  297. * ✓ git-lfs clean (filter)
  298. * ✓ git-lfs smudge (filter)
  299. * ◐ git-lfs pointer (API only via lfs_pointer_check)
  300. * ✓ git-lfs migrate
  301. * ✓ git-lfs status
  302. * ✓ LFS server implementation
  303. * ✓ LFS batch API
  304. Sparse Checkout
  305. ---------------
  306. * ✓ Sparse checkout patterns
  307. * ✓ Cone mode
  308. * ✓ git sparse-checkout init (cone mode)
  309. * ✓ git sparse-checkout set
  310. * ✓ git sparse-checkout add
  311. * ◐ git sparse-checkout list (via API only)
  312. * ◐ git sparse-checkout disable (via API only)
  313. * ✗ git sparse-checkout reapply
  314. Worktrees
  315. ---------
  316. * ✓ git worktree add
  317. * ✓ git worktree list
  318. * ✓ git worktree remove
  319. * ✓ git worktree prune
  320. * ✓ git worktree lock
  321. * ✓ git worktree unlock
  322. * ✓ git worktree move
  323. * ✓ git worktree repair
  324. Submodules
  325. ----------
  326. * ✓ git submodule add
  327. * ✓ git submodule init
  328. * ✓ git submodule update
  329. * ◐ git submodule status (basic)
  330. * ✗ git submodule summary
  331. * ✗ git submodule foreach
  332. * ✗ git submodule sync
  333. * ✗ git submodule deinit
  334. * ✗ git submodule absorbgitdirs
  335. Notes
  336. -----
  337. * ✓ git notes add
  338. * ✓ git notes list
  339. * ✓ git notes show
  340. * ✓ git notes remove
  341. * ✗ git notes append
  342. * ✗ git notes copy
  343. * ✗ git notes merge
  344. * ✗ git notes prune
  345. * ✗ git notes get-ref
  346. Other Advanced Features
  347. -----------------------
  348. * ✓ Rerere (reuse recorded resolution)
  349. * ✓ Commit graph
  350. * ✓ Replace objects
  351. * ✓ Grafts
  352. * ✓ Info/alternates (alternate object databases)
  353. * ✓ Partial clone/fetch
  354. * ✓ Shallow clone/fetch
  355. * ✓ Bundle files
  356. * ✓ Fast-import/fast-export
  357. * ✗ Scalar
  358. * ◐ Partial clone with object filters (basic blob:none support)
  359. Web Interface
  360. =============
  361. * ✓ Gitweb-like interface (dulwich.web)
  362. * ✓ WSGI application support
  363. * ✗ cgit
  364. * ✗ GitWeb (Perl implementation)
  365. Known Limitations
  366. =================
  367. The following Git features are not currently supported:
  368. * Git GUIs (gitk, git-gui, git-citool)
  369. * Email workflow tools (git-send-email, git-request-pull)
  370. * Patch application (git-am, git-apply)
  371. * Interactive tools (git-difftool, git-mergetool)
  372. * Newer features (range-diff, scalar, fsmonitor--daemon)
  373. * Full protocol v2 server support (client is fully supported for fetch)
  374. * Some plumbing commands (mktree, http-push, upload-archive, fmt-merge-msg, merge-one-file)
  375. * Full submodule feature parity
  376. * Some advanced object filtering options
  377. * Most git hooks (only pre-commit, commit-msg, post-commit, post-receive)
  378. * Working tree encoding attribute
  379. Compatibility Notes
  380. ===================
  381. Repository Compatibility
  382. ------------------------
  383. Dulwich maintains full wire-format and on-disk repository format compatibility
  384. with C Git. This means:
  385. * Dulwich can read and write repositories created by C Git
  386. * C Git can read and write repositories created by Dulwich
  387. * Dulwich and C Git can be used interchangeably on the same repository
  388. * Network protocols are fully compatible
  389. See Also
  390. ========
  391. * :ref:`tutorial-index` - Tutorial for using Dulwich
  392. * :ref:`protocol` - Git protocol documentation
  393. * :mod:`dulwich.porcelain` - High-level API reference