Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ref name as tag name instead of the constant "tobuild" #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devrandom
Copy link
Owner

@dongcarl @abitmore - here's yet another improvement to #238, naming the local tag the same as the ref that was requested on the command line. This play better with git describe --tags.

Review / test would be welcome.

Fixes #243.

@abitmore
Copy link
Contributor

Thanks. I'll test and report back.

@abitmore
Copy link
Contributor

Unfortunately this does not work when checking out a commit or a branch, since git describe --tags may return different result after added the new tag.

Ideally we should avoid adding tags. I'll take a look to see how to fix it.

GIT-DESCRIBE(1)                                                             Git Manual                                                             GIT-DESCRIBE(1)

NAME
       git-describe - Describe a commit using the most recent tag reachable from it

SYNOPSIS
       git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]
       git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]

DESCRIPTION
       The command finds the most recent tag that is reachable from a commit. 
If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes
       the tag name with the number of additional commits on top of the tagged 
object and the abbreviated object name of the most recent commit.

       By default (without --all or --tags) git describe only shows annotated tags. 
For more information about creating annotated tags see the -a and -s options
       to git-tag(1).

...

       --tags
           Instead of using only the annotated tags, use any tag found in refs/tags 
namespace. This option enables matching a lightweight (non-annotated) tag.

...

@abitmore
Copy link
Contributor

It turns out that

  • by fetching only the target commit/tag/branch (aka Specifically fetch the requested commit #238) gitian-builder saves bandwidth and etc, although it is sufficient for the build step itself, but no additional info is fetched which might be useful or needed for next steps for building;
  • by fetching all heads and tags it makes more info available, with a trade-off that more data gets transferred.

Apparently we can't have both. Perhaps a better approach is to define a new option, e.g. --fetch-all, so that everyone would be happier?

@abitmore
Copy link
Contributor

See #245.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checking out source as tobuild is not ideal
2 participants