You can get the current sha1 with the command

$> git rev-parse HEAD

And you can replace HEAD with the name of a branch/tag to get the sha1 of
that. See
$> git help rev-parse
for all the options



On Thu, Dec 31, 2015 at 10:42 AM, Uwe Schindler (JIRA) <[email protected]>
wrote:

>
>     [
> https://issues.apache.org/jira/browse/LUCENE-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076029#comment-15076029
> ]
>
> Uwe Schindler commented on LUCENE-6938:
> ---------------------------------------
>
> bq. Wow  I bet there is a good chance this is much faster with Git.
> Otherwise, there must be some way to just get the checkout sha once and use
> it for every jar?
>
> Yes that would work. I was about to do that on svn already. The trick is
> to just populate the property once and pass it down to sub-builds (using
> the patternset of properties to pass down). We then just need a task that
> populates the property if it doest not yet exists (unless="property")
>
> I think we should just replace the old SVN revision in JAR files by the
> sha1. It should be easy to get it with a single "git" command (no idea how:
> I am still not firm in using Git's CLI; I always use TortoiseGit, because
> the command line of Git is the most confusing an user-unfriendly thing I
> have ever seen).
>
> FYI: I would not call "jgit" to populate the property at the moment - if
> we cache the result its fine - because this will cause permgen errors in
> Java 7 (the well-known Ant Classloader bug). Otherwise I would have
> implemented the same for SVN already :-) (I have a patch here for SVN
> similar to Dawid's code, but this breaks the whole build after a complete
> build with many JAR files).
>
> > Convert build to work with Git rather than SVN.
> > -----------------------------------------------
> >
> >                 Key: LUCENE-6938
> >                 URL: https://issues.apache.org/jira/browse/LUCENE-6938
> >             Project: Lucene - Core
> >          Issue Type: Task
> >            Reporter: Mark Miller
> >            Assignee: Mark Miller
> >         Attachments: LUCENE-6938.patch
> >
> >
> > We assume an SVN checkout in parts of our build and will need to move to
> assuming a Git checkout.
> > Patches against https://github.com/dweiss/lucene-solr-svn2git from
> LUCENE-6933.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to