Thread (1 message) 1 message, 1 author, 2023-08-11

Re: "fatal: Not a git repository" issued during 'make' from source code

From: Junio C Hamano <hidden>
Date: 2023-08-11 20:44:28

Junio C Hamano [off-list ref] writes:
[off-list ref] writes:
quoted
On Friday, August 11, 2023 3:57 PM, Mun Johl wrote:
quoted
I am new to git and am trying to compile git-2.41.0 on RHEL7.  When I run
'make
quoted
prefix=/usr/local all doc', I get the following error:

fatal: Not a git repository (or any parent up to mount point /tools)

Which I infer means that I need to do the build within a git repo.  Is that
correct?  Or
quoted
have I missed some basic step in the build process?
Yes, you must be in the cloned git repository in order to run the build.
Shouldn't we be able to build out of a tarball?
In other words,

    $ mkdir -p /var/tmp/x
    $ cd /var/tmp/x
    $ wget http://www.kernel.org/pub/software/scm/git/testing/git-2.42.0.rc1.tar.xz
    $ tar xf git-2.42.0.rc1.tar.xz
    $ cd git-2.42.0.rc1
    $ make prefix=/var/tmp/local all doc
    $ sudo make prefix=/var/tmp/local install

is what I just did to make sure that a build from our tarball extract
does not require a git repository (it would be a bug to require one,
as it would make it impossible to bootstrap).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help