* [gentoo-user] Status of a GIT repository
@ 2017-12-20 10:04 Helmut Jarausch
2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
0 siblings, 1 reply; 5+ messages in thread
From: Helmut Jarausch @ 2017-12-20 10:04 UTC (permalink / raw
To: gentoo-user
Hi,
I have no experience with GIT.
I'd like to determine if a GIT repository in Gentoo is up-to-date.
Normally, a GIT folder has a '.git' subfolder. Using 'git status' in
such a GIT folder works fine.
But the subfolders in /usr/portage/distfiles/git3-src don't contain a
'.git' subfolder.
A plain 'git status' in such a subfolder doesn't work - I get "fatal:
This operation must be run in a work tree".
Is there a means to determine the status of a Gentoo-GIT-folder?
Background: I'd like to check if anything has changed in the GIT
repository before I run an 'emerge -u' for that.
Many thanks for a hint,
Helmut
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Status of a GIT repository
2017-12-20 10:04 [gentoo-user] Status of a GIT repository Helmut Jarausch
@ 2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
2017-12-20 10:43 ` Marc Joliet
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2017-12-20 10:28 UTC (permalink / raw
To: gentoo-user
В письме от среда, 20 декабря 2017 г. 17:04:33 +07 пользователь Helmut
Jarausch написал:
> Hi,
> I have no experience with GIT.
>
> I'd like to determine if a GIT repository in Gentoo is up-to-date.
> Normally, a GIT folder has a '.git' subfolder. Using 'git status' in
> such a GIT folder works fine.
>
> But the subfolders in /usr/portage/distfiles/git3-src don't contain a
> '.git' subfolder.
> A plain 'git status' in such a subfolder doesn't work - I get "fatal:
> This operation must be run in a work tree".
>
> Is there a means to determine the status of a Gentoo-GIT-folder?
>
> Background: I'd like to check if anything has changed in the GIT
> repository before I run an 'emerge -u' for that.
>
> Many thanks for a hint,
> Helmut
1) there is no "Gentoo-GIT-folder". The things in $DISTDIR/git3-src is called
"bare" repositories (i.e. it is that ".git" folder itself, without "unpacked"
work tree, like you have in $PORTDIR)
2) Although, all the ways to check it would be too hard for your purpose.
3) but there is nice tool for your purpose: it's called `app-portage/smart-
live-rebuild`.
So, just emerge it, and then just run `emerge @smart-live-rebuild` (it
provides special virtual set) periodically. It will perform all the checks for
you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Status of a GIT repository
2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
@ 2017-12-20 10:43 ` Marc Joliet
2017-12-20 11:23 ` Helmut Jarausch
2017-12-20 16:04 ` [gentoo-user] " Ian Zimmerman
2 siblings, 0 replies; 5+ messages in thread
From: Marc Joliet @ 2017-12-20 10:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 2197 bytes --]
Am Mittwoch, 20. Dezember 2017, 11:28:31 CET schrieb Vadim A. Misbakh-Soloviov:
> В письме от среда, 20 декабря 2017 г. 17:04:33 +07 пользователь Helmut
>
> Jarausch написал:
> > Hi,
> > I have no experience with GIT.
> >
> > I'd like to determine if a GIT repository in Gentoo is up-to-date.
> > Normally, a GIT folder has a '.git' subfolder. Using 'git status' in
> > such a GIT folder works fine.
> >
> > But the subfolders in /usr/portage/distfiles/git3-src don't contain a
> > '.git' subfolder.
> > A plain 'git status' in such a subfolder doesn't work - I get "fatal:
> > This operation must be run in a work tree".
> >
> > Is there a means to determine the status of a Gentoo-GIT-folder?
> >
> > Background: I'd like to check if anything has changed in the GIT
> > repository before I run an 'emerge -u' for that.
> >
> > Many thanks for a hint,
> > Helmut
>
> 1) there is no "Gentoo-GIT-folder". The things in $DISTDIR/git3-src is
> called "bare" repositories (i.e. it is that ".git" folder itself, without
> "unpacked" work tree, like you have in $PORTDIR)
> 2) Although, all the ways to check it would be too hard for your purpose.
>
> 3) but there is nice tool for your purpose: it's called `app-portage/smart-
> live-rebuild`.
> So, just emerge it, and then just run `emerge @smart-live-rebuild` (it
> provides special virtual set) periodically. It will perform all the checks
> for you.
You wrote everything I was going to, and also something I didn't know :) . I always thought
you had to invoke smart-live-rebuild as its own command and never realised that it also
provided a special set. Cool!
I'll just add to your second point that while you can operate within a bare repository (and
some commands work directly, e.g., "git gc"), they are usually what you push to and fetch
from (meaning that you don't need a special server to host a git repo, you can just put a bare
repository on, e.g., a shared folder and use that as your origin).
Greetings
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #1.2: Type: text/html, Size: 9274 bytes --]
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Status of a GIT repository
2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
2017-12-20 10:43 ` Marc Joliet
@ 2017-12-20 11:23 ` Helmut Jarausch
2017-12-20 16:04 ` [gentoo-user] " Ian Zimmerman
2 siblings, 0 replies; 5+ messages in thread
From: Helmut Jarausch @ 2017-12-20 11:23 UTC (permalink / raw
To: gentoo-user; +Cc: Vadim A. Misbakh-Soloviov
On 12/20/2017 11:28:31 AM, Vadim A. Misbakh-Soloviov wrote:
> В письме от среда, 20 декабря 2017 г. 17:04:33 +07 пользователь Helmut
> Jarausch написал:
> > Hi,
> > I have no experience with GIT.
> >
> > I'd like to determine if a GIT repository in Gentoo is up-to-date.
> > Normally, a GIT folder has a '.git' subfolder. Using 'git status' in
> > such a GIT folder works fine.
> >
> > But the subfolders in /usr/portage/distfiles/git3-src don't contain
> a
> > '.git' subfolder.
> > A plain 'git status' in such a subfolder doesn't work - I get
> "fatal:
> > This operation must be run in a work tree".
> >
> > Is there a means to determine the status of a Gentoo-GIT-folder?
> >
> > Background: I'd like to check if anything has changed in the GIT
> > repository before I run an 'emerge -u' for that.
> >
> > Many thanks for a hint,
> > Helmut
>
> 1) there is no "Gentoo-GIT-folder". The things in $DISTDIR/git3-src
> is called
> "bare" repositories (i.e. it is that ".git" folder itself, without
> "unpacked"
> work tree, like you have in $PORTDIR)
> 2) Although, all the ways to check it would be too hard for your
> purpose.
> 3) but there is nice tool for your purpose: it's called
> `app-portage/smart-
> live-rebuild`.
> So, just emerge it, and then just run `emerge @smart-live-rebuild` (it
> provides special virtual set) periodically. It will perform all the
> checks for
> you.
Many thanks! This looks like it saves me a lot of work ( I was willing
to write a Python script myself).
Helmut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-user] Re: Status of a GIT repository
2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
2017-12-20 10:43 ` Marc Joliet
2017-12-20 11:23 ` Helmut Jarausch
@ 2017-12-20 16:04 ` Ian Zimmerman
2 siblings, 0 replies; 5+ messages in thread
From: Ian Zimmerman @ 2017-12-20 16:04 UTC (permalink / raw
To: gentoo-user
On 2017-12-20 17:28, Vadim A. Misbakh-Soloviov wrote:
> 2) Although, all the ways to check it would be too hard for your purpose.
Well, "git log" still works in a bare repo, right?
It is true that it would be necessary to do it in each subtree of
git3-src, and remember the result somehow.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet, fetch the TXT record for the domain.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-20 16:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 10:04 [gentoo-user] Status of a GIT repository Helmut Jarausch
2017-12-20 10:28 ` Vadim A. Misbakh-Soloviov
2017-12-20 10:43 ` Marc Joliet
2017-12-20 11:23 ` Helmut Jarausch
2017-12-20 16:04 ` [gentoo-user] " Ian Zimmerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox