Git development
 help / color / mirror / Atom feed
* [RFC] On how to manage tags fetched from remote?
From: rae l @ 2008-11-19  2:27 UTC (permalink / raw)
  To: Junio C Hamano, git

The application field:

I use one git working tree to track many remote git repository:

 $ git remote -v
 227-archives	ssh://192.168.3.227/vmos/linux-with-dm-patches.git
 block	git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
 btrfs	git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
 cryptodev	git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
 djbw-md	git://git.kernel.org/pub/scm/linux/kernel/git/djbw/md.git
 dk-block	git://git.kernel.dk/linux-2.6-block
 fastboot	git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
 gfs2-2.6-nmw	git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git
 linux-2.6-stable	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
 linux-2.6-target	git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-target.git
 linux-iscsi	git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git
 linux-mm-trees	git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git
 linux-nfs-server	git://git.linux-nfs.org/projects/bfields/linux.git
 lio-core-2.6	git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git
 ocfs2	git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git
 origin	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 rostedt-rt	git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git
 staging	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
 tj-misc	git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git
 tytso-ext4	git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
 utrace	git://git.kernel.org/pub/scm/linux/kernel/git/frob/utrace.git
 v16.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git
 v21.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.21.y.git
 v22.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.22.y.git
 v23.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.23.y.git
 v24.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.24.y.git
 v25.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git
 v26.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.26.y.git
 v27.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git
 xfs	git://oss.sgi.com:8090/xfs/xfs-2.6.git

Among them only 227-archives is where I will push to, others are all fetch only,

When I want to update, I just issue a "git remote -v update" command,

I'd like tags from origin, and from the stable kernel team, those tags
are all named well,
like v2.6.27, v2.6.27.1, v2.6.28-rc1, ...

But some tags from some other developeres are named bad, some tags named origin,
or named block, which will be ambigous when I want to refer a local remote name.

Asking every developer to delete their ambigous tag name is very troublesome!

The problem is because tags have no namespace, not similar to remote
branches have
namespaces which I named for the remote. Like this command: "git branch -a":

  master
  my-test
  block/bfq
  block/blktrace
  block/cmdfilter
  block/dynpipe
  block/fcache
  block/for-linus
  djbw-md/for-neil
  ...

The local branch have no namespace, while remote branches all have
their remote name first.

One solution to avoid the ambigous names is that give tags namespaces,
too; But then a tag
will not be a simple tag anymore;

Another approach is not fetching tags from remotes which have ambigous
tag names; the current
git implementation will need I run "git fetch -n <remote>" many times,
I cannot use just one
"git remote -v update";

To achieve one "git remote -v update", there are two approaches, too:
1. Bypassing any switches or other arguments after "git remote udpate"
directly to git fetch,
  then "git remote update -n" will call "git fetch -n";
  But this will disable all tags in all remotes;
2. Store a no-tags config item to the remote config, which like:
  [remote "linux-iscsi"]
	url = git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git
	fetch = +refs/heads/*:refs/remotes/linux-iscsi/*
	fetch-tags = false
  when git fetch read the no-tags config, it will disable tags from this remote;

I think the last approach is the best, and most feasible;

However, please comment. Thanks.

-- 
Cheng Renquan, Shenzhen, China
Steven Wright  - "Cross country skiing is great if you live in a small country."

^ permalink raw reply

* Re: "secret key not available". "unable to sign the tag".
From: Gary Yang @ 2008-11-19  2:19 UTC (permalink / raw)
  To: Pete Harlan; +Cc: git
In-Reply-To: <49236F67.6080807@pcharlan.com>

FYI,

Pete helped me solved the problem. Somehow I got two gpg keys. Pete discovered that and suggested me the proper command to tag the code. I am going to figure out how to remove the extra key. Many thanks to Pete.

git tag -u 'For git' -s some-tag

Sincerely,


Gary



--- On Tue, 11/18/08, Pete Harlan <pgit@pcharlan.com> wrote:

> From: Pete Harlan <pgit@pcharlan.com>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: garyyang6@yahoo.com
> Date: Tuesday, November 18, 2008, 5:44 PM
> Hi Gary,
> 
> No output doesn't mean anything is wrong, just that my
> suggestion wasn't
> useful.
> 
> I saw from your other post that you use C-shell.  I tried
> things here
> using C-shell and it all worked as expected.
> 
> One odd-looking thing is that when you show it working from
> the
> command-line it says:
> 
> > > > You need a passphrase to unlock the secret
> key for
> > > > user: "Gary Yang (For git.)
> > > > <garyyang6@yahoo.com>"
> 
> whereas when you show it not working within Git it says:
> 
> > gpg: skipped `Gary Yang
> > <garyyang6@yahoo.com>': secret key not
> > available
> > gpg: signing failed: secret key not available
> 
> which leads me to believe that you have two similarly-named
> keys, and
> that the command-line gpg is finding the one that has
> "For git" in the
> name, but git is finding the one that doesn't, and this
> second one
> doesn't have a secret key available.
> 
> If you try specifying the first key to git:
> 
>   git tag -u 'For git' -s some-tag
> 
> does that work?
> 
> --Pete
> 
> 
> Gary Yang wrote:
> > Hi Pete,
> > 
> > I got no output of the commands you told me. That
> means I have no environment setup. Can you please tell me
> what kind of environment variables need to setup? Thank you
> very much!
> > 
> >> env | grep -i gnupg
> >> env | grep -i gpg
> >> env | grep -i pgp
> > 
> > 
> > Gary
> > 
> > --- On Tue, 11/18/08, Pete Harlan
> <pgit@pcharlan.com> wrote:
> > 
> >> From: Pete Harlan <pgit@pcharlan.com>
> >> Subject: Re: "secret key not available".
> "unable to sign the tag".
> >> To: garyyang6@yahoo.com
> >> Date: Tuesday, November 18, 2008, 5:16 PM
> >> Gary Yang wrote:
> >>> Hi Pete,
> >>>
> >>> What I should export? Do you have any idea?
> >> Hi Gary,
> >>
> >> I'd look for anything that says gnupg or gpg
> in the
> >> environment.
> >>
> >> env | grep -i gnupg
> >> env | grep -i gpg
> >> env | grep -i pgp
> >>
> >> I'm afriad it's not much of an idea.  If
> the above
> >> don't match
> >> anything, I don't know what to suggest.
> >>
> >> Good luck,
> >>
> >> --Pete
> >>
> >>
> >>
> >>>
> >>> Thank you,
> >>>
> >>>
> >>> Gary
> >>>
> >>>
> >>>
> >>>
> >>> --- On Tue, 11/18/08, Pete Harlan
> >> <pgit@pcharlan.com> wrote:
> >>>> From: Pete Harlan
> <pgit@pcharlan.com>
> >> Subject: Re: "secret key not
> >>>> available". "unable to sign the
> >> tag". To: garyyang6@yahoo.com Date:
> >>>> Tuesday, November 18, 2008, 2:18 PM Gary
> Yang
> >> wrote:
> >>>>> Peter,
> >>>>>
> >>>>> The gpg works. But, git tag dose not
> work. Any
> >> idea?
> >>>> Could gpg be using something from your
> environment
> >> that you're not 
> >>>> exporting, so git can't see it?
> >>>>
> >>>> --Pete
> >>>>
> >>>>
> >>>>> gpg --detach-sign foo.bar gpg:
> WARNING: using
> >> insecure memory! 
> >>>>> gpg: please see
> http://www.gnupg.org/faq.html
> >> for more
> >>>> information
> >>>>> You need a passphrase to unlock the
> secret key
> >> for user: "Gary
> >>>>> Yang (For git.)
> >>>> <garyyang6@yahoo.com>"
> >>>>> 1024-bit DSA key, ID A3F6A45E, created
> >> 2008-11-14
> >>>>> Enter passphrase:
> >>>>>
> >>>>>
> >>>>> [garyyang6@svdclc313
> ~/git-repository]%
> >>>>>
> >>>>>
> >>>>> It successfully signed.
> >>>>>
> >>>>>
> >>>>> Gary
> >>>>>
> > 
> > 
> >


      

^ permalink raw reply

* Re: [PATCH 5/9] update-index: add --checkout/--no-checkout to update CE_NO_CHECKOUT bit
From: Junio C Hamano @ 2008-11-19  2:18 UTC (permalink / raw)
  To: Jeff King; +Cc: Nguyễn Thái Ngọc Duy, git, Shawn O. Pearce
In-Reply-To: <7vk5b0vp19.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Jeff King <peff@peff.net> writes:
>
>> On Wed, Oct 01, 2008 at 11:04:05AM +0700, Nguyễn Thái Ngọc Duy wrote:
>>
>>> +test_expect_success 'setup' '
>>> +	mkdir sub &&
>>> +	touch 1 2 sub/1 sub/2 &&
>>> +	git add 1 2 sub/1 sub/2
>>
>> Mind-boggling, but this manages to break on Solaris. Fix is
>> below.
>
> I tend to avoid "touch", not specifically for this reason, but surely this
> is another reason why ">sub/1" is much better way to create a throw-away
> file ;-)
>
>> Note that this has implications for 'touch "$FOO" "$BAR"'
>> used in scripts if FOO might be entirely numeric. However, a
>> quick grep shows we usually touch one file at a time.
>
> You can always do:
>
> 	: >>"$FOO"

Having said all that, I wouldn't suggest redoing the patch using >>
redirection.  But change from "touch 1 nondigit" to "touch nondigit 1"
is a bit too subtle to my taste.  Let's write it this way instead:

diff --git a/t/t2104-update-index-no-checkout.sh b/t/t2104-update-index-no-checkout.sh
index be9f913..37a6861 100755
--- a/t/t2104-update-index-no-checkout.sh
+++ b/t/t2104-update-index-no-checkout.sh
@@ -9,7 +9,7 @@ test_description='git update-index no-checkout bits (a.k.a sparse checkout)'
 
 test_expect_success 'setup' '
 	mkdir sub &&
-	touch 1 2 sub/1 sub/2 &&
+	touch ./1 ./2 sub/1 sub/2 &&
 	git add 1 2 sub/1 sub/2
 '
 

^ permalink raw reply related

* Re: [PATCH] Retain multiple -q/-v occurrences in git pull
From: Junio C Hamano @ 2008-11-19  1:53 UTC (permalink / raw)
  To: Tuncer Ayaz; +Cc: git
In-Reply-To: <1226959770-4252-1-git-send-email-tuncer.ayaz@gmail.com>

Thanks, queued.

^ permalink raw reply

* Re: [PATCH] Documentation: rev-list-options.txt: added --branches, --tags & --remotes.
From: Junio C Hamano @ 2008-11-19  1:53 UTC (permalink / raw)
  To: Mark Burton; +Cc: git mailing list
In-Reply-To: <20081117210359.316adf11@crow>

Thanks.

^ permalink raw reply

* Re: [PATCH 2/2] git-remote: add verbose mode to git remote update
From: Junio C Hamano @ 2008-11-19  1:53 UTC (permalink / raw)
  To: crquan; +Cc: git
In-Reply-To: <1227006242-21290-1-git-send-email-crquan@gmail.com>

crquan@gmail.com writes:

> From: Cheng Renquan <crquan@gmail.com>
>
> Pass the verbose mode parameter to the underlying fetch command.
>
>   $ ./git remote -v update
>   Updating origin
>   From git://git.kernel.org/pub/scm/git/git
>   ...
> Signed-off-by: Cheng Renquan <crquan@gmail.com>
> ---
>   So now the patch looks very simple.

Indeed it does ;-), but there still is a minor nit.

> +	"git remote update [-v | --verbose] [group]",

Notice the difference between the example in your commit log message and
the help text?

I think "git remote [options] [cmd] [more options]" which is the current
option parser seems to try doing is very misguided, and a longer term
fix-up might be to redo the cmd_remote() option parser, but in the short
term, let's apply your patch with the following minor fixup:

diff --git c/builtin-remote.c w/builtin-remote.c
index 0af742b..abc8dd8 100644
--- c/builtin-remote.c
+++ w/builtin-remote.c
@@ -14,7 +14,7 @@ static const char * const builtin_remote_usage[] = {
 	"git remote rm <name>",
 	"git remote show [-n] <name>",
 	"git remote prune [-n | --dry-run] <name>",
-	"git remote update [-v | --verbose] [group]",
+	"git remote [-v | --verbose] update [group]",
 	NULL
 };
 

^ permalink raw reply related

* Re: Git commit won't add an untracked file given on the command line
From: Junio C Hamano @ 2008-11-19  1:51 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Mark Burton, Francis Galiegue, git
In-Reply-To: <alpine.DEB.1.00.0811190206170.30769@pacific.mpi-cbg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> It may be a traditional wart, but a helpful one.  Remember, you can also 
> say:
>
> 	git commit that/directory/
>
> I do _not_ want Git to add all untracked (and unignored) files in that 
> directory automatically.

Yes, very much so.

Although it is conceivable that we may want to change that to behave more
like "git add that/directory && git commit that/directory", that is a
rather large UI semantics change (even if it could be a useful one) that
needs to wait for a major version bump, perhaps in 1.7.0.

I think Mark's update to the documentation is a good thing to have in any
case, so I've applied it.

^ permalink raw reply

* removing svn remotes
From: Matt Graham @ 2008-11-19  1:47 UTC (permalink / raw)
  To: git

Hi,
I have a svn repo cloned into a git repo.  There are several remote
refs that are there that I don't care about and don't want to fetch.

git svn fetch --fetch-all gets a bunch of stuff from branches I don't want
git svn fetch requires I checkout the branches I care about before fetching

git svn fetch doesn't accept a branch name
git remote rm isn't able to see the svn remotes

Is there a way to either:
1) get rid of the svn remotes that I don't want?
2) fetch only the remotes that I do want?

Thanks!

^ permalink raw reply

* Re: Git commit won't add an untracked file given on the command line
From: Miles Bader @ 2008-11-19  1:21 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Mark Burton, Francis Galiegue, git
In-Reply-To: <alpine.DEB.1.00.0811190206170.30769@pacific.mpi-cbg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> It may be a traditional wart, but a helpful one.  Remember, you can also 
> say:
>
> 	git commit that/directory/
>
> I do _not_ want Git to add all untracked (and unignored) files in that 
> directory automatically.

I agree, but it would kinda handy to have an exception for files
explicitly named on the command line.

-Miles

-- 
Apologize, v. To lay the foundation for a future offense.

^ permalink raw reply

* Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
From: Gary Yang @ 2008-11-19  1:35 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <299370.3004.qm@web37902.mail.mud.yahoo.com>

Never mind. I figured it out. I need to cd to u-boot.git (my local git repository, the run the command, git push linuxgit01:/pub/git/u-boot.git master.


--- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com> wrote:

> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Shawn O. Pearce" <spearce@spearce.org>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 5:28 PM
> inuxgit01 is the box I want to make public repository. At my
> own box, linux12, I ran the command, git push
> linuxgit01:/pub/git/u-boot.git master
> 
> What I did wrong?
> 
> Thanks.
> 
> --- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com>
> wrote:
> 
> > From: Gary Yang <garyyang6@yahoo.com>
> > Subject: Re: How to make public repository
> GIT_DIR=my-git.git git-init Command not found.
> > To: "Shawn O. Pearce"
> <spearce@spearce.org>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, November 18, 2008, 5:21 PM
> > The command, "git --git-dir=my-git.git init"
> > works. But, I got another error.
> > 
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > 
> > The document says that, Your "public
> repository"
> > is now ready to accept your changes. Come back to the
> > machine you have your private repository. From there,
> run
> > this
> >         command:
> >  
> >             $ git push
> > <public-host>:/path/to/my-git.git master
> > 
> > 
> > However, I got "fatal: Not a git repository"
> > error. Do you have any idea?
> > 
> > 
> > git push linuxgit01:/pub/git/u-boot.git master
> > fatal: Not a git repository
> > 
> > inuxgit01 is the box I ran the command, "git
> > --git-dir=u-boot.git init".
> > 
> > Thanks,
> > 
> > 
> > Gary
> > 
> > 
> > 
> > 
> > --- On Tue, 11/18/08, Shawn O. Pearce
> > <spearce@spearce.org> wrote:
> > 
> > > From: Shawn O. Pearce <spearce@spearce.org>
> > > Subject: Re: How to make public repository
> > GIT_DIR=my-git.git git-init Command not found.
> > > To: "Gary Yang"
> <garyyang6@yahoo.com>
> > > Cc: git@vger.kernel.org
> > > Date: Tuesday, November 18, 2008, 3:19 PM
> > > Gary Yang <garyyang6@yahoo.com> wrote:
> > > > Hi,
> > > > 
> > > > I want to make a public repository. I
> followed
> > the
> > > instructions in gitcore-tutorial. I typed
> > > "GIT_DIR=my-git.git git init" per
> > instruction.
> > > But, I got command not found. I do not think this
> is
> > the
> > > correct command. How should I do? I use C-Shell.
> > > > 
> > > >
> > >
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > > > 
> > > > %mkdir my-git.git
> > > > %GIT_DIR=my-git.git git init
> > > > 
> > > > GIT_DIR=my-git.git: Command not found.
> > > 
> > > Instead you can do:
> > > 
> > >   $ git --git-dir=my-git.git init
> > > 
> > > The --git-dir option does the same thing that
> GIT_DIR=
> > was
> > > doing
> > > in a Bourne shell.
> > > 
> > > -- 
> > > Shawn.
> > 
> > 
> >       
> > --
> > To unsubscribe from this list: send the line
> > "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at 
> > http://vger.kernel.org/majordomo-info.html
> 
> 
>       
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

^ permalink raw reply

* Re: Git commit won't add an untracked file given on the command line
From: Johannes Schindelin @ 2008-11-19  1:39 UTC (permalink / raw)
  To: Miles Bader; +Cc: Mark Burton, Francis Galiegue, git
In-Reply-To: <87tza41pf4.fsf@catnip.gol.com>

Hi,

On Wed, 19 Nov 2008, Miles Bader wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > It may be a traditional wart, but a helpful one.  Remember, you can 
> > also say:
> >
> > 	git commit that/directory/
> >
> > I do _not_ want Git to add all untracked (and unignored) files in that 
> > directory automatically.
> 
> I agree, but it would kinda handy to have an exception for files 
> explicitly named on the command line.

Only if you do not have a clear picture of what the staging area is about, 
IMHO.

Ciao,
Dscho

^ permalink raw reply

* Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
From: Gary Yang @ 2008-11-19  1:28 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <142315.9815.qm@web37908.mail.mud.yahoo.com>


inuxgit01 is the box I want to make public repository. At my own box, linux12, I ran the command, git push linuxgit01:/pub/git/u-boot.git master

What I did wrong?

Thanks.

--- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com> wrote:

> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Shawn O. Pearce" <spearce@spearce.org>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 5:21 PM
> The command, "git --git-dir=my-git.git init"
> works. But, I got another error.
> 
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> 
> The document says that, Your "public repository"
> is now ready to accept your changes. Come back to the
> machine you have your private repository. From there, run
> this
>         command:
>  
>             $ git push
> <public-host>:/path/to/my-git.git master
> 
> 
> However, I got "fatal: Not a git repository"
> error. Do you have any idea?
> 
> 
> git push linuxgit01:/pub/git/u-boot.git master
> fatal: Not a git repository
> 
> inuxgit01 is the box I ran the command, "git
> --git-dir=u-boot.git init".
> 
> Thanks,
> 
> 
> Gary
> 
> 
> 
> 
> --- On Tue, 11/18/08, Shawn O. Pearce
> <spearce@spearce.org> wrote:
> 
> > From: Shawn O. Pearce <spearce@spearce.org>
> > Subject: Re: How to make public repository
> GIT_DIR=my-git.git git-init Command not found.
> > To: "Gary Yang" <garyyang6@yahoo.com>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, November 18, 2008, 3:19 PM
> > Gary Yang <garyyang6@yahoo.com> wrote:
> > > Hi,
> > > 
> > > I want to make a public repository. I followed
> the
> > instructions in gitcore-tutorial. I typed
> > "GIT_DIR=my-git.git git init" per
> instruction.
> > But, I got command not found. I do not think this is
> the
> > correct command. How should I do? I use C-Shell.
> > > 
> > >
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > > 
> > > %mkdir my-git.git
> > > %GIT_DIR=my-git.git git init
> > > 
> > > GIT_DIR=my-git.git: Command not found.
> > 
> > Instead you can do:
> > 
> >   $ git --git-dir=my-git.git init
> > 
> > The --git-dir option does the same thing that GIT_DIR=
> was
> > doing
> > in a Bourne shell.
> > 
> > -- 
> > Shawn.
> 
> 
>       
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

^ permalink raw reply

* Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
From: Gary Yang @ 2008-11-19  1:21 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20081118231925.GW2932@spearce.org>



The command, "git --git-dir=my-git.git init" works. But, I got another error.

http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html

The document says that, Your "public repository" is now ready to accept your changes. Come back to the machine you have your private repository. From there, run this
        command:
 
            $ git push <public-host>:/path/to/my-git.git master


However, I got "fatal: Not a git repository" error. Do you have any idea?


git push linuxgit01:/pub/git/u-boot.git master
fatal: Not a git repository

inuxgit01 is the box I ran the command, "git --git-dir=u-boot.git init".

Thanks,


Gary




--- On Tue, 11/18/08, Shawn O. Pearce <spearce@spearce.org> wrote:

> From: Shawn O. Pearce <spearce@spearce.org>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 3:19 PM
> Gary Yang <garyyang6@yahoo.com> wrote:
> > Hi,
> > 
> > I want to make a public repository. I followed the
> instructions in gitcore-tutorial. I typed
> "GIT_DIR=my-git.git git init" per instruction.
> But, I got command not found. I do not think this is the
> correct command. How should I do? I use C-Shell.
> > 
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > 
> > %mkdir my-git.git
> > %GIT_DIR=my-git.git git init
> > 
> > GIT_DIR=my-git.git: Command not found.
> 
> Instead you can do:
> 
>   $ git --git-dir=my-git.git init
> 
> The --git-dir option does the same thing that GIT_DIR= was
> doing
> in a Bourne shell.
> 
> -- 
> Shawn.


      

^ permalink raw reply

* Re: [PATCH 3/3] builtin-branch: use strbuf in rename_branch()
From: Johannes Schindelin @ 2008-11-19  1:11 UTC (permalink / raw)
  To: Junio C Hamano, Lars Hjemli; +Cc: Miklos Vajna, git
In-Reply-To: <7vbpwcvb8i.fsf@gitster.siamese.dyndns.org>

Hi,

On Tue, 18 Nov 2008, Junio C Hamano wrote:

> Miklos Vajna <vmiklos@frugalware.org> writes:
> 
> > -	snprintf(logmsg, sizeof(logmsg), "Branch: renamed %s to %s",
> > -		 oldref, newref);
> > +	strbuf_addf(&logmsg, "Branch: renamed %s to %s",
> > +		 oldref.buf, newref.buf);
> 
> I am wondering why nobody has complained until now, but shouldn't this 
> be oldname and newname?

I think that was the intention.  Lars?

Ciao,
Dscho

^ permalink raw reply

* Re: Git commit won't add an untracked file given on the command line
From: Johannes Schindelin @ 2008-11-19  1:07 UTC (permalink / raw)
  To: Mark Burton; +Cc: Francis Galiegue, git
In-Reply-To: <20081118214730.005fc72d@crow>

Hi,

On Tue, 18 Nov 2008, Mark Burton wrote:

> Hi Francis,
> 
> > You must "git add .gitignore" first. And yes, this is by design.
> 
> Err, that's a bit odd isn't it because "git add" stages the content into 
> the index but the whole point of specifying files on the command line to 
> "git commit" is to commit the changes in the specified files while 
> ignoring what's currently in the index (so says the man page for 
> commit).

It may be a traditional wart, but a helpful one.  Remember, you can also 
say:

	git commit that/directory/

I do _not_ want Git to add all untracked (and unignored) files in that 
directory automatically.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Fix deletion of last character in levenshtein distance
From: Johannes Schindelin @ 2008-11-19  0:53 UTC (permalink / raw)
  To: Samuel Tardieu; +Cc: git
In-Reply-To: <20081118185326.12721.71576.stgit@arrakis.enst.fr>

Hi,

On Tue, 18 Nov 2008, Samuel Tardieu wrote:

> diff --git a/levenshtein.c b/levenshtein.c
> index db52f2c..98fea72 100644
> --- a/levenshtein.c
> +++ b/levenshtein.c
> @@ -25,7 +25,7 @@ int levenshtein(const char *string1, const char *string2,
>  					row2[j + 1] > row0[j - 1] + w)
>  				row2[j + 1] = row0[j - 1] + w;
>  			/* deletion */
> -			if (j + 1 < len2 && row2[j + 1] > row1[j + 1] + d)
> +			if (row2[j + 1] > row1[j + 1] + d)

I do not understand: does row2 have more entries than len2?  In any case, 
you will _have_ to guard against accessing elements outside the reserved 
memory.

You'll have to be more convincing to make me agree that this is a good 
change, and I am pretty certain that other people are less familiar with 
that particular part of Git's source code than me.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH 3/3] builtin-branch: use strbuf in rename_branch()
From: Junio C Hamano @ 2008-11-18 23:57 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: git
In-Reply-To: <225d83c1ead50340eed97c64fbb8995017bf1ca8.1226954771.git.vmiklos@frugalware.org>

Miklos Vajna <vmiklos@frugalware.org> writes:

> In case the length of branch name is greather then PATH_MAX-11, we write
> to unallocated memory otherwise.

True for {old,new}section.

I'll apply three patches from you as-is.  Thanks.

Having said that,

> -	snprintf(logmsg, sizeof(logmsg), "Branch: renamed %s to %s",
> -		 oldref, newref);
> +	strbuf_addf(&logmsg, "Branch: renamed %s to %s",
> +		 oldref.buf, newref.buf);

I am wondering why nobody has complained until now, but shouldn't this be
oldname and newname?  

    Reflog message: Branch: renamed refs/heads/master to refs/heads/naster

does not feel right, even though it is perfectly understandable to people
who know the internal (i.e. branches are implemented as a ref in
refs/heads hierarchy).

Rewording of the above, if it is ever done, has to be a separate commit,
and it is a behaviour change (if some third-party tool is reading and
parsing the reflog we will break it) which I do not particularly think is
worth doing.

I am mentioning this only because I just noticed it (and do not want to do
the thinking myself ;-).

^ permalink raw reply

* Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
From: Shawn O. Pearce @ 2008-11-18 23:19 UTC (permalink / raw)
  To: Gary Yang; +Cc: git
In-Reply-To: <138223.4849.qm@web37905.mail.mud.yahoo.com>

Gary Yang <garyyang6@yahoo.com> wrote:
> Hi,
> 
> I want to make a public repository. I followed the instructions in gitcore-tutorial. I typed "GIT_DIR=my-git.git git init" per instruction. But, I got command not found. I do not think this is the correct command. How should I do? I use C-Shell.
> 
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> 
> %mkdir my-git.git
> %GIT_DIR=my-git.git git init
> 
> GIT_DIR=my-git.git: Command not found.

Instead you can do:

  $ git --git-dir=my-git.git init

The --git-dir option does the same thing that GIT_DIR= was doing
in a Bourne shell.

-- 
Shawn.

^ permalink raw reply

* How to make public repository GIT_DIR=my-git.git git-init  Command not found.
From: Gary Yang @ 2008-11-18 23:16 UTC (permalink / raw)
  To: git

Hi,

I want to make a public repository. I followed the instructions in gitcore-tutorial. I typed "GIT_DIR=my-git.git git init" per instruction. But, I got command not found. I do not think this is the correct command. How should I do? I use C-Shell.

http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html

%mkdir my-git.git
%GIT_DIR=my-git.git git init

GIT_DIR=my-git.git: Command not found.


Thank you,


Gary





      

^ permalink raw reply

* [PATCH] git-commit.txt - mention that files listed on the command line must be known to git.
From: Mark Burton @ 2008-11-18 22:33 UTC (permalink / raw)
  To: git

Signed-off-by: Mark Burton <markb@ordern.com>
---

 Adding this advertises the current behaviour and should stop anyone else
 asking the same question!

 Documentation/git-commit.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 2e62165..a1ce9a8 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -29,7 +29,8 @@ The content to be added can be specified in several ways:
 
 3. by listing files as arguments to the 'commit' command, in which
    case the commit will ignore changes staged in the index, and instead
-   record the current content of the listed files;
+   record the current content of the listed files (which must already
+   be known to git);
 
 4. by using the -a switch with the 'commit' command to automatically
    "add" changes from all known files (i.e. all files that are already
-- 
1.6.0.4

^ permalink raw reply related

* Re: Git commit won't add an untracked file given on the command line
From: Matthieu Moy @ 2008-11-18 22:16 UTC (permalink / raw)
  To: Francis Galiegue; +Cc: Mark Burton, git
In-Reply-To: <200811182227.20076.fge@one2team.com>

Francis Galiegue <fge@one2team.com> writes:

> Le Tuesday 18 November 2008 22:12:37 Mark Burton, vous avez écrit :
>> Hi,
>>
>> When I try:
>>
>> git commit -m "New file." .gitignore
>>
>> Where .gitignore is not yet tracked, I get:
>>
>> error: pathspec '.gitignore' did not match any file(s) known to git.
>>
>> Is that result by design, sloth or bug (or me being stupid)?
>>
>
> You must "git add .gitignore" first. And yes, this is by design.

If it's by design, then it's a documentation bug:

     -o, --only
        Make a commit only from the paths specified on the
        command line, disregarding any contents that have been
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        staged so far. This is the default mode of operation of
        ^^^^^^^^^^^^^
        git-commit if any paths are given on the command line,

We have here a case where having staged content before doing commit -o
actually changes its behavior.

Looking at the code, this happens because the "file" list is actually
a pattern list (so that you can "git commit '*.txt'" or so), and the
pattern is looked for in the index (the error is raised in
"list_paths").

> You could also have done git commit -a -m "themessage".

Well, he could have done that, but then the result would have been
different ;-).

-- 
Matthieu

^ permalink raw reply

* Re: Git commit won't add an untracked file given on the command line
From: Mark Burton @ 2008-11-18 21:47 UTC (permalink / raw)
  To: Francis Galiegue; +Cc: git
In-Reply-To: <200811182227.20076.fge@one2team.com>


Hi Francis,

> You must "git add .gitignore" first. And yes, this is by design.

Err, that's a bit odd isn't it because "git add" stages the content into
the index but the whole point of specifying files on the command line
to "git commit" is to commit the changes in the specified files while
ignoring what's currently in the index (so says the man page for commit).

Cheers,

Mark

^ permalink raw reply

* Re: Git commit won't add an untracked file given on the command line
From: Francis Galiegue @ 2008-11-18 21:27 UTC (permalink / raw)
  To: Mark Burton; +Cc: git
In-Reply-To: <20081118211237.234d8035@crow>

Le Tuesday 18 November 2008 22:12:37 Mark Burton, vous avez écrit :
> Hi,
>
> When I try:
>
> git commit -m "New file." .gitignore
>
> Where .gitignore is not yet tracked, I get:
>
> error: pathspec '.gitignore' did not match any file(s) known to git.
>
> Is that result by design, sloth or bug (or me being stupid)?
>

You must "git add .gitignore" first. And yes, this is by design.

You could also have done git commit -a -m "themessage".

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

^ permalink raw reply

* Re: "secret key not available". "unable to sign the tag".
From: Gary Yang @ 2008-11-18 21:20 UTC (permalink / raw)
  To: Jeff King, Linus Torvalds; +Cc: git
In-Reply-To: <810496.66936.qm@web37903.mail.mud.yahoo.com>



The gpg works. But, git tag dose not work. Any idea?


gpg --detach-sign foo.bar
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information

You need a passphrase to unlock the secret key for
user: "Gary Yang (For git.) <garyyang6@yahoo.com>"
1024-bit DSA key, ID A3F6A45E, created 2008-11-14
Enter passphrase: 
[garyyang6@svdclc313 ~/git-repository]%


It successfully signed.


Gary


--- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com> wrote:

> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: "Jeff King" <peff@peff.net>, "Linus Torvalds" <torvalds@linux-foundation.org>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 12:26 PM
> Here are the errors I got:
> 
> git tag -s my-second-tag
> 
> gpg: WARNING: using insecure memory!
> gpg: please see http://www.gnupg.org/faq.html for more
> information
> gpg: skipped `Gary Yang <garyyang6@yahoo.com>':
> secret key not available
> gpg: signing failed: secret key not available
> error: gpg failed to sign the tag
> fatal: unable to sign the tag
> 
> 
> 
> Thanks,
> 
> 
> Gary
> 
> 
> 
> --- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com>
> wrote:
> 
> > From: Gary Yang <garyyang6@yahoo.com>
> > Subject: Re: "secret key not available".
> "unable to sign the tag".
> > To: "Jeff King" <peff@peff.net>,
> "Linus Torvalds"
> <torvalds@linux-foundation.org>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, November 18, 2008, 12:22 PM
> > All,
> > 
> > I really need to tag my source code. But, somehow I am
> not
> > able. Can someone help?
> > 
> > Thanks in advance!
> > 
> > 
> > Gary
> > 
> > 
> > 
> > --- On Tue, 11/18/08, Gary Yang
> <garyyang6@yahoo.com>
> > wrote:
> > 
> > > From: Gary Yang <garyyang6@yahoo.com>
> > > Subject: Re: "secret key not
> available".
> > "unable to sign the tag".
> > > To: "Jeff King" <peff@peff.net>,
> > "Linus Torvalds"
> > <torvalds@linux-foundation.org>
> > > Cc: git@vger.kernel.org
> > > Date: Tuesday, November 18, 2008, 8:57 AM
> > > Hi Linus,
> > > 
> > > I do not understand your email. I used the
> command,
> > git
> > > config --global user.email garyyang6@yahoo.com.
> But, I
> > still
> > > got the same error. Do you have any idea?
> > > 
> > > Thank you,
> > > 
> > > 
> > > Gary
> > > 
> > > 
> > > --- On Sun, 11/16/08, Linus Torvalds
> > > <torvalds@linux-foundation.org> wrote:
> > > 
> > > > From: Linus Torvalds
> > > <torvalds@linux-foundation.org>
> > > > Subject: Re: "secret key not
> > available".
> > > "unable to sign the tag".
> > > > To: "Jeff King"
> <peff@peff.net>
> > > > Cc: "Gary Yang"
> > <garyyang6@yahoo.com>,
> > > git@vger.kernel.org
> > > > Date: Sunday, November 16, 2008, 4:16 PM
> > > > On Fri, 14 Nov 2008, Jeff King wrote:
> > > > > 
> > > > > You need to tell git who you are, since
> it
> > is
> > > unable
> > > > to deduce it from
> > > > > doing host lookups. Try:
> > > > > 
> > > > >   git config --global user.email
> > > garyyang6@yahoo.com
> > > > > 
> > > > > or whatever email address you used when
> you
> > > created
> > > > the key, and then
> > > > > gpg should find it appropriately.
> > > > 
> > > > Side note: sometimes you might want to use a
> > different
> > > key
> > > > than the one 
> > > > you use for authorship. Then you can use
> > > > 
> > > > 	[user]
> > > > 		SigningKey = key
> > > > 
> > > > (or "git config user.signingkey
> xyz" if
> > you
> > > > don't want to edit the 
> > > > config file manually). 
> > > > 
> > > > This can be especially useful if you use
> > different
> > > keys for
> > > > different 
> > > > projects, even if you want to be known under
> the
> > same
> > > name
> > > > in both. Or 
> > > > because you want to have the local hostname
> in
> > your
> > > commit
> > > > logs, but your 
> > > > gpg key is using some externally visible
> > > > "official" email address.
> > > > 
> > > > 			Linus
> > 
> > 
> >       
> > --
> > To unsubscribe from this list: send the line
> > "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at 
> > http://vger.kernel.org/majordomo-info.html
> 
> 
>       
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

^ permalink raw reply

* Git commit won't add an untracked file given on the command line
From: Mark Burton @ 2008-11-18 21:12 UTC (permalink / raw)
  To: git


Hi,

When I try: 

git commit -m "New file." .gitignore

Where .gitignore is not yet tracked, I get: 

error: pathspec '.gitignore' did not match any file(s) known to git.

Is that result by design, sloth or bug (or me being stupid)?

Thanks,

Mark

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox