Skip to content

Commit 808f2d3

Browse files
committedDec 26, 2013
Merge pull request moby#3343 from bwiklund/comment-edits
small batch of edits/corrections to comments
2 parents d1ca12e + 0fccf0f commit 808f2d3

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed
 

‎AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Antony Messerli <amesserl@rackspace.com>
2020
Asbjørn Enge <asbjorn@hanafjedle.net>
2121
Barry Allard <barry.allard@gmail.com>
2222
Ben Toews <mastahyeti@gmail.com>
23+
Ben Wiklund <ben@daisyowl.com>
2324
Benoit Chesneau <bchesneau@gmail.com>
2425
Bhiraj Butala <abhiraj.butala@gmail.com>
2526
Bouke Haarsma <bouke@webatoom.nl>

‎archive/changes_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,6 @@ func TestApplyLayer(t *testing.T) {
296296
}
297297

298298
if len(changes2) != 0 {
299-
t.Fatalf("Unexpected differences after re applying mutation: %v", changes2)
299+
t.Fatalf("Unexpected differences after reapplying mutation: %v", changes2)
300300
}
301301
}

‎archive/diff.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"time"
1212
)
1313

14-
// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes
15-
// The lower 8 bit is the lower 8 bit in the minor, the following 12 bits are the major,
16-
// and then there is the top 12 bits of then minor
14+
// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.
15+
// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,
16+
// then the top 12 bits of the minor
1717
func mkdev(major int64, minor int64) uint32 {
1818
return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))
1919
}
@@ -58,9 +58,9 @@ func ApplyLayer(dest string, layer Archive) error {
5858
hdr.Name = filepath.Clean(hdr.Name)
5959

6060
if !strings.HasSuffix(hdr.Name, "/") {
61-
// Not the root directory, ensure that the parent directory exists
61+
// Not the root directory, ensure that the parent directory exists.
6262
// This happened in some tests where an image had a tarfile without any
63-
// parent directories
63+
// parent directories.
6464
parent := filepath.Dir(hdr.Name)
6565
parentPath := filepath.Join(dest, parent)
6666
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
@@ -85,7 +85,7 @@ func ApplyLayer(dest string, layer Archive) error {
8585
return err
8686
}
8787
} else {
88-
// If path exits we almost always just want to remove and replace it
88+
// If path exits we almost always just want to remove and replace it.
8989
// The only exception is when it is a directory *and* the file from
9090
// the layer is also a directory. Then we want to merge them (i.e.
9191
// just apply the metadata from the layer).
@@ -155,7 +155,7 @@ func ApplyLayer(dest string, layer Archive) error {
155155
return err
156156
}
157157

158-
// There is no LChmod, so ignore mode for symlink. Also, this
158+
// There is no LChmod, so ignore mode for symlink. Also, this
159159
// must happen after chown, as that can modify the file mode
160160
if hdr.Typeflag != tar.TypeSymlink {
161161
err = syscall.Chmod(path, uint32(hdr.Mode&07777))

‎archive/stat_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func getLastModification(stat *syscall.Stat_t) syscall.Timespec {
1414
}
1515

1616
func LUtimesNano(path string, ts []syscall.Timespec) error {
17-
// These are not currently availible in syscall
17+
// These are not currently available in syscall
1818
AT_FDCWD := -100
1919
AT_SYMLINK_NOFOLLOW := 0x100
2020

‎auth/auth.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, e
163163

164164
loginAgainstOfficialIndex := serverAddress == IndexServerAddress()
165165

166-
// to avoid sending the server address to the server it should be removed before marshalled
166+
// to avoid sending the server address to the server it should be removed before being marshalled
167167
authCopy := *authConfig
168168
authCopy.ServerAddress = ""
169169

@@ -254,11 +254,11 @@ func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig {
254254
// default to the index server
255255
return config.Configs[IndexServerAddress()]
256256
}
257-
// if its not the index server there are three cases:
257+
// if it's not the index server there are three cases:
258258
//
259-
// 1. this is a full config url -> it should be used as is
260-
// 2. it could be a full url, but with the wrong protocol
261-
// 3. it can be the hostname optionally with a port
259+
// 1. a full config url -> it should be used as is
260+
// 2. a full url, but with the wrong protocol
261+
// 3. a hostname, with an optional port
262262
//
263263
// as there is only one auth entry which is fully qualified we need to start
264264
// parsing and matching

‎engine/engine_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestRegister(t *testing.T) {
1818

1919
eng := newTestEngine(t)
2020

21-
//Should fail because globan handlers are copied
21+
//Should fail because global handlers are copied
2222
//at the engine creation
2323
if err := eng.Register("dummy1", nil); err == nil {
2424
t.Fatalf("Expecting error, got none")

0 commit comments

Comments
 (0)
Please sign in to comment.