summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2011-10-31 14:29:46 -0700
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-11-16 21:46:18 +0100
commita54dd53673444fc4227341ecfdd78fb2710b600d (patch)
treea0094981b1019562735c6b26b6a7e9df57d98f75 /src
parent147d5e3b56eed7577c7be0c70280b919b7227a65 (diff)
Treat HEAD as a branch to fix regressions caused by 3ef7db5
Diffstat (limited to 'src')
-rw-r--r--src/rebar_deps.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index fdd8da1..9261e25 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -352,9 +352,9 @@ download_source(AppDir, {hg, Url, Rev}) ->
[{cd, filename:dirname(AppDir)}]),
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [{cd, AppDir}]);
download_source(AppDir, {git, Url}) ->
- download_source(AppDir, {git, Url, "HEAD"});
+ download_source(AppDir, {git, Url, {branch, "HEAD"}});
download_source(AppDir, {git, Url, ""}) ->
- download_source(AppDir, {git, Url, "HEAD"});
+ download_source(AppDir, {git, Url, {branch, "HEAD"}});
download_source(AppDir, {git, Url, {branch, Branch}}) ->
ok = filelib:ensure_dir(AppDir),
rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]),
@@ -400,9 +400,9 @@ update_source(Dep) ->
end.
update_source(AppDir, {git, Url}) ->
- update_source(AppDir, {git, Url, "HEAD"});
+ update_source(AppDir, {git, Url, {branch, "HEAD"}});
update_source(AppDir, {git, Url, ""}) ->
- update_source(AppDir, {git, Url, "HEAD"});
+ update_source(AppDir, {git, Url, {branch, "HEAD"}});
update_source(AppDir, {git, _Url, {branch, Branch}}) ->
ShOpts = [{cd, AppDir}],
rebar_utils:sh("git fetch origin", ShOpts),