Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix tag an existed tag name of a repository#8511

Merged
crosbymichael merged 2 commits into
moby:masterfrom
coolljt0725:fix_tag
Oct 20, 2014
Merged

Fix tag an existed tag name of a repository#8511
crosbymichael merged 2 commits into
moby:masterfrom
coolljt0725:fix_tag

Conversation

@coolljt0725

Copy link
Copy Markdown
Contributor

replace #8303
replace #8487
When tag a image with a tag name which is existed in the repository,
docker should prompt it is conflicted and it will only worked when with
a -f option.But the docker doesn't work like that,it will just
replace the image whether you have a -f option or not.View the
code you can find that if an repoName is existed,it will never go
to check if 'force' option is set or not.

Comment thread integration-cli/docker_cli_tag_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry let me explain better you can change these to

errorOut(err, t, out)

the errorOut function will handle the printing of the error :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfrazelle Ok,thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfrazelle errorOut(err, t, fmt.Sprintf("%v %v", out, err)) is also used in tests TestTagUnprefixedRepoByName and TestTagUnprefixedRepoByID.
Maybe it is need a cleanup

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm ya we can send a cleanup PR down the road :) thanks!

@coolljt0725

Copy link
Copy Markdown
Contributor Author

update

Comment thread integration-cli/docker_cli_tag_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey sorry we got rid of the errorOut function in a cleanup PR so if you could just change these to a t.Fatal that would be great :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfrazelle OK,updated

Signed-off-by: Lei Jitang <[email protected]>
@coolljt0725

Copy link
Copy Markdown
Contributor Author

update the PR,change errorOut to t.Fatal

@jessfraz

Copy link
Copy Markdown
Contributor

awesome thank you LGTM

@crosbymichael

Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants