* Re: [PATCH 5/9] update-index: add --checkout/--no-checkout to update CE_NO_CHECKOUT bit
From: Junio C Hamano @ 2008-11-18 18:59 UTC (permalink / raw)
To: Jeff King; +Cc: Nguyễn Thái Ngọc Duy, git, Shawn O. Pearce
In-Reply-To: <20081118113316.GA18610@segfault.peff.net>
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"
^ permalink raw reply
* [PATCH] Fix deletion of last character in levenshtein distance
From: Samuel Tardieu @ 2008-11-18 18:53 UTC (permalink / raw)
To: git
Without this change, "git tags" will not suggest "git tag"
(it will only suggest "git status"), and "git statusx" will
not suggest anything.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
---
levenshtein.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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)
row2[j + 1] = row1[j + 1] + d;
/* insertion */
if (row2[j + 1] > row2[j] + a)
^ permalink raw reply related
* Re: [small bug] Surprising "Did you mean this?"
From: Samuel Tardieu @ 2008-11-18 18:45 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
In-Reply-To: <vpqod0dezh9.fsf@bauges.imag.fr>
>>>>> "Matthieu" == Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Matthieu> I would have expected git to propose me "tag" (1 character
Matthieu> removal), while "status" is quite far from "tags" (remove g,
Matthieu> add u, add another t, shuffle and you're there).
It looks like the addition of a character at the end (more exactly
the deletion of a character in the possible substitution) is bogus.
I am testing a patch.
Sam
--
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/
^ permalink raw reply
* Re: [small bug] Surprising "Did you mean this?"
From: Andreas Ericsson @ 2008-11-18 18:29 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
In-Reply-To: <vpqod0dezh9.fsf@bauges.imag.fr>
Matthieu Moy wrote:
> Hi,
>
> The following is quite surprising:
>
> $ git tags
> git: 'tags' is not a git-command. See 'git --help'.
>
> Did you mean this?
> status
>
> I would have expected git to propose me "tag" (1 character removal),
> while "status" is quite far from "tags" (remove g, add u, add another
> t, shuffle and you're there).
>
That's the Deveraux(?) addendum in action. shuffle+replace = 3 in the
distance score, while remove = 4 (I think).
Typos by users accustomed to computers are more often of the shuffle
(haed vs head) or replace (hwad vs head) kind, while those less
accustomed often fumble more and press more keys. For this case though,
I agree it gives a rather strange result.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* [small bug] Surprising "Did you mean this?"
From: Matthieu Moy @ 2008-11-18 17:05 UTC (permalink / raw)
To: git
Hi,
The following is quite surprising:
$ git tags
git: 'tags' is not a git-command. See 'git --help'.
Did you mean this?
status
I would have expected git to propose me "tag" (1 character removal),
while "status" is quite far from "tags" (remove g, add u, add another
t, shuffle and you're there).
my 2 cents,
--
Matthieu
^ permalink raw reply
* Re: "secret key not available". "unable to sign the tag".
From: Gary Yang @ 2008-11-18 16:57 UTC (permalink / raw)
To: Jeff King, Linus Torvalds; +Cc: git
In-Reply-To: <alpine.LFD.2.00.0811161609340.3468@nehalem.linux-foundation.org>
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
^ permalink raw reply
* Re: "secret key not available". "unable to sign the tag".
From: Gary Yang @ 2008-11-18 16:55 UTC (permalink / raw)
To: Jeff King, Linus Torvalds; +Cc: git
In-Reply-To: <alpine.LFD.2.00.0811161609340.3468@nehalem.linux-foundation.org>
Hi Jeff,
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?
Thanks,
Perry
--- 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
^ permalink raw reply
* Re: purging unwanted history
From: Marcel M. Cary @ 2008-11-18 14:28 UTC (permalink / raw)
To: geoffrey.russell; +Cc: git
In-Reply-To: <93c3eada0811161626h69929cd7va3fa4007a2341bae@mail.gmail.com>
Geoff,
I'm able to prune history with git filter-branch. For example, to throw
away history on the current branch before commit
171d7661eda111d3e35f6e8097a1a3a07b30026c, I tried:
git filter-branch --parent-filter '
if [ $GIT_COMMIT = 171d7661eda111d3e35f6e8097a1a3a07b30026c ]; then
echo "";
else
read line;
echo $line;
fi'
I found the diff between that commit and it's rewritten version was
empty, and diffs to subsequent commits looked sane. It took an hour on
the git repository with about 16k commits. I probably should have
excluded all the commits I didn't want to keep to reduce processing time.
However, after deleting all but the rewritten branch and cloning the
repository, I didn't notice any decrease in the size of .git/, so I'm
not sure why you'd want to do that. Also, all the remaining commitIDs
changed so any previous clones would have a tough time merging with yours.
Another possibility whose results might be similar in runtime and
repository size would be to run git rebase --interactive and squash all
the commits together before the ones you want to keep.
Marcel
Geoff Russell wrote:
> I have a repository with 5 years worth of history, I only want to keep
> 1 year, so I want to purge the
> first 4 years. As it happens, the repository only has a single branch
> which should
> simplify the problem.
>
> Cheers,
>
> Geoff Russell
>
> P.S. Apologies, but I've asked this question before but didn't get an
> answer which
> I understood or which worked, so perhaps my description of the problem
> was faulty. This
> is a second attempt.
> --
> 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: [PATCH (GITK)] gitk: Add a menu option to start Git Gui.
From: Alexander Gavrilov @ 2008-11-18 14:12 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
In-Reply-To: <18722.35810.362792.501694@cargo.ozlabs.ibm.com>
On Tue, Nov 18, 2008 at 12:33 PM, Paul Mackerras <paulus@samba.org> wrote:
> Alexander Gavrilov writes:
>> Git Gui already has menu commands to start gitk,
>> and this makes the relation symmetric. Since gitk and
>> git-gui complement each other, I think that it is
>> beneficial to integrate them where it makes sense.
>
> I think it makes more sense to have this as an item on the context
> menu for the fake commit(s) for local changes.
Git Gui is useful for a lot more things than just committing changes,
e.g. you can interact with remote repositories, or do a merge, or
amend the last commit message. Also, not everyone has local change
display enabled in gitk.
Alexander
^ permalink raw reply
* Re: [PATCH 5/9] update-index: add --checkout/--no-checkout to update CE_NO_CHECKOUT bit
From: Jeff King @ 2008-11-18 11:33 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: Junio C Hamano, git, Shawn O. Pearce
In-Reply-To: <1222833849-22129-6-git-send-email-pclouds@gmail.com>
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.
-- >8 --
t2104: touch portability fix
Some versions of touch support the syntax:
touch [MMDDhhmm[yy]] file...
which makes the first argument an optional time
specification. They can get confused by
touch 1 2 foo bar
as they assume that '1' is a bogus time specification. This
is broken, for example, with /bin/touch on Solaris 8.
To fix it, we'll just reverse the order of arguments so that
an unambiguous argument is in the slot for the optional time
specification.
Signed-off-by: Jeff King <peff@peff.net>
---
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.
t/t2104-update-index-no-checkout.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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 sub/1 sub/2 1 2 &&
git add 1 2 sub/1 sub/2
'
--
1.6.0.4.984.gbd0b7
^ permalink raw reply related
* [PATCH 2/2] git-remote: add verbose mode to git remote update
From: crquan @ 2008-11-18 11:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
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
= [up to date] html -> origin/html
= [up to date] maint -> origin/maint
= [up to date] man -> origin/man
= [up to date] master -> origin/master
= [up to date] next -> origin/next
= [up to date] pu -> origin/pu
= [up to date] todo -> origin/todo
Signed-off-by: Cheng Renquan <crquan@gmail.com>
---
To Junio:
I found that fetch's verbose mode will dump the url, that's really
what I need, so with passing verbose mode to fetch, the fetch_remote
function doesn't need a url parameter, and changes to get_one_remote_for_update
are also not required.
So now the patch looks very simple.
builtin-remote.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin-remote.c b/builtin-remote.c
index 14774e3..0af742b 100644
--- a/builtin-remote.c
+++ b/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 [group]",
+ "git remote update [-v | --verbose] [group]",
NULL
};
@@ -42,7 +42,11 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)
static int fetch_remote(const char *name)
{
- const char *argv[] = { "fetch", name, NULL };
+ const char *argv[] = { "fetch", name, NULL, NULL };
+ if (verbose) {
+ argv[1] = "-v";
+ argv[2] = name;
+ }
printf("Updating %s\n", name);
if (run_command_v_opt(argv, RUN_GIT_CMD))
return error("Could not fetch %s", name);
--
1.6.0.4.757.g6d002.dirty
^ permalink raw reply related
* git svn rebase creates some commits with empty author, commiter and date fields
From: Peter Kirk @ 2008-11-18 10:21 UTC (permalink / raw)
To: git
Hi there,
I am using git version 1.6.0.3, which I compiled myself from sources on my
linux/amd64 box which runns kubuntu 8.10.
Now, when I do "git svn clone" to retrieve the entire history from the svn
server then everything works fine. Then I start working with this, commit some
myself, and run "git svn rebase" frequently. What happens (and I don't see the
pattern) is that *some* commits that are retrieved via "git svn rebase" are
broken...they don't contain a valid author field, the date is at 1970 and, most
importantly (for me) the commit message is empty except for the "git-svn-id:"
line that "git svn" adds automatically. The diff is fine, and I can still use
the checkout fine...but I cannot view the log-message/author/date of some
commits, which becomes tiresome quickly.
The only way to "fix" these broken commits is to do a clean "git svn clone",
but as new commits are pulled via "git svn rebase", my repository will again
become polluted with broken commits.
When I run "git fsck" I get a line like this for every broken commit:
error in commit 94a0eb26b0843f6b4db28d24b41301bd295d0794: invalid
author/committer line
When I run git show on one of the broken commits the output looks like so:
########### snip ###########
commit 420be3a37353e3f2a968a2a8686a7169b31b9c3e
Author: (no author) <(no author)@596c1c1d-4ad6-0310-94f8-b98c4e649a3b>
Date: Thu Jan 1 00:00:00 1970 +0000
git-svn-id: svn+ssh://hiddenhost@5681 596c1c1d-4ad6-0310-94f8-b98c4e649a3b
diff --git a/bla/foo.cpp b/bla/foo.cpp
...the correct diff output follows...
############# snap ##########
While trying to find a solution to my problem with google I stumbled accross an
old thread from 2007, but it sounds similar to my problem so I will link it
for reference: https://kerneltrap.org/mailarchive/git/2007/10/30/368150
Note that in that case the changesets themselves seemed to be empty though
though, for me it is only "author+date+commit message". Also I don't
(knowingly) have any "authors file" provided.
Thanks in advance for any help, and please ask if any info is missing,
Peter
^ permalink raw reply
* Re: git tree browsing in redmine
From: Jakub Narebski @ 2008-11-18 10:06 UTC (permalink / raw)
To: Burt Culver; +Cc: git
In-Reply-To: <b8f2e1780811172034w6828ddc8n62cf85b5fa366e22@mail.gmail.com>
"Burt Culver" <burt@fishpond.co.nz> writes:
> I'm trying to find some ideas for a better way to implement browsing
> of a git repository within the redmine application.
>
> My top level directory in my git repository has 300 files. Redmine
> wants to display each file name, its most recent revision, and the
> comment for that revision. Currently it does a git log -1 on each file
> to find the latest revision. Is there a quicker way of doing this for
> a whole directory? git log runs from .2 seconds to 3 seconds
> depending on the file on my server.
>
> Here is the open issue at redmine.org which has more details:
> http://www.redmine.org/issues/show/1435
>
> A fix for this would help a whole bunch of redmine / git users
> including myself.
First, while it might be common and cheap view (information) for
Subversion, it is not the case for Git. Git is whole project snapshot
based, not per-file snapshot based, or patch based. Take a look at
one of git web interfaces: gitweb, or cgit, or ViewGit to see how
repository browsing is implemented there: it is log-like view, then
tree, not tree, then history of files. Note also that for example
history of two files is more than union of histories of individual
files (history simplification, including merge simplification).
Second, I tried to implement such view (which I named 'tree blame'
view, because it looks a bit like blame/annotate, but for
directories/trees) for gitweb. You can view my attempts in
'gitweb/tree_blame' branch of my git fork:
http://repo.or.cz/w/git/jnareb-git.git?a=shortlog;h=refs/heads/gitweb/tree_blame
But I think the correct solution, if you decide that you absolutely
need so unnatural (and I think not that useful) view, would be to
implement such view in git core, allowing 'git blame' to work for
trees (directories). You would probably need to implement also some
kind of '--porcelain' output for script/Redmine.
Or as suggested add your work to libgit2 library, and make use of it
in Redmine...
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [PATCH (GITK)] gitk: Add a menu option to start Git Gui.
From: Paul Mackerras @ 2008-11-18 9:33 UTC (permalink / raw)
To: Alexander Gavrilov; +Cc: git
In-Reply-To: <200811132312.42150.angavrilov@gmail.com>
Alexander Gavrilov writes:
> Git Gui already has menu commands to start gitk,
> and this makes the relation symmetric. Since gitk and
> git-gui complement each other, I think that it is
> beneficial to integrate them where it makes sense.
I think it makes more sense to have this as an item on the context
menu for the fake commit(s) for local changes.
Paul.
^ permalink raw reply
* Re: Grafting mis-aligned trees.
From: Michael J Gruber @ 2008-11-18 9:24 UTC (permalink / raw)
To: Boyd Stephen Smith Jr.; +Cc: git
In-Reply-To: <200811171645.12869.bss03@volumehost.net>
Boyd Stephen Smith Jr. venit, vidit, dixit 17.11.2008 23:45:
> I haven't gotten a response from my subscription email, so please CC me on any replies.
>
> So, I've been managaing the source I had from a client project in git and
> have a non-linear history. Currently, two tips (production and testing)
> but there are many feature branches that were git-merge'd in, not rebased.
>
> Now, I've gotten the full tree. Turns out all the source code I was
> working on was in a subdirectory "project/web". I'd like to "graft" the
> *changes* I made onto the full tree.
>
> I figured this might be a job for git-filter-branch. Certainly, that did
> the job of moving all my changes into the subdirectory. But, now I want to
> do something that's a combination or git-rebase and git-filter-branch. I
> want to replay the *patches/deltas* (like rebase) on top of the full tree I
> have, but *maintain the non-liear history* (like filter-branch).
>
> Can anyone think of a recipe for me?
>
> Trees look something like this right now.
>
> <some history> -> FT
>
> TI -> <non-linear history> -> A -> <non-linear history> -> C
> \ \ \
> -> PI ------------------------> B ------------------------> D
>
> I'd like to have it look something like:
>
> <some history> -> FT -> <non-linear history> -> A' -> <non-linear history> -> C'
> \ \ \
> -> PI' ----------------------> B' -----------------------> D'
>
> A', B', C', and D' are different commits, but the diff (and history) between
> FT and A' is the same as the diff (and history) between TI and A.
>
> Again, please CC me on any replies.
[CCing is customary here anyways.]
So, your base directory for TI and FT is different, right? I.e.: In the
TI repo, your project sits at the root, whereas in the FT repo it sits
in project/web? Has FT advanced since you took the initial subdir
snapshot for TI?
Michael
^ permalink raw reply
* Re: git tree browsing in redmine
From: Andreas Ericsson @ 2008-11-18 8:02 UTC (permalink / raw)
To: Burt Culver; +Cc: git
In-Reply-To: <b8f2e1780811172034w6828ddc8n62cf85b5fa366e22@mail.gmail.com>
Burt Culver wrote:
> Hi,
>
> I'm trying to find some ideas for a better way to implement browsing
> of a git repository within the redmine application.
>
> My top level directory in my git repository has 300 files. Redmine
> wants to display each file name, its most recent revision, and the
> comment for that revision. Currently it does a git log -1 on each file
> to find the latest revision. Is there a quicker way of doing this for
> a whole directory?
Not yet, but if you clone libgit2 and start helping out on that, things
like this will become fairly trivial to do in a single pass instead of,
as redmine does it today, using one call to "git log" for every file in
the directory (which is just insane).
You should be aware that git is fully snapshot based though, while svn
is file-revision based (a bunch of file-revisions make up a "changeset"),
so it's fundamentally easy to get the file-revisions for a particular
changeset in svn and fundamentally hard to get it in git.
> git log runs from .2 seconds to 3 seconds
> depending on the file on my server.
>
That's because the command used by redmine ("git log <cruft> -1 -- $path")
stops as soon as it finds the first commit that touches the path. Some
paths haven't been touched in a long time, so more revisions have to
be loaded, parsed, analyzed and discarded before the correct one is
found.
> Here is the open issue at redmine.org which has more details:
> http://www.redmine.org/issues/show/1435
>
> A fix for this would help a whole bunch of redmine / git users including myself.
>
I have no idea what redmine is, but one solution for them would be to
run "git log --pretty=fuller -p $branch" and then parse the diffs to get
the latest commit that touched all files (in one go). This would be
slightly slower for small repos (where it shouldn't matter anyway), but
time should increase linearly with the number of commits in the repository.
It's almost certainly required to be able to turn this feature off, btw,
as it won't work at all for super-huge repositories (think kde or OO.org).
You should also make sure to have your repository properly packed. Run
"git gc" on it every once in a while.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: git-submodule/before-rebase hook
From: Andreas Ericsson @ 2008-11-18 7:47 UTC (permalink / raw)
To: justin; +Cc: git
In-Reply-To: <CC8B9B47-4985-4B96-B8DB-0B351633C849@justinbalthrop.com>
justin wrote:
> I just discovered git-submodule today, and already I can see it making
> my life a lot easier. I develop several modules that are used in two
> different projects, and being able to check in changes from the
> submodule in either project is something I have been wanting to do for a
> while. But there is one shortcoming in git-submodule that I haven't
> figured out how to overcome... yet.
>
> When I make a change to a submodule and push that change to the parent
> repository, the change appears to all other users of the repository as a
> modification to the submodule commit version.
It shouldn't, unless you push the change into a non-bare copy of a checked
out submodule, but that would be rather insane as the submodule rather
than the superproject then gets to decide which version of the submodule
to use.
> A few people at our
> company use 'git ci -a' to add all of their changes, and I'm afraid they
> are going to unknowingly revert the submodule back to a previous
> version.
Ah, now I see where you're coming from. After you issue "git pull" in
the submodule you have to sync the new version of the submodule to the
superproject using "git submodule sync".
> So my plan was to add a post-pull hook that does 'git submodule
> update --init', so that people who don't do development on the submodule
> will get updates every time they pull.
Ok, I didn't. Why do you pull into the submodules if you don't want to
sync the code so the superproject gets the benefit of the changes?
> Unfortunately though, there is no
> such hook in git. I thought post-merge was going to work, but most
> people at our company use 'git pull --rebase', and post-merge isn't
> called in that case. The post-checkout hook is called, but the pull
> hasn't been completed at that point, so updating the submodule doesn't
> work. Alas, if only there was a post-rebase hook.
>
> Any ideas other than patching every employee's git source to add a
> post-rebase hook?
>
Yes. Only pull in submodules if you intend to sync them afterwards.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: git-bisect not working correctly in the kvm.git repository?
From: Johannes Sixt @ 2008-11-18 7:13 UTC (permalink / raw)
To: walt; +Cc: git
In-Reply-To: <gfsjjp$o42$1@ger.gmane.org>
walt schrieb:
> Linus Torvalds wrote:
>>
>> On Mon, 17 Nov 2008, walt wrote:
>>> I'm trying to find a bug introduced somewhere between kvm-69
>>> and kvm-70, so of course I want to git-bisect down to it.
>>>
>>> The weirdness is that when I give git-bisect the good and
>>> bad tags, almost everything in my working directory just
>>> disappears, leaving only the qemu subdirectory behind.
>
>> ...
>> If you merge stuff from another project that isn't a full repository,
>> then
>> you are merging commits that simply don't _have_ the full tree of your
>> repo...
>
> Okay, that's clearly what's happening to me. The kvm.git repo
> contains hundred of commits just like that. How would you deal
> with the same situation? Is git-bisect skip the easiest way?
If you are pretty sure that the bug you are looking for was *not*
introduced in the branch that was subtree-merged, you can mark it as
"good" like so:
$ git bisect start kvm-69 kvm-70 $BRANCH
where $BRANCH is the most recent commit on the subtree-merged branch.
Watch out that you do *not* accidentally pick the *merge* commit that
merged the branch in, but the (second) parent[*], the one that was merged
in. Then your bisect sequence won't ever end up in that branch.
[*] If you happen to have the branch lying around as a remote ref, you can
use that instead, even if it is ahead of what was merged in.
-- Hannes
^ permalink raw reply
* Re: git-bisect not working correctly in the kvm.git repository?
From: Christian Couder @ 2008-11-18 5:56 UTC (permalink / raw)
To: walt; +Cc: git
In-Reply-To: <alpine.LNX.2.00.0811171350540.4238@x9.ybpnyarg>
Le lundi 17 novembre 2008, walt a écrit :
> On Mon, 17 Nov 2008, Christian Couder wrote:
> > Le lundi 17 novembre 2008, walt a écrit :
> > > I'm trying to find a bug introduced somewhere between kvm-69
> > > and kvm-70, so of course I want to git-bisect down to it.
> > >
> > > The weirdness is that when I give git-bisect the good and
> > > bad tags, almost everything in my working directory just
> > > disappears, leaving only the qemu subdirectory behind.
> > >
> > > Can anyone else reproduce this with the kvm.git repo?
> > > (I don't see this problem with the linux.git repo or the
> > > git.git repo, so it seems to be something with the kvm.git
> > > repo itself.)
> >
> > I cannot reproduce this:
> >
> > $ git bisect start kvm-70 kvm-69
> > Bisecting: 846 revisions left to test after this
> > [80bfc25f42db6d4715c7688ae2352c5a8038fe7e] ntfs: le*_add_cpu conversion
> > $ find . -type f |wc -l
> > 24286
> > $ git bisect reset
> > Previous HEAD position was 80bfc25... ntfs: le*_add_cpu conversion
> > Switched to branch "master"
> > $ find . -type f |wc -l
> > 24384
>
> Your numbers are so different from mine I'm wondering if we are using
> different repositories.
>
> $~/src/kvm-userspace find . -type f | wc -l
> 1715
>
> $~/src/kvm-userspace git bisect start kvm-70 kvm-69
> Bisecting: 176 revisions left to test after this
> [06508be8108f785caead849a717c9e6d67da62d7] Un-break MIPS conditional
> moves, by Richard Sandiford.
> wa1ter@k9:~/src/kvm-userspace find . -type f | wc -l
> 1413
>
> $~/src/kvm-userspace cat .git/config
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = false
> logallrefupdates = true
> [remote "origin"]
> url = git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git
I cloned this one:
[remote "origin"]
url = git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git
Sorry I didn't know which should be used, as I am not a kernel developer.
Regards,
Christian.
> fetch = +refs/heads/*:refs/remotes/origin/*
> [branch "master"]
> remote = origin
> merge = refs/heads/master
>
> I track Junio's git.git and it's current as of this morning, but I
> also tried git v1.5.0 (chosen at random) and got the same results.
> What repo are you using?
>
> Thanks.
^ permalink raw reply
* git tree browsing in redmine
From: Burt Culver @ 2008-11-18 4:34 UTC (permalink / raw)
To: git
Hi,
I'm trying to find some ideas for a better way to implement browsing
of a git repository within the redmine application.
My top level directory in my git repository has 300 files. Redmine
wants to display each file name, its most recent revision, and the
comment for that revision. Currently it does a git log -1 on each file
to find the latest revision. Is there a quicker way of doing this for
a whole directory? git log runs from .2 seconds to 3 seconds
depending on the file on my server.
Here is the open issue at redmine.org which has more details:
http://www.redmine.org/issues/show/1435
A fix for this would help a whole bunch of redmine / git users including myself.
--
Regards,
Burt Culver
Fishpond.co.nz & Fishpond.com.au
New Zealand & Australias Biggest Bookstore
^ permalink raw reply
* Re: "secret key not available". "unable to sign the tag".
From: Linus Torvalds @ 2008-11-18 4:21 UTC (permalink / raw)
To: Gary Yang; +Cc: Jeff King, git
In-Reply-To: <424422.27374.qm@web37902.mail.mud.yahoo.com>
On Mon, 17 Nov 2008, Gary Yang wrote:
>
> 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
What does
gpg --list-secret-keys
say? Have you actually set up a key for that email address?
Linus
^ permalink raw reply
* git-submodule/before-rebase hook
From: justin @ 2008-11-18 3:59 UTC (permalink / raw)
To: git
I just discovered git-submodule today, and already I can see it making
my life a lot easier. I develop several modules that are used in two
different projects, and being able to check in changes from the
submodule in either project is something I have been wanting to do for
a while. But there is one shortcoming in git-submodule that I haven't
figured out how to overcome... yet.
When I make a change to a submodule and push that change to the parent
repository, the change appears to all other users of the repository as
a modification to the submodule commit version. A few people at our
company use 'git ci -a' to add all of their changes, and I'm afraid
they are going to unknowingly revert the submodule back to a previous
version. So my plan was to add a post-pull hook that does 'git
submodule update --init', so that people who don't do development on
the submodule will get updates every time they pull. Unfortunately
though, there is no such hook in git. I thought post-merge was going
to work, but most people at our company use 'git pull --rebase', and
post-merge isn't called in that case. The post-checkout hook is
called, but the pull hasn't been completed at that point, so updating
the submodule doesn't work. Alas, if only there was a post-rebase hook.
Any ideas other than patching every employee's git source to add a
post-rebase hook?
Thanks,
Justin
^ permalink raw reply
* Re: "secret key not available". "unable to sign the tag".
From: Gary Yang @ 2008-11-18 1:59 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20081115035743.GA19633@coredump.intra.peff.net>
Jeff King,
I followed your instruction. But, I still got error when I tag the code. Can you please tell me why?
> git config --global user.email garyyang6@yahoo.com
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 Fri, 11/14/08, Jeff King <peff@peff.net> wrote:
> From: Jeff King <peff@peff.net>
> Subject: Re: "secret key not available". "unable to sign the tag".
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Friday, November 14, 2008, 7:57 PM
> On Fri, Nov 14, 2008 at 03:28:44PM -0800, Gary Yang wrote:
>
> > I got errors and warnings when I used "git tag -s
> my-tag". It says,
> > "secret key not available". "unable to
> sign the tag".
>
> Probably because it can't find your secret key, like it
> says.
>
> > gpg: please see http://www.gnupg.org/faq.html for more
> information
> > gpg: skipped `Gary Yang
> <gyang@linux123.(none)>': secret key not available
> > gpg: signing failed: secret key not available
> > error: gpg failed to sign the tag
> > fatal: unable to sign the tag
> >
> > I ran "gpg --gen-key" and generated keypair.
> But, still got the same
> > error. Please help.
>
> Did the key you generated have the email address
> "gyang@linux123.(none)"? If not, then that is
> your problem.
>
> 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.
>
> -Peff
> --
> 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: [PATCH 3/3] git-remote: simplifying get_one_entry
From: rae l @ 2008-11-18 0:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vabbywb75.fsf@gitster.siamese.dyndns.org>
On Tue, Nov 18, 2008 at 12:48 AM, Junio C Hamano <gitster@pobox.com> wrote:
> crquan@gmail.com writes:
>
>> From: Cheng Renquan <crquan@gmail.com>
>>
>> The loop for remote->url_nr is really useless, set to the last one
>> directly is better.
>
> Is it really useless? Be more descriptive.
>
>> - if (remote->url_nr > 0) {
>> - int i;
>> -
>> - for (i = 0; i < remote->url_nr; i++)
>> - string_list_append(remote->name, list)->util = (void *)remote->url[i];
>> - } else
>> - string_list_append(remote->name, list)->util = NULL;
>> + string_list_append(remote->name, list)->util =
>> + remote->url_nr > 0
>> + ? (void *)remote->url[remote->url_nr-1] : NULL;
>
> When you have more than one URL associated with the remote (this makes
> sense only for pushing), the current code adds that many string_list_item
> to the list, each holding the URL. "git remote -v" shows all of them.
>
> Your change instead creates only one string_list_item and hold the last
> URL. Doesn't it make show_all() to show only one URL for the remote?
Sorry, this patch is totally wrong, I will regenerate the other two and resend.
Thanks for your patience.
--
Cheng Renquan, Shenzhen, China
Steven Wright - "Cross country skiing is great if you live in a small country."
^ permalink raw reply
* [ANNOUNCE] New fast export tool: rcs-fast-export
From: Giuseppe Bilotta @ 2008-11-17 23:24 UTC (permalink / raw)
To: git
Hello all,
I just finished giving a decent form to a tool I've been longing to
get my hands on for quite some time: an RCS fast exporter
http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#rcs-fast-export
It's written in Ruby, and doesn't require any external tools or
libraries, parsing the RCS files directly (hopefully correctly). It
converts RCS symbols to lightweight tags, it supports your typical
--authors-file, it can even (lightweight) tag every commit with the
corresponding RCS revision, on request. It follows branches, too,
giving them a name like 1.3.2.x. You *can* process multiple files at
once, but the script will not try to do anything smart so the results
might or might not be what you expect.
TODOs include
* not needing an authors file for users that had the good sense of
configuring their user.name and .email properly and whose username is
the only one appearing in the RCS history
* being smarter with memory management because we already exports
blobs on the fly so we should discard them unless they are needed to
rebuild other RCS revisions
* integration with Zit, the Git-based single file content tracker, so
that you can say for example 'zit import somefile' where somefile is
RCS-tracked
* submission for git's repo (to contrib)
* submission for fast-export's repo http://repo.or.cz/w/fast-export.git
* test with fast-import for other SCMs
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox