All of lore.kernel.org
 help / color / mirror / Atom feed
* Getting "fatal: Not a git repository"
@ 2009-03-04 21:54 Mark Butsch
  2009-03-04 21:59 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Butsch @ 2009-03-04 21:54 UTC (permalink / raw)
  To: openembedded-devel

Hello,

I am getting the message "fatal: Not a git repository" when I build. It
doesn't seem to be causing a problem, but it bothers me none the less.

---------
[mbutsch@tuxoe 4G]$ bitbake task-base
NOTE: Handling BitBake files: \ (6587/6587) [100 %]
NOTE: Parsing finished. 6325 cached, 0 parsed, 262 skipped, 0 masked.
NOTE: Cache is clean, not saving.
NOTE: build 200903041647: started
fatal: Not a git repository
fatal: Not a git repository

OE Build Configuration:
BB_VERSION        = "1.8.13"
METADATA_BRANCH   = "<unknown>"
METADATA_REVISION = "<unknown>"
TARGET_ARCH       = "i686"
TARGET_OS         = "linux"
MACHINE           = "4g-i686"
DISTRO            = "4g"
DISTRO_VERSION    = ".dev-snapshot-20090304"
TARGET_FPU        = ""
-----------

I am using an overlay, is that causing this?

Any suggestions on how to solve this?

Thanks,

Mark




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Getting "fatal: Not a git repository"
  2009-03-04 21:54 Getting "fatal: Not a git repository" Mark Butsch
@ 2009-03-04 21:59 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2009-03-04 21:59 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Mar 04, 2009 at 04:54:56PM -0500, Mark Butsch wrote:

> Hello,
> 
> I am getting the message "fatal: Not a git repository" when I build. It
> doesn't seem to be causing a problem, but it bothers me none the less.

Totally untested:

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 18afc1a..d716bcb 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -807,7 +807,7 @@ def base_get_metadata_svn_revision(d):
 
 def base_get_metadata_git_branch(d):
 	import os
-	branch = os.popen('cd %s; git branch | grep "^* " | tr -d "* "' % base_get_scmbasepath(d)).read()
+	branch = os.popen('cd %s; git branch 2>/dev/null | grep "^* " | tr -d "* "' % base_get_scmbasepath(d)).read()
 
 	if len(branch) != 0:
 		return branch
@@ -815,7 +815,7 @@ def base_get_metadata_git_branch(d):
 
 def base_get_metadata_git_revision(d):
 	import os
-	rev = os.popen("cd %s; git log -n 1 --pretty=oneline --" % base_get_scmbasepath(d)).read().split(" ")[0]
+	rev = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>/dev/null" % base_get_scmbasepath(d)).read().split(" ")[0]
 	if len(rev) != 0:
 		return rev
 	return "<unknown>"

-- 
Tom Rini



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-04 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 21:54 Getting "fatal: Not a git repository" Mark Butsch
2009-03-04 21:59 ` Tom Rini

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.