Skip to content

Commit e0c9fba

Browse files
authored
Merge pull request #85 from max123kl/Anhang-B
Anhang B – Übersetzung fertig
2 parents bc7ee48 + c966751 commit e0c9fba

File tree

8 files changed

+182
-183
lines changed

8 files changed

+182
-183
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[[B-embedding-git-in-your-applications]]
22
[appendix]
3-
== Embedding Git in your Applications
3+
== Git in Ihre Anwendungen einbetten
44

5-
If your application is for developers, chances are good that it could benefit from integration with source control.
6-
Even non-developer applications, such as document editors, could potentially benefit from version-control features, and Git's model works very well for many different scenarios.
5+
Wenn Ihre Anwendung für Software-Entwickler gedacht ist, stehen die Chancen gut, dass sie von der Integration mit der Quellcode-Versionsverwaltung profitieren kann.
6+
Auch Anwendungen, die nicht für Entwickler bestimmt sind, wie z.B. Texteditoren, könnten potenziell von Funktionen der Versionskontrolle profitieren. Das Git-System funktioniert sehr gut für viele unterschiedliche Einsatzszenarien.
77

8-
If you need to integrate Git with your application, you have essentially two options: spawn a shell and call the `git` command-line program, or embed a Git library into your application.
9-
Here we'll cover command-line integration and several of the most popular embeddable Git libraries.
8+
Wenn Sie Git in Ihre Anwendung integrieren müssen, haben Sie im Wesentlichen zwei Möglichkeiten: eine Shell zu erzeugen und damit das Git-Kommandozeilenprogramm aufzurufen oder eine Git-Bibliothek in Ihre Anwendung einzubetten.
9+
Hier werden wir die Befehlszeilenintegration und einige der beliebtesten, integrierbaren Git-Bibliotheken behandeln.
1010

1111
include::book/B-embedding-git/sections/command-line.asc[]
1212

@@ -17,4 +17,3 @@ include::book/B-embedding-git/sections/jgit.asc[]
1717
include::book/B-embedding-git/sections/go-git.asc[]
1818

1919
include::book/B-embedding-git/sections/dulwich.asc[]
20-

book/07-git-tools/sections/interactive-staging.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[_interactive_staging]]
2-
=== Interactives Stagen
2+
=== Interaktives Stagen
33

44
In diesem Abschnitt werden Sie einige interaktive Git-Befehle kennenlernen, mit denen Sie Ihre Commits so gestalten können, dass sie nur bestimmte Kombinationen und Teile von Dateien enthalten.
55
Diese Tools sind nützlich, um zu entscheiden, ob eine Vielzahl von umfassend modifizierten Dateien in mehrere gezielte Commits aufgeteilt oder in einem großen unübersichtlichen Commit übertragen werden sollen.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
=== Command-line Git
1+
=== Die Git-Kommandozeile
22

3-
One option is to spawn a shell process and use the Git command-line tool to do the work.
4-
This has the benefit of being canonical, and all of Git's features are supported.
5-
This also happens to be fairly easy, as most runtime environments have a relatively simple facility for invoking a process with command-line arguments.
6-
However, this approach does have some downsides.
3+
Die eine Möglichkeit besteht darin, einen Shell-Prozess zu erzeugen und das Git-Kommandozeilen-Tool zu verwenden, um die Arbeit zu erledigen.
4+
Das hat den Vorteil, dass es kanonisch ist und alle Funktionen von Git unterstützt werden.
5+
Außerdem ist dieses Verfahren ganz einfach, da die meisten Laufzeit-Umgebungen eine vergleichsweise unkomplizierte Möglichkeit haben, einen Prozess mit Kommandozeilen-Argumenten aufzurufen.
6+
Dieser Weg hat jedoch auch einige Nachteile.
77

8-
One is that all the output is in plain text.
9-
This means that you'll have to parse Git's occasionally-changing output format to read progress and result information, which can be inefficient and error-prone.
8+
Zum einen ist die gesamte Textausgabe in Klartext.
9+
Das bedeutet, dass Sie das gelegentlich wechselnde Ausgabeformat von Git analysieren müssen, um Fortschritts- und Ergebnisinformationen zu erfassen, was ineffizient und fehleranfällig sein kann.
1010

11-
Another is the lack of error recovery.
12-
If a repository is corrupted somehow, or the user has a malformed configuration value, Git will simply refuse to perform many operations.
11+
Ein weiterer Nachteil ist die unzureichende Fehlerkorrektur.
12+
Wenn ein Repository irgendwie beschädigt ist oder der Benutzer einen fehlerhaften Konfigurationswert eingestellt hat, verweigert Git einfach die Durchführung vieler Operationen.
1313

14-
Yet another is process management.
15-
Git requires you to maintain a shell environment on a separate process, which can add unwanted complexity.
16-
Trying to coordinate many of these processes (especially when potentially accessing the same repository from several processes) can be quite a challenge.
14+
Noch ein anderer ist das Prozessmanagement.
15+
Git erfordert die Verwaltung einer Shell-Umgebung in einem separaten Prozess, was zu unerwünschter Komplexität führen kann.
16+
Der Versuch, viele dieser Prozesse zu koordinieren (insbesondere wenn mehrere Prozesse auf das gleiche Repository zugreifen wollen), kann eine ziemliche Herausforderung darstellen.

book/B-embedding-git/sections/dulwich.asc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
=== Dulwich
22

33
(((Dulwich)))(((Python)))
4-
There is also a pure-Python Git implementation - Dulwich.
5-
The project is hosted under https://www.dulwich.io/
6-
It aims to provide an interface to git repositories (both local and remote) that doesn't call out to git directly but instead uses pure Python.
7-
It has an optional C extensions though, that significantly improve the performance.
4+
Es gibt auch eine pure Python-Implementierung in Git Dulwich.
5+
Das Projekt wird unter https://www.dulwich.io/ gehostet.
6+
Es zielt darauf ab, eine Schnittstelle zu Git-Repositorys (lokal und remote) bereitzustellen, die nicht direkt Git aufruft, sondern stattdessen reines Python verwendet.
7+
Es hat dennoch eine optionale C-Erweiterung, die die Leistung erheblich verbessert.
88

9-
Dulwich follows git design and separate two basic levels of API: plumbing and porcelain.
9+
Dulwich folgt dem Git-Design und trennt die beiden grundlegenden API-Bereiche: Basis- und Standardbefehle (engl. plumbing and porcelain).
1010

11-
Here is an example of using the lower level API to access the commit message of the last commit:
11+
Das folgende Beispiel zeigt die API der low-level (Basis-)Ebene, um auf die Commit-Beschreibung des letzten Commits zuzugreifen:
1212

1313
[source, python]
1414
-----
@@ -25,7 +25,7 @@ c.message
2525
# 'Add note about encoding.\n'
2626
-----
2727

28-
To print a commit log using high-level porcelain API, one can use:
28+
Zum Drucken eines Commit-Protokolls mit der high-level Standard-API kann man folgendes verwenden:
2929

3030
[source, python]
3131
-----
@@ -38,7 +38,7 @@ porcelain.log('.', max_entries=1)
3838
-----
3939

4040

41-
==== Further Reading
41+
==== Weiterführende Informationen
4242

43-
* The official API documentation is available at https://www.dulwich.io/apidocs/dulwich.html[]
44-
* Official tutorial at https://www.dulwich.io/docs/tutorial[] has many examples of how to do specific tasks with Dulwich
43+
* Die offizielle API-Dokumentation ist unter https://www.dulwich.io/apidocs/dulwich.html[] verfügbar.
44+
* Das offizielle Tutorial bei https://www.dulwich.io/docs/tutorial[] enthält viele Beispiele dafür, wie bestimmte Aufgaben mit Dulwich erledigt werden können.

book/B-embedding-git/sections/go-git.asc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
=== go-git
22

33
(((go-git)))(((Go)))
4-
In case you want to integrate Git into a service written in Golang, there also is a pure Go library implementation.
5-
This implementation does not have any native dependencies and thus is not prone to manual memory management errors.
6-
It is also transparent for the standard Golang performance analysis tooling like CPU, Memory profilers, race detector, etc.
4+
Für den Fall, dass Sie Git in einen in Golang geschriebenen Service integrieren wollen, gibt es auch eine direkte Umsetzung der Go-Bibliothek.
5+
Diese Implementierung hat keine eigenen Abhängigkeiten und ist daher nicht anfällig für manuelle Fehler in der Speicherverwaltung.
6+
Sie ist auch transparent für die standardmäßigen Golang-Tools zur Leistungsanalyse wie CPU, Memory-Profiler, Race-Detektor usw.
77

8-
go-git is focused on extensibility, compatibility and supports most of the plumbing APIs, which is documented at https://github.com/src-d/go-git/blob/master/COMPATIBILITY.md[].
8+
go-git konzentriert sich auf Erweiterbarkeit und Kompatibilität. Es unterstützt die meisten APIs für die Basisbefehle (engl. plumbing), die auf https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md[] dokumentiert sind.
99

10-
Here is a basic example of using Go APIs:
10+
Hier ist ein einfaches Beispiel für die Verwendung der Go-APIs:
1111

1212
[source, go]
1313
-----
14-
import "gopkg.in/src-d/go-git.v4"
14+
import "github.com/go-git/go-git/v5"
1515
1616
r, err := git.PlainClone("/tmp/foo", false, &git.CloneOptions{
17-
URL: "https://github.com/src-d/go-git",
17+
URL: "https://github.com/go-git/go-git",
1818
Progress: os.Stdout,
1919
})
2020
-----
2121

22-
As soon as you have a `Repository` instance, you can access information and perform mutations on it:
22+
Sobald Sie eine `Repository` Instanz haben, können Sie auf Informationen zugreifen und Änderungen daran vornehmen:
2323

2424

2525
[source, go]
@@ -40,25 +40,25 @@ for _, c := range history {
4040
-----
4141

4242

43-
==== Advanced Functionality
43+
==== Erweiterte Funktionalität
4444

45-
go-git has few notable advanced features, one of which is a pluggable storage system, which is similar to Libgit2 backends.
46-
The default implementation is in-memory storage, which is very fast.
45+
go-git hat nur wenige nennenswerte fortgeschrittene Funktionen, von denen eine ein erweiterbares Speichersystem ist, das den Libgit2-Backends ähnlich ist.
46+
Die Standard-Implementierung ist der In-Memory Storage, welcher sehr effizient ist.
4747

4848
[source, go]
4949
-----
5050
r, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
51-
URL: "https://github.com/src-d/go-git",
51+
URL: "https://github.com/go-git/go-git",
5252
})
5353
-----
5454

55-
Pluggable storage provides many interesting options.
56-
For instance, https://github.com/src-d/go-git/tree/master/_examples/storage[] allows you to store references, objects, and configuration in an Aerospike database.
55+
Die anpassbare Speicherlösung bietet viele interessante Optionen.
56+
So können Sie beispielsweise mit https://github.com/go-git/go-git/tree/master/_examples/storage[] Referenzen, Objekte und Konfiguration in einer Aerospike-Datenbank speichern.
5757

58-
Another feature is a flexible filesystem abstraction.
59-
Using https://godoc.org/github.com/src-d/go-billy#Filesystem[] it is easy to store all the files in different way i.e by packing all of them to a single archive on disk or by keeping them all in-memory.
58+
Ein anderes Feature ist eine flexible Abstraktion des Dateisystems.
59+
Mit https://pkg.go.dev/github.com/go-git/go-billy/v5?tab=doc#Filesystem[] ist es einfach, alle Dateien auf unterschiedliche Weise zu speichern, d.h. alle Dateien in ein einziges Archiv auf der Festplatte zu komprimieren oder sie alle im Arbeitsspeicher zu halten.
6060

61-
Another advanced use-case includes a fine-tunable HTTP client, such as the one found at https://github.com/src-d/go-git/blob/master/_examples/custom_http/main.go[].
61+
Ein weiterer fortgeschrittener Verwendungszweck enthält einen fein anpassbaren HTTP-Client, wie er bei https://github.com/go-git/go-git/blob/master/_examples/custom_http/main.go[] zu finden ist.
6262

6363
[source, go]
6464
-----
@@ -80,7 +80,7 @@ r, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{URL: url})
8080
-----
8181

8282

83-
==== Further Reading
83+
==== Weiterführende Informationen
8484

85-
A full treatment of go-git's capabilities is outside the scope of this book.
86-
If you want more information on go-git, there's API documentation at https://godoc.org/gopkg.in/src-d/go-git.v4[], and a set of usage examples at https://github.com/src-d/go-git/tree/master/_examples[].
85+
Eine vollständige Behandlung der Fähigkeiten von go-git liegt außerhalb des eigentlichen Ziels dieses Buches.
86+
Wenn Sie weitere Informationen über go-git wünschen, finden Sie die API-Dokumentation auf https://pkg.go.dev/github.com/go-git/go-git/v5[] und eine Reihe von Anwendungsbeispielen unter https://github.com/go-git/go-git/tree/master/_examples[].

0 commit comments

Comments
 (0)