Re: [Launchpad-reviewers] [Merge] ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master

2023-07-09 Thread Richard Hansen
I opened an alternative merge request [1] that is the same as this one except:
  - Tags are put in refs/tags//* instead of refs/remotes//* (to 
avoid potential name collisions).
  - I added some comments explaining why fetching is done the way it is.
  - I added tests.

[1] 
https://code.launchpad.net/~rhansen/git-build-recipe/+git/git-build-recipe/+merge/446358
-- 
https://code.launchpad.net/~lool/git-build-recipe/+git/git-build-recipe/+merge/443942
Your team Launchpad code reviewers is requested to review the proposed merge of 
~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master

2023-07-08 Thread Richard Hansen
To avoid conflicts between tags and branches, I recommend putting tags inside 
refs/tags/{remote}/* like this:

diff --git a/gitbuildrecipe/recipe.py b/gitbuildrecipe/recipe.py
index f932ca7..3b51d98 100644
--- a/gitbuildrecipe/recipe.py
+++ b/gitbuildrecipe/recipe.py
@@ -339,11 +339,10 @@ def fetch_branches(child_branch):
 logging.info(
 "Failed to fetch HEAD; recipe instructions for this repository "
 "that do not specify a branch name will fail.")
-# Fetch all remote branches and (implicitly) any tags that reference
-# commits in those refs. Tags that aren't on a branch won't be fetched.
 child_branch.git_call(
 "fetch", url,
-"refs/heads/*:refs/remotes/%s/*" % child_branch.remote_name)
+"refs/heads/*:refs/remotes/%s/*" % child_branch.remote_name,
+"refs/tags/*:refs/tags/%s/*" % child_branch.remote_name)
 
 
 @lru_cache(maxsize=1)

-- 
https://code.launchpad.net/~lool/git-build-recipe/+git/git-build-recipe/+merge/443942
Your team Launchpad code reviewers is requested to review the proposed merge of 
~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master

2023-06-01 Thread Hector CAO
LGTM, +1
Tested on my local machine, the tags needed by pristine-tar are fetched 
correctly
-- 
https://code.launchpad.net/~lool/git-build-recipe/+git/git-build-recipe/+merge/443942
Your team Launchpad code reviewers is requested to review the proposed merge of 
~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp