News from Git in Eclipse Matthias Sohn (SAP) merge strategy - - PowerPoint PPT Presentation

news from git in eclipse
SMART_READER_LITE
LIVE PREVIEW

News from Git in Eclipse Matthias Sohn (SAP) merge strategy - - PowerPoint PPT Presentation

News from Git in Eclipse Matthias Sohn (SAP) merge strategy extension point enables external merge strategy used by EMF Compare to provide model merge (Neon) JGit 4.0, EGit 4.1 EMF Compare provides model merge strategy Computes


slide-1
SLIDE 1

News from Git in Eclipse

Matthias Sohn (SAP)

slide-2
SLIDE 2

merge strategy extension point

JGit 4.0, EGit 4.1

  • enables external merge strategy
  • used by EMF Compare to

provide model merge (Neon)

slide-3
SLIDE 3

EMF Compare provides model merge strategy

Computes the logical model for each version Compares / merges complete logical model

slide-4
SLIDE 4

e4 smart project import wizard

EGit

  • clone repository
  • invoke e4 smart project import
  • auto-detects projects and their

types

  • Since Neon it's the default

wiki e4 smart import

slide-5
SLIDE 5

e4 smart project import

slide-6
SLIDE 6

Staging View

EGit

  • better support non-workspace

files (4.2)

  • enable sorting files by status (4.3)
  • "Commit" opens staging view (4.3)
  • auto-switch to vertical layout (4.3)
slide-7
SLIDE 7

Better support non-workspace files

slide-8
SLIDE 8

Sorting files by status

slide-9
SLIDE 9

"Commit" opens Staging View

slide-10
SLIDE 10

Auto-switch to vertical layout

slide-11
SLIDE 11

History View

EGit

  • auto-select branch (4.2)
  • new search widget (4.5)
slide-12
SLIDE 12

Auto-select branch

slide-13
SLIDE 13

New search widget

slide-14
SLIDE 14

Usability Improvements

EGit

  • dirty decorator in repositories view
  • most git actions enabled on

working sets

  • configure date format
  • view stash in commit viewer (4.4)
slide-15
SLIDE 15

dirty decorator in repositories view

slide-16
SLIDE 16

enable most git actions on working sets

slide-17
SLIDE 17

configure date format

slide-18
SLIDE 18

View Stash in Commit Viewer

slide-19
SLIDE 19

Gerrit integration

EGit 4.3

  • auto-configure repository cloned from

Gerrit

  • auto-fill "Fetch from Gerrit" wizard from

clipboard

  • "Commit and push" opens "Push to

Gerrit" wizard

  • Set topic on push for review (4.4)
slide-20
SLIDE 20

Misc Improvements

EGit

  • improved support for submodules /

nested repositories (4.3)

  • configurable pull options (4.3)
  • rebase modes (4.6)
  • check for running launches before

modifying the workspace (4.5)

  • auto-gc (4.6)
  • Oomph setup for contributors (4.5)
slide-21
SLIDE 21

hooks support

JGit

  • pre-push (4.2)
  • post-commit (4.5)
slide-22
SLIDE 22

.gitattributes

JGit 4.3

fixed most wanted JGit bug (108 votes)

  • filter attributes (4.2)
  • text attributes
  • eol attributes
  • macros
slide-23
SLIDE 23

LFS Large File Storage

JGit, EGit

client

  • integrate git-lfs extension in client (4.2)
  • built-in JGit LFS extension (4.6)

server

  • basic JGit LFS server (4.3)

○ file system or S3 storage

  • Gerrit lfs plugin (Gerrit 2.13)
slide-24
SLIDE 24

Versioning large binaries in Git

large binary files can't be packed by Git efficiently ➔ Git repository growing quickly ➔ gc more expensive and less efficient ➔ slows down transport ➔ Git server load grows

slide-25
SLIDE 25

.gitattributes slides.pdf X.java

Large File Storage (LFS) extension

.git

  • - objects
  • - lfs

git server lfs server git git-lfs

slide-26
SLIDE 26

.gitattributes slides.pdf X.java

LFS configuration

.gitattributes *.pdf filter=lfs diff=lfs merge=lfs -text .gitconfig [filter "lfs"] clean = git-lfs clean %f smudge = git-lfs smudge %f which files to store in LFS ? lfs clean filter intercepts add lfs smudge filter intercepts checkout .git

  • - config
  • - objects
  • - lfs
slide-27
SLIDE 27

.gitattributes slides.pdf X.java

git add slides.pdf

version git-lfs/spec/v1 id sha256:5891b5b522... size 6 store meta data in objects store big file in lfs objects lfs clean filter slides.pdf .git

  • - objects
  • - lfs
slide-28
SLIDE 28

.gitattributes slides.pdf X.java

git push origin

git server lfs server pre-push hook version git-lfs/spec/v1 id sha256:5891b5b522... size 6 push slides.pdf .git

  • - objects
  • - lfs
slide-29
SLIDE 29

.gitattributes slides.pdf X.java

git fetch/clone, git checkout

git server lfs server version git-lfs/spec/v1 id sha256:5891b5b522... size 6 fetch checkout downloads large

  • bject lazily

slides.pdf lfs smudge filter .git

  • - objects
  • - lfs
slide-30
SLIDE 30

EGit Gerrit .gitattributes slides.pdf X.java

LFS server with JGit filesystem/S3 storage

JGit JGit LFS client Gerrit plugin LFS storage (filesystem / S3) .git

  • - objects

JGit LFS server .git

  • - objects
  • - lfs
slide-31
SLIDE 31

The quest for distributed JGit

JGit

RefTree (4.2)

  • version refs as git objects
  • repository state described by RefTree

commit containing ref updates

  • enables atomic push

Ketch (4.3)

  • distributed transaction log based on

RefTree

  • Raft distributed consensus for leader

election

  • basis for distributed JGit server
slide-32
SLIDE 32

RefTree: Versioning branches in git

store refs in git tree objects push can update many refs -> stored in one RefTree commit

  • > enable transactional ref updates when receiving a pack
  • > compare single SHA1 to compare repository states
slide-33
SLIDE 33

jgit clone with worktree standard refs jgit.git bare repository refs stored in RefTree bootstrap branch symlinked

  • bjects linked via alternates

commit, push bootstrap branch bootstrap branch RefTree Versions symlink

  • bjects

alternates

  • bjects

spy empty, used for introspection

slide-34
SLIDE 34

Ketch: multi-master git repository

  • leader election (Raft)

leader

slide-35
SLIDE 35

Ketch: multi-master git repository

  • leader election (Raft)
  • push arrives on any server

push leader

slide-36
SLIDE 36

Ketch: multi-master git repository

  • leader election (Raft)
  • push arrives on any server
  • queue proposal to leader
  • leader creates new RefTree

describing target state

push queue proposal

RefTree

leader

slide-37
SLIDE 37

Ketch: multi-master git repository

  • leader election (Raft)
  • push arrives on any server
  • queue proposal to leader
  • leader creates new RefTree

describing target state

  • replicate objects and RefTree

to majority of servers

push queue proposal

RefTree RefTree

leader

slide-38
SLIDE 38

Ketch: multi-master git repository

  • leader election (Raft)
  • push arrives on any server
  • queue proposal to leader
  • leader creates new RefTree

describing target state

  • replicate objects and RefTree

to majority of servers

push queue proposal

RefTree RefTree RefTree

leader

slide-39
SLIDE 39

Ketch: multi-master git repository

  • leader election (Raft)
  • push arrives on any server
  • queue proposal to leader
  • leader creates new RefTree

describing target state

  • replicate objects and RefTree

to majority of servers

  • commit transaction

ack ack

RefTree RefTree RefTree

leader

slide-40
SLIDE 40

Questions & Answers

slide-41
SLIDE 41

Evaluate the Sessions Sign in and vote at eclipsecon.org

  • 1

+ 1