Skip to content
Snippets Groups Projects
Unverified Commit 9dedbe52 authored by boklm's avatar boklm
Browse files

Bug 40082: Fix `fetch: if_needed` to avoid fetching when using a fixed commit

Remove trailing newline from output of `git rev-parse` when comparing
it with `git_hash`.
parent 8c773150
Branches
Tags
1 merge request!67Bug 40082: Fix `fetch: if_needed` to avoid fetching when using a fixed commit
......@@ -427,6 +427,7 @@ sub git_need_fetch {
my ($stdout, undef, $success) = capture_exec('git', 'rev-parse',
'--verify', "$git_hash^{commit}");
return 1 unless $success;
chomp $stdout;
# If rev-parse returns the same as git_hash, then git_hash is
# a hash and there is no need to fetch
return 0 if $stdout eq $git_hash;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment