git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: I just want the revision

From
TToddAndMargo <toddandmargo@zoho.com>
Date
Oct 11, 2021, 10:09 UTC
Message-ID
<a12adb98-d8c1-cd36-1760-343360a9ba85@zoho.com>
In-Reply-To
<CAP8UFD1_2g84epP+qjP2QW2g2bzdWcepPE60rY2vdKpTZFdEDg@mail.gmail.com>
On 10/11/21 02:45, Christian Couder wrote:
Show 39 quoted lines
> Hi,
> 
> On Mon, Oct 11, 2021 at 4:57 AM ToddAndMargo <ToddAndMargo@zoho.com> wrote:
>>
>> Hi All,
>>
>> I am trying to write a script to tell me the latest revision
>> showing on
>>
>> https://gitlab.freedesktop.org/spice/win32/spice-nsis/-/tree/master
>>
>> which is 'virtio-win: rebase on 0.164", but I can only see this
>> from a web browser, as the page is dynamic.
>>
>> I do have access to the git link on that page:
>>
>> https://gitlab.freedesktop.org/spice/win32/spice-nsis.git
>>
>> Does git (or some other) have a way of telling me
>> JUST the revision without having to download the turkey?
> 
> If you just want the commit ID, you can use for example:
> 
> $ git ls-remote
> https://gitlab.freedesktop.org/spice/win32/spice-nsis.git
> refs/heads/master
> f6ad44f35f5caeec51b7002169977272d85701a3        refs/heads/master
> 
>> If I could get something that contained
>>          virtio-win: rebase on 0.164
>> I could dig out the revision
> 
> You might also want to take a look at the GitLab API docs, for example:
> 
> https://docs.gitlab.com/ee/api/commits.html
> 
> Best,
> Christian.
> 
Hi Christian,

I do not mean to be dense, but how do I get "virtio-win: rebase on 0.164" out of: " f6ad44f35f5caeec51b7002169977272d85701a3 refs/heads/master"?

Perplexed, -T

Previous: Christian CouderNext: ToddAndMargo
Message 3 of 10 in “I just want the revision”
  1. ToddAndMargoOct 11, 2021
  2. Christian CouderOct 11, 2021
  3. ToddAndMargoOct 11, 2021
  4. ToddAndMargoOct 11, 2021
  5. Christian CouderOct 11, 2021
  6. ToddAndMargoOct 11, 2021
  7. Christian CouderOct 11, 2021
  8. Daniel Knittl-FrankOct 11, 2021
  9. Jeff KingOct 11, 2021
  10. ToddAndMargoOct 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.