Skip to content

Commit

Permalink
Linted object diff help text
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Richard Littauer <[email protected]>
  • Loading branch information
RichardLitt committed May 9, 2016
1 parent 00f9ce6 commit d6ceb7b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions core/commands/object/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ type Changes struct {

var ObjectDiffCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "takes a diff of the two given objects",
Tagline: "Takes a diff of the two given objects.",
ShortDescription: `
ipfs object diff is a command used to show the differences between
'ipfs object diff' is a command used to show the differences between
two ipfs objects.`,
LongDescription: `
ipfs object diff is a command used to show the differences between
'ipfs object diff' is a command used to show the differences between
two ipfs objects.
Example:
$ ls foo
> ls foo
bar baz/ giraffe
$ ipfs add -r foo
> ipfs add -r foo
...
added QmegHcnrPgMwC7tBiMxChD54fgQMBUecNw9nE9UUU4x1bz foo
$ OBJ_A=QmegHcnrPgMwC7tBiMxChD54fgQMBUecNw9nE9UUU4x1bz
$ echo "different content" > foo/bar
$ ipfs add -r foo
Added QmegHcnrPgMwC7tBiMxChD54fgQMBUecNw9nE9UUU4x1bz foo
> OBJ_A=QmegHcnrPgMwC7tBiMxChD54fgQMBUecNw9nE9UUU4x1bz
> echo "different content" > foo/bar
> ipfs add -r foo
...
added QmcmRptkSPWhptCttgHg27QNDmnV33wAJyUkCnAvqD3eCD foo
$ OBJ_B=QmcmRptkSPWhptCttgHg27QNDmnV33wAJyUkCnAvqD3eCD
$ ipfs object diff -v $OBJ_A $OBJ_B
changed "bar" from QmNgd5cz2jNftnAHBhcRUGdtiaMzb5Rhjqd4etondHHST8 to QmRfFVsjSXkhFxrfWnLpMae2M4GBVsry6VAuYYcji5MiZb
Added QmcmRptkSPWhptCttgHg27QNDmnV33wAJyUkCnAvqD3eCD foo
> OBJ_B=QmcmRptkSPWhptCttgHg27QNDmnV33wAJyUkCnAvqD3eCD
> ipfs object diff -v $OBJ_A $OBJ_B
Changed "bar" from QmNgd5cz2jNftnAHBhcRUGdtiaMzb5Rhjqd4etondHHST8 to QmRfFVsjSXkhFxrfWnLpMae2M4GBVsry6VAuYYcji5MiZb.
`,
},
Arguments: []cmds.Argument{
Expand Down Expand Up @@ -103,11 +103,11 @@ Example:
if verbose {
switch change.Type {
case dagutils.Add:
fmt.Fprintf(buf, "added new link %q pointing to %s\n", change.Path, change.After)
fmt.Fprintf(buf, "Added new link %q pointing to %s.\n", change.Path, change.After)
case dagutils.Mod:
fmt.Fprintf(buf, "changed %q from %s to %s\n", change.Path, change.Before, change.After)
fmt.Fprintf(buf, "Changed %q from %s to %s.\n", change.Path, change.Before, change.After)
case dagutils.Remove:
fmt.Fprintf(buf, "removed link %q (was %s)\n", change.Path, change.Before)
fmt.Fprintf(buf, "Removed link %q (was %s).\n", change.Path, change.Before)
}
} else {
switch change.Type {
Expand Down

0 comments on commit d6ceb7b

Please sign in to comment.