diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-18 13:02:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-18 13:02:57 +0200 |
commit | e063e03404f0d36ffe2de90574e4601461d13517 (patch) | |
tree | 5e84d47d420ca54edc4485d99f89e7bbe5871abe /src/import/pull.c | |
parent | fd23f9c9a70e1214507641d327da40d1688b74d7 (diff) | |
parent | 4764a54439e51cc3d3d0858a94a2d03a352a628c (diff) |
Merge pull request #247 from shaded-enmity/origin/pullfix
import/pull: fix for the name/reference overwrite
Diffstat (limited to 'src/import/pull.c')
-rw-r--r-- | src/import/pull.c | 16 |
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)) { |