* last commit in a directory
@ 2011-01-25 8:29 Leonid Podolny
2011-01-25 8:47 ` Johannes Sixt
0 siblings, 1 reply; 3+ messages in thread
From: Leonid Podolny @ 2011-01-25 8:29 UTC (permalink / raw)
To: git
Hi,
I have a really simple question: how do I find a last commit for the given directory inside the repository? I want to avoid rebuilding the specific part of the project if there were no changes in it since the last build, so I need to find the sha of the last time the directory was changed.
Thanks, L.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: last commit in a directory
2011-01-25 8:29 last commit in a directory Leonid Podolny
@ 2011-01-25 8:47 ` Johannes Sixt
2011-01-25 8:50 ` Leonid Podolny
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2011-01-25 8:47 UTC (permalink / raw)
To: Leonid Podolny; +Cc: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: last commit in a directory
2011-01-25 8:47 ` Johannes Sixt
@ 2011-01-25 8:50 ` Leonid Podolny
0 siblings, 0 replies; 3+ messages in thread
From: Leonid Podolny @ 2011-01-25 8:50 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
On 01/25/2011 10:47 AM, Johannes Sixt wrote:
> 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")
>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-25 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 8:29 last commit in a directory Leonid Podolny
2011-01-25 8:47 ` Johannes Sixt
2011-01-25 8:50 ` Leonid Podolny
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.