Skip to content

Commit

Permalink
ignoreChecksum: true by default
Browse files Browse the repository at this point in the history
This is because checksum verification by default was deemed to be
too vigorous and unncessary by default. This discussion stems from
issue #117.
  • Loading branch information
Emmanuel Odeke committed Mar 27, 2015
1 parent d44059e commit fda55c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,17 @@ To pull specific files or directories, pass in one or more paths:
$ drive pull photos/img001.png docs
```

Note: To ignore checksum verification during a pull:

```shell
$ drive pull -ignore-checksum
```
## Note: Checksum verification:
* By default checksum-ing is turned off because it was deemed to be quite vigorous and unnecessary for most cases.
* Due to popular demand to cover the common case in which size + modTime differences are sufficient to detect file changes. The discussion stemmed from issue [#117](https://github.com/odeke-em/drive/issues/117).

To turn checksum verification back on:

```shell
$ drive pull -ignore-checksum=false
```


drive also supports piping pulled content to stdout which can be accomplished by:

Expand Down
6 changes: 3 additions & 3 deletions cmd/drive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (cmd *pullCmd) Flags(fs *flag.FlagSet) *flag.FlagSet {
cmd.noPrompt = fs.Bool("no-prompt", false, "shows no prompt before applying the pull action")
cmd.hidden = fs.Bool("hidden", false, "allows pulling of hidden paths")
cmd.force = fs.Bool("force", false, "forces a pull even if no changes present")
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, false, drive.DescIgnoreChecksum)
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, true, drive.DescIgnoreChecksum)
cmd.ignoreConflict = fs.Bool(drive.CLIOptionIgnoreConflict, false, drive.DescIgnoreConflict)
cmd.exportsDir = fs.String("export-dir", "", "directory to place exports")
cmd.piped = fs.Bool("piped", false, "if true, read content from stdin")
Expand Down Expand Up @@ -326,7 +326,7 @@ func (cmd *pushCmd) Flags(fs *flag.FlagSet) *flag.FlagSet {
cmd.convert = fs.Bool("convert", false, "toggles conversion of the file to its appropriate Google Doc format")
cmd.ocr = fs.Bool("ocr", false, "if true, attempt OCR on gif, jpg, pdf and png uploads")
cmd.piped = fs.Bool("piped", false, "if true, read content from stdin")
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, false, drive.DescIgnoreChecksum)
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, true, drive.DescIgnoreChecksum)
cmd.ignoreConflict = fs.Bool(drive.CLIOptionIgnoreConflict, false, drive.DescIgnoreConflict)
cmd.quiet = fs.Bool(drive.QuietKey, false, "if set, do not log anything but errors")
return fs
Expand Down Expand Up @@ -495,7 +495,7 @@ type diffCmd struct {

func (cmd *diffCmd) Flags(fs *flag.FlagSet) *flag.FlagSet {
cmd.hidden = fs.Bool("hidden", false, "allows pulling of hidden paths")
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, false, drive.DescIgnoreChecksum)
cmd.ignoreChecksum = fs.Bool(drive.CLIOptionIgnoreChecksum, true, drive.DescIgnoreChecksum)
cmd.quiet = fs.Bool(drive.QuietKey, false, "if set, do not log anything but errors")
return fs
}
Expand Down

0 comments on commit fda55c7

Please sign in to comment.