summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-06-18 13:02:57 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-18 13:02:57 +0200
commite063e03404f0d36ffe2de90574e4601461d13517 (patch)
tree5e84d47d420ca54edc4485d99f89e7bbe5871abe /src
parentfd23f9c9a70e1214507641d327da40d1688b74d7 (diff)
parent4764a54439e51cc3d3d0858a94a2d03a352a628c (diff)
Merge pull request #247 from shaded-enmity/origin/pullfix
import/pull: fix for the name/reference overwrite
Diffstat (limited to 'src')
-rw-r--r--src/import/pull.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/import/pull.c b/src/import/pull.c
index ca33d2f3fa..ca7be6be85 100644
--- a/src/import/pull.c
+++ b/src/import/pull.c
@@ -245,15 +245,15 @@ static int pull_dkr(int argc, char *argv[], void *userdata) {
if (digest) {
reference = digest + 1;
name = strndupa(argv[1], digest - argv[1]);
- }
-
- reference = strchr(argv[1], ':');
- if (reference) {
- name = strndupa(argv[1], reference - argv[1]);
- reference++;
} else {
- name = argv[1];
- reference = "latest";
+ reference = strchr(argv[1], ':');
+ if (reference) {
+ name = strndupa(argv[1], reference - argv[1]);
+ reference++;
+ } else {
+ name = argv[1];
+ reference = "latest";
+ }
}
if (!dkr_name_is_valid(name)) {