versions all the way down
play

Versions all the way down Versioning commits and patches with - PowerPoint PPT Presentation

Versions all the way down Versioning commits and patches with git-series Josh Triplett josh@joshtriplett.org LinuxCon North America 2016 RFC: feature RFC: feature Development git commit git format-patch -3 git format-patch -3 [PATCH 1/3]


  1. Versions all the way down Versioning commits and patches with git-series Josh Triplett josh@joshtriplett.org LinuxCon North America 2016

  2. RFC: feature

  3. RFC: feature

  4. Development

  5. git commit

  6. git format-patch -3

  7. git format-patch -3 [PATCH 1/3] Cleanup and yak shaving [PATCH 2/3] Implement feature [PATCH 3/3] Use feature

  8. git request-pull ...

  9. git request-pull ... git hub pull new ...

  10. Feedback Split cleanup and yak shaving

  11. Feedback Split cleanup and yak shaving Additional use of feature

  12. Feedback Split cleanup and yak shaving Additional use of feature Add benchmark data

  13. Feedback Split cleanup and yak shaving Additional use of feature Add benchmark data Add tests

  14. Feedback Split cleanup and yak shaving Additional use of feature Add benchmark data Add tests Fix typo

  15. Rewriting history

  16. git commit --amend

  17. git rebase -i

  18. “fast-forward” vs “non-fast-forward”

  19. git format-patch -v2 -6

  20. git format-patch -v2 -6 [PATCH v2 1/6] Cleanup [PATCH v2 2/6] Yak shaving [PATCH v2 3/6] Implement feature [PATCH v2 4/6] Tests for feature [PATCH v2 5/6] Use feature [PATCH v2 6/6] Use feature elsewhere

  21. What about v1?

  22. git reflog

  23. mutt -f =Sent

  24. Public mailing list archives

  25. Git tracks history

  26. We rewrite history

  27. We need the history of history

  28. git submodule

  29. git submodule -- --fthagn

  30. Two common solutions

  31. Two common solutions Pull one of the histories out of git

  32. Pull the patches out of git

  33. quilt patch files

  34. debian/patches/*

  35. git rebase -i

  36. Pull the history of the patches out of git

  37. Versioned branch names

  38. feature-v1

  39. feature-v1 feature-v2

  40. feature-v1 feature-v2 feature-v3-typofix

  41. feature-v1 feature-v2 feature-v3-typofix feature-v8-rebased-4.6-alice-fix

  42. feature-v1 feature-v2 feature-v3-typofix feature-v8-rebased-4.6-alice-fix feature-v8-rebased-4.6-alice-fix.pptx

  43. We have a version control system!

  44. Cover letter

  45. Cover letter [PATCH v2 0/5] feature: summary of new idea

  46. Base

  47. Base git format-patch -3 git format-patch -v2 -6

  48. Base git format-patch -3 git format-patch -v2 -6 git rebase -i ...

  49. Base git format-patch -3 git format-patch -v2 -6 git rebase -i ... git log

  50. Collaboration

  51. “Never rewrite published history”

  52. How can you collaborate on it?

  53. Patch series

  54. Patch series Feature backport

  55. Patch series Feature backport Distribution package

  56. git-series

  57. git-series Tracks the history of a patch series

  58. git-series Tracks the history of a patch series Handles non-fast-forwarding changes

  59. git-series Tracks the history of a patch series Handles non-fast-forwarding changes Tracks a cover letter

  60. git-series Tracks the history of a patch series Handles non-fast-forwarding changes Tracks a cover letter Tracks the base of the series

  61. Demo

  62. Internals

  63. Internals INTERNALS.md https://github.com/git-series/git-series/blob/master/INTERNALS.md

  64. Review of git internals

  65. Review of git internals blob (file)

  66. Review of git internals blob (file) tree (directory)

  67. Review of git internals blob (file) tree (directory) commit (tree, message, parents)

  68. Review of git internals blob (file) tree (directory) commit (tree, message, parents) tag

  69. Review of git internals blob (file) tree (directory) commit (tree, message, parents) tag ref

  70. trees can refer to commits

  71. trees can refer to commits “gitlink”

  72. Requirement: Every object must remain reachable by git.

  73. Requirement: Every object must remain reachable by git. Required to keep git from pruning objects Required for push/pull of series

  74. v1 a v2 a v1 b v2 b upstream y upstream x

  75. series v1 series v2 v1 a v2 a v1 b v2 b upstream y upstream x

  76. refs/heads/git-series/feature series v1 series v2 v1 a v2 a v1 b v2 b upstream y upstream x

  77. refs/heads/git-series/feature series v1 series v2 series v1 a v2 a v1 b v2 b upstream y upstream x

  78. refs/heads/git-series/feature series v1 series v2 series v1 a v2 a base v1 b v2 b upstream y upstream x

  79. refs/heads/git-series/feature series v1 series v2 series series v1 a v2 a base v1 b v2 b upstream y upstream x

  80. refs/heads/git-series/feature series v1 series v2 series series v1 a v2 a base v1 b v2 b base upstream y upstream x

  81. refs/heads/git-series/feature series v1 series v2 series series cover v1 a v2 a base v1 b v2 b cover letter blob base upstream y upstream x

  82. git doesn’t follow gitlinks for reachability or push/pull

  83. git doesn’t follow gitlinks for reachability or push/pull Have to also include “series” as a parent

  84. git doesn’t follow gitlinks for reachability or push/pull Have to also include “series” as a parent git-series ignores that parent when traversing

  85. HEAD → Current branch

  86. HEAD → Current branch refs/SHEAD → Current series

  87. Working and staged (as seen in status)?

  88. Working and staged (as seen in status)? refs/git-series-internals/working/feature refs/git-series-internals/staged/feature

  89. Avoiding errors

  90. Long and complex error messages

  91. Long and complex error messages suggest a design flaw

  92. Long and complex error messages suggest a design flaw Redesign to make the error impossible

  93. Detach from a series or check out a new series with uncommitted changes to the series (series, base, cover)

  94. Detach from a series or check out a new series with uncommitted changes to the series (series, base, cover) Every series has its own independent working and staged versions

  95. Detach from a series or check out a new series without making any commits

  96. Detach from a series or check out a new series without making any commits git series start makes working/staged

  97. Detach from a series or check out a new series without making any commits git series start makes working/staged “(new, no commits yet)”

  98. Detach from a series or check out a new series without making any commits git series start makes working/staged “(new, no commits yet)” git series checkout works

  99. Long and complex error messages suggest a design flaw Redesign to make the error impossible

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend