From: Johannes Sixt <j.sixt@viscovery.net>
To: Leonid Podolny <leonidp.lists@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: last commit in a directory
Date: Tue, 25 Jan 2011 09:47:07 +0100 [thread overview]
Message-ID: <4D3E8E0B.2090200@viscovery.net> (raw)
In-Reply-To: <4D3E89FA.4080901@gmail.com>
Am 1/25/2011 9:29, schrieb Leonid Podolny:
> I have a really simple question: how do I find a last commit for the given
> directory inside the repository?
git log -1 that/directory
But if you need it in a script, this is preferable:
lastsha1=$(git rev-list -1 HEAD -- "$directory")
-- Hannes
next prev parent reply other threads:[~2011-01-25 8:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 8:29 last commit in a directory Leonid Podolny
2011-01-25 8:47 ` Johannes Sixt [this message]
2011-01-25 8:50 ` Leonid Podolny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3E8E0B.2090200@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=leonidp.lists@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox