O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Chopping	Kubernetes	—
a	git	deep	dive
Dr.	Stefan	Schimanski
sttts@redhat.com — @the_sttts	— github.com/sttts
• monorepo github.com/kubernetes/kubernetes
• embedded staging repos
• github.com/kubernetes/api
• github.com/kubernetes/a...
$ git cat-file –p HEAD
tree 4a541f0a3b26ab7ef8eb38090072558cd8aa54cd
parent 3667154d8524e58db0e21b9338f335f5c53dd83e
paren...
$ git hash-object –w	<filename>					#	Copy	into	repository
<blob-sha>
$	git update-index --add --cacheinfo 100644	<blob-sh...
• monorepo github.com/kubernetes/kubernetes
• embedded staging repos
• github.com/kubernetes/api
• github.com/kubernetes/a...
git filter-branch --subdirectory-filter	staging/src/k8s.io/client-go
git filter-branch --subdirectory-filter	staging/src/k8s.io/client-go
git filter-branch --subdirectory-filter	staging/src/k8s.io/client-go
git	filter-branch --subdirectory-filter	staging/src/k8s.io/client-go
Using Go	instead of bash
• Native	(non-cgo)	go library:	https://github.com/src-d/go-git
• Rewritten “git filter-branch“	to...
Links
• Git Internals:	https://git-scm.com/book/en/v2/Git-Internals-Git-
Objects
• Native	(non-cgo)	go library:	https://gi...
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Git deep dive – chopping Kubernetes
Próximos SlideShares
Carregando em…5
×

Git deep dive – chopping Kubernetes

Filtering the Kubernetes repo by (staging) directory, while rewriting commits to include valid Godeps.jsons.

Livros relacionados

Gratuito durante 30 dias do Scribd

Ver tudo

Audiolivros relacionados

Gratuito durante 30 dias do Scribd

Ver tudo
  • Seja o primeiro a comentar

Git deep dive – chopping Kubernetes

  1. 1. Chopping Kubernetes — a git deep dive Dr. Stefan Schimanski sttts@redhat.com — @the_sttts — github.com/sttts
  2. 2. • monorepo github.com/kubernetes/kubernetes • embedded staging repos • github.com/kubernetes/api • github.com/kubernetes/apimachinery • github.com/kubernetes/apiserver • github.com/kubernetes/client-go • ... • published nightly with tags, branches • rewriting Godeps.json • Kubernetes-commit: <sha1>
  3. 3. $ git cat-file –p HEAD tree 4a541f0a3b26ab7ef8eb38090072558cd8aa54cd parent 3667154d8524e58db0e21b9338f335f5c53dd83e parent 951d2c060e0fa173f82bc221e388f9491709c52c author Kubernetes Submit Queue <k8s-merge-robot@users.noreply.github.com> 1508409674 -0700 committer GitHub <noreply@github.com> 1508409674 -0700 Merge pull request #54192 from mkumatag/versioned_busybox
  4. 4. $ git hash-object –w <filename> # Copy into repository <blob-sha> $ git update-index --add --cacheinfo 100644 <blob-sha> <filename> $ git write-tree <tree-sha> $ git commit-tree -p <parent-sha> -m “Commit message“ <tree-sha> <commit-sha>
  5. 5. • monorepo github.com/kubernetes/kubernetes • embedded staging repos • github.com/kubernetes/api • github.com/kubernetes/apimachinery • github.com/kubernetes/apiserver • github.com/kubernetes/client-go • ... • published nightly with tags, branches • rewriting Godeps.json • Kubernetes-commit: <sha1>
  6. 6. git filter-branch --subdirectory-filter staging/src/k8s.io/client-go
  7. 7. git filter-branch --subdirectory-filter staging/src/k8s.io/client-go
  8. 8. git filter-branch --subdirectory-filter staging/src/k8s.io/client-go
  9. 9. git filter-branch --subdirectory-filter staging/src/k8s.io/client-go
  10. 10. Using Go instead of bash • Native (non-cgo) go library: https://github.com/src-d/go-git • Rewritten “git filter-branch“ to not drop ff-merges • Do we need cherry-picks?
  11. 11. Links • Git Internals: https://git-scm.com/book/en/v2/Git-Internals-Git- Objects • Native (non-cgo) go library: https://github.com/src-d/go-git

    Seja o primeiro a comentar

    Entre para ver os comentários

  • ssuser528be7

    Dec. 23, 2017
  • Iketaro1

    Apr. 17, 2021

Filtering the Kubernetes repo by (staging) directory, while rewriting commits to include valid Godeps.jsons.

Vistos

Vistos totais

650

No Slideshare

0

De incorporações

0

Número de incorporações

2

Ações

Baixados

10

Compartilhados

0

Comentários

0

Curtir

2

×