login
Header Space

 
 

git mailing list

FromSubjectsort iconDate
Nicolas Pitre
[PATCH] diff-delta: allow reusing of the reference buffer in...
When a reference buffer is used multiple times then its index can be computed only once and reused multiple times. This patch adds an extra pointer to a pointer argument (from_index) to diff_delta() for this. If from_index is NULL then everything is like before. If from_index is non NULL and *from_index is NULL then the index is created and its location stored to *from_index. In this case the caller has the responsibility to free the memory pointed to by *from_index. If from_index and *...
Feb 28, 12:38 am 2006
Nicolas Pitre
[PATCH] diff-delta: bound hash list length to avoid O(m*n) b...
The diff-delta code can exhibit O(m*n) behavior with some patological data set where most hash entries end up in the same hash bucket. The latest code rework reduced the block size making it particularly vulnerable to this issue, but the issue was always there and can be triggered regardless of the block size. This patch does two things: 1) the hashing has been reworked to offer a better distribution to atenuate the problem a bit, and 2) a limit is imposed to the number of entries tha...
Feb 28, 12:09 am 2006
Dave Jones
someone changed the contents of my HEAD.
I just tried to check in some changes to some trees on master.kernel.org, and found after the first checkin that git claimed.. fatal: Not a git repository A lot of head-scratching later, I think I've figured out what's happened. It seems there was a recent upgrade to the version of git on m.k.o, which is incompatible with the helper scripts I used before. When checking in changes previously, I used this.. #!/bin/sh export GIT_AUTHOR_NAME="$1" export GIT_AUTHOR_EMAIL="$2" tree=$(git-writ...
Feb 27, 11:04 pm 2006
Junio C Hamano
[PATCH 3/3] git-apply --whitespace=nowarn
Andrew insists --whitespace=warn should be the default, and I tend to agree. This introduces --whitespace=warn, so if your project policy is more lenient, you can squelch them by having apply.whitespace=nowarn in your configuration file. Signed-off-by: Junio C Hamano <junkio@cox.net> --- * Not in "next" but will be shortly. apply.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) 114b085dd7b82c3ca74760c896e86c425127cf76 diff --git a/apply.c b/apply.c index a5cdd8e....
Feb 27, 9:13 pm 2006
A Large Angry SCM
Re: [PATCH 3/3] git-apply --whitespace=nowarn
I think this is wrong. The default policy of, non-security, tools SHOULD be the least restrictive and most flexible. -
Feb 27, 11:26 pm 2006
Junio C Hamano
[PATCH 2/3] apply --whitespace: configuration option.
The new configuration option apply.whitespace can take one of "warn", "error", "error-all", or "strip". When git-apply is run to apply the patch to the index, they are used as the default value if there is no command line --whitespace option. Andrew can now tell people who feed him git trees to update to this version and say: git repo-config apply.whitespace error Signed-off-by: Junio C Hamano <junkio@cox.net> --- * Already in "next". apply.c | 72 ++++++++++++++++++++++...
Feb 27, 9:13 pm 2006
Junio C Hamano
[PATCH 1/3] apply: squelch excessive errors and --whitespace...
This by default makes --whitespace=warn, error, and strip to warn only the first 5 additions of trailing whitespaces. A new option --whitespace=error-all can be used to view all of them before applying. Signed-off-by: Junio C Hamano <junkio@cox.net> --- * This is already in "next". apply.c | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 8 deletions(-) fc96b7c9ba5034a408d508c663a96a15b8f8729c diff --git a/apply.c b/apply.c index 7...
Feb 27, 9:13 pm 2006
Junio C Hamano
Re: [PATCH] git pull cannot find remote refs.
Sorry. ls-remote shows "SHA1\tPATH". The original says "hexadecimal followed by [either a single space or a single tab] followed by a refpath", while yours says "hexadecimal followed by a single tab followed by a refpath". I do not see how that would make any difference. Puzzled... I've seen two servers DNS round-robin and one of them fail to respond. The first "fetch" goes to the good one and the second ls-remote goes to the bad one, then you would see "Oops, we cannot peek tags". But...
Feb 27, 9:13 pm 2006
Junio C Hamano
Re: [PATCH] First cut at libifying revlist generation
I'm willing to accept a response to "Yup. That sounds sensible." -
Feb 27, 9:13 pm 2006
linux
Re: the war on trailing whitespace
The only language I know of where the presence of whitespace on blank lines matters is make(1). Even there, it's subtle. It's okay to have (using "cat -e" syntax) foo : bar$ command$ $ command$ But there's a difference between foo : bar$ $ which specifies an empty command and will therefore not use a default rule, and foo : bar$ $ which does not specify any command and so will use a default rule if one exists. (Of course, you can also get [ \t]\n inside an arbitrary binary...
Feb 27, 9:07 pm 2006
Junio C Hamano
Re: the war on trailing whitespace
This whitespace policy should be at least per-project (people working on both kernel and other things may have legitimate reason to want trailing whitespace in the other project), so we would need some configurability; the problem is *both*. We could do one of two things, at least. - I modify the git-apply that is in the "next" branch further to make --whitespace=error the default, and push it out. You convince people who feed things to you to update to *that* version or later. ...
Feb 27, 7:18 pm 2006
Andrew Morton
Re: the war on trailing whitespace
That might be reasonable, some might object to tiny amounts of extra work.. In my setup, trailing whitespace purely causes warnings. But with a quilt-style thing, it's trivial to unapply the patch, strip it, reapply. git is different - I'd imagine that if warnings were generated while an mbox was being applied, it's too much hassle to go and unapply the mbox, fix the diffs up and then apply the mbox again. I'd suggest that git have options to a) generate trailing-whitespace warnings, b) gene...
Feb 27, 7:37 pm 2006
Peter Williams
Re: the war on trailing whitespace
I'd be interested to hear these reasons. My experience is that people don't put trailing white space in deliberately (or even tolerate it if they notice it) and it's usually there as a side effect of the way their text editor works (and that's also the reason that they don't usually notice it). But if my experience is misleading me and there are valid reasons for having trailing white space I'm genuinely interested in -- Peter Williams pwil3058@bigpond...
Feb 27, 7:29 pm 2006
Junio C Hamano
Re: the war on trailing whitespace
For example: http://compsoc.dur.ac.uk/whitespace/ Jokes aside, I can imagine people want to keep format=flowed text messages (i.e. not programming language source code) under git control. Maybe pulling and pushing would be the default mode of operation for those people, so what git-apply does would not be in the picture for those people, but who knows. One way to find it out is to push out a strict one and see who screams ;-), but the point is I am reluctant to make a stricter policy the ...
Feb 27, 8:10 pm 2006
Stefan-W. Hahn
[PATCH] git pull cannot find remote refs.
[PATCH] git pull cannot find remote refs. When getting new data from an archive with 'git pull' I sometimes got the message fatal: unexpected EOF Failed to find remote refs Already up-to-date. Tracking it down, I found a gap between how git-ls-remote prints out the tags and git-fetch scans them with sed. Looking at the code of git-ls-remote the there is an tab character between the sha1 and the refname, while there is a space and a tab character in the regular expression for th sed command. ...
Feb 27, 5:49 pm 2006
Karl
bug?: stgit creates (unneccessary?) conflicts when pulling
If I make a patch series where more than one patch touches the same line, I get a lot of merge errors when upstream has accepted them and I try to merge them back. Suppose a line contained the string "0". Patch p1 changes that to "1", patch p2 further changes that to "2". Upstream accept the patches, and I later "stg pull" them. When reapplying p1 after the pull, stg generates a merge conflict since upstream changed the "0" to "2" and p1 changes the "0" to "1". This situation arises for every li...
Feb 27, 4:42 pm 2006
Shawn Pearce
Re: bug?: stgit creates (unneccessary?) conflicts when pulling
You should look at pg: http://www.spearce.org/2006/02/pg-version-0111-released.html It has some of the features of StGIT and it (at least partially) solves this problem. Assume you had a patch stack of: PatchA : Change 0 to a 1 PatchB : Change 1 to a 2 PatchC : Change 2 to a 3 with each affecting the same line of the same file. When pg grabs its (possibly remote) parent ("stg pull" aka pg-rebase) we try to push down PatchA. If PatchA fails to push cleanly we'll pop it off and ...
Feb 27, 6:26 pm 2006
Catalin Marinas Feb 27, 6:17 pm 2006
Sam Vilain Feb 27, 5:45 pm 2006
Luben Tuikov
[PATCH] gitweb: Enable tree (directory) history display
Hi, I find this patch very useful, especially when a directory (tree) describes a project. This patch allows history display of whole trees/directories, a la "git-rev-list HEAD <dir or file>", but somewhat slower, since exported git repository doesn't have the files checked out so we have to use "$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin \'$file_name\'" method. Maybe someone can find a speed up for this. And better yet, maybe links can be static as opposed to dynamic...
Feb 27, 2:55 pm 2006
Linus Torvalds
Re: [PATCH] gitweb: Enable tree (directory) history display
No no. Just use git-rev-list $hash -- $file_name where the "--" is the important part. As a usability-enhancer, you can leave out the "--" to separate filenames and other things, but when you leave out the "--", git requires that the filenames exist. Linus -
Feb 27, 3:56 pm 2006
Nicolas Vilz 'niv'
git-svn and huge data and modifying the git-svn-HEAD branch ...
hi everyone, as i mentioned, i do experimental work with git and svn... and i experienced some problems with git when pulling much data from svn. Actually that happens after i commit a revision with many and big files. After that i cannot do a git-svn fetch anymore because git-svn complains... fatal: Ref refs/heads/svn-git-HEAD is at 504721bf4b2702d3e56cef69950f42a43568e846 but expected 504721bf4b2702d3e56cef69950f42a43568e846 now i am a little confused about that... oh, i actually modified...
Feb 27, 1:59 pm 2006
Eric Wong
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
Those messages are from git-update-ref. What were some of the messages You should never, ever modify the git-svn-HEAD branch yourself. Interface branches should never be modified. It's the golden rule of interfacing between different SCM interfaces. Sorry, I've been doing things like this this for a while now I guess I didn't make it Save your current work in git-svn-HEAD to a private branch git branch -b private git-svn-HEAD then reset git-svn-HEAD to the last revision where it was man...
Feb 27, 2:46 pm 2006
Nicolas Vilz 'niv'
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
ok, i experienced that on little modifications on the git-svn-HEAD branch either... so its really about modifying and not about the huge data I will keep that in mind for the future. Fortunatelly i am still testing and i saved the git repository before experimenting with git-svn. Have you any suggestions howto migrate a git-repository to svn and then work with git-svn on both of it? I tried cg-merge -j to merge my git branch with the private git svn branch, i am allowed to modify safely. that...
Feb 27, 3:34 pm 2006
Eric Wong
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
Huge data should not have anything to do with it. Well, besides increasing the chance of somebody committing a conflicting commit while you're in the middle of your commit. But hey, that's the nature of Cool. I don't know much about cg-*, but I think I did more or less the same thing (joining branches, but did the join on git-svn-HEAD instead of a git-only branch) using <revision>=<commit> arguments[1] to git-svn fetch. [1] - See the 'Additional Fetch Arguments' section of the m...
Feb 27, 4:27 pm 2006
Nicolas Vilz 'niv'
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
btw, i think you have a typo in your man-page: --- # Commit only the git commits you want to SVN:: git-svn commit <tree-ish> [<tree-ish_2> ...] # Commit all the git commits from my-branch that don't exist in SVN:: git commit git-svn-HEAD..my-branch --- i think the second one is intended to be "git-svn commit git-svn-HEAD..my-branch", because you want to sync the SVN tree again, not another git-tree i think... Nicolas -
Feb 27, 4:47 pm 2006
Eric Wong
[PATCH] contrib/git-svn: correct commit example in manpage
Thanks to Nicolas Vilz <niv@iaglans.de> for noticing this. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- contrib/git-svn/git-svn.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 125c2e90f26d8980f415f8066dcc84d02d95f03a diff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt index b588a2a..b290739 100644 --- a/contrib/git-svn/git-svn.txt +++ b/contrib/git-svn/git-svn.txt @@ -159,7 +159,7 @@ Tracking and contributing to an Subversi # Commit...
Feb 27, 4:55 pm 2006
Eric Wong
[PATCH] contrib/git-svn: tell the user to not modify git-svn...
As a rule, interface branches to different SCMs should never be modified directly by the user. They are used exclusively for talking to the foreign SCM. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- contrib/git-svn/git-svn.txt | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) 4676a850ad5a9e4a88fa5dfba1ac231a58bffda1 diff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt index b4b7789..b588a2a 100644 --- a/contrib/git-svn/git-svn.txt +++ b/co...
Feb 27, 3:04 pm 2006
Jan Harkes
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
If it is not supposed to be changed by the user, maybe it could be stored as a tag. Or maybe another type of reference can be introduced. refs/remote/, for branches we are tracking, but which should not be modified locally. Jan -
Feb 27, 2:55 pm 2006
Eric Wong
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
Either of those could work for me. Changing git-svn-HEAD to become a tag would probably be easier (not having to update other tools, such as git-fetch), but refs/remote may make more sense. -- Eric Wong -
Feb 27, 3:24 pm 2006
Martin Langhoff
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
git-svn-HEAD "moves" so it's really a bad idea to have it as a tag. Nothing within core git prevents it from moving, but I think that porcelains will start breaking. Tags and heads are the same thing, except that heads are expected to change (specifically, to move forward), and tags are expected to stand still. Something else is needed -- a convention to mark a head as 'readonly' so that git-commit/cg-commit refuse to commit to it. cg-commit already does that for any head matching the name of a b...
Feb 27, 8:25 pm 2006
Linus Torvalds
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
Well, I wouldn't say that tags are expected to stand still. Some kinds of tags are expected to move: a "this is the last tested version" tag would be expected to move with testing. That said, the movement is _different_ from a branch. A branch is expected to move _with_ development, while a tag is expected to either stay the same, or move _after_ development. However, in many ways git really doesn't care much. The "refs/heads" directory is the only one that is really special, in that ...
Feb 27, 8:41 pm 2006
Martin Langhoff
Re: git-svn and huge data and modifying the git-svn-HEAD bra...
Alrighty... in my git projects where things like these matter, my "latest tested" and "current in production" refs are actually in Grumble. I'd say a head is expected to reliably move _forward_... "with" development, yes, but definitely forward. In my book a tag wouldn't move, but if I take your word for it, then a tag can perhaps change arbitrarily? I'm not sure how much support we have in porcelains for "tracking" a tag if it starts changing. Right now I think we'd find all sorts of problems...
Feb 27, 8:58 pm 2006
Aneesh Kumar K.V Feb 27, 1:12 pm 2006
Aneesh Kumar K.V Feb 27, 11:55 am 2006
Aubrey
Quick question: how to generate a patch?
Hi all, I'm a newbie of git. I have a question about how to generate a patch by git. I want to make a patch againt git repository HEAD. So in my local tree, I do the command: git diff -p > my.patch The file my.patch is generated. But the unchanged files information is also included in the patch file. It should be quiet. Was I wrong to use git by this way? Thanks for your hints. Regards, -Aubrey -
Feb 27, 10:57 am 2006
Linus Torvalds
Re: Quick question: how to generate a patch?
It sounds like your index is not synchronized with your file contents. Have you done "touch" on files? Or edited them, and then edited them back? If so, "git-update-index --refresh" will re-synchronize your index with whatever file contents you have. Linus -
Feb 27, 12:04 pm 2006
Aubrey
Re: Quick question: how to generate a patch?
No, what I did was just "git clone" one repository to my local directory. And entered the local directory to modify one file I wanted. Then I run "git diff > my.patch". The "my.patch" was supposed to contain one file diff information. But it contained the all the files, including which were not changed. Thanks to reply. I''ll try to Andreas's suggestion. Regards, -Aubrey -
Feb 27, 12:18 pm 2006
Linus Torvalds
Re: Quick question: how to generate a patch?
It really should "just have worked". Can you show what the diff actually looked like, and your exact command history? If it was something like git clone remote-repo localdir cd localdir vi somefile git diff then you did everything right, and if it gives any diff other than your changes to "somefile", something is buggy. Need more info. Does "git diff" and "git diff HEAD" give different results, btw? Linus -
Feb 27, 12:32 pm 2006
Aubrey
Re: Quick question: how to generate a patch?
================================================================= aubrey@linux:/checkout/uboot/patch/work/drivers> git diff ----snip---- diff --git a/drivers/sk98lin/skxmac2.c b/drivers/sk98lin/skxmac2.c diff --git a/drivers/sk98lin/u-boot_compat.h b/drivers/sk98lin/u-boot_compat.h diff --git a/drivers/sk98lin/uboot_drv.c b/drivers/sk98lin/uboot_drv.c diff --git a/drivers/sk98lin/uboot_skb.c b/drivers/sk98lin/uboot_skb.c diff --git a/drivers/sl811.h b/drivers/sl811.h diff --git a/drivers/sl811_...
Feb 27, 1:02 pm 2006
Linus Torvalds
Re: Quick question: how to generate a patch?
Ok, this is _definitely_ your index being out of touch with your file contents. Run "git-update-index --refresh" and it should be ok. Now the question is why the index got out-of-kilter with the file contents in the first place. I used to have all these debug aids to show why git thought a file had changed, but we've not had any bugs here for a long long time, so.. The final checkout of the "git clone" should have made sure that the index What OS/filesystem? The way the index ...
Feb 27, 1:19 pm 2006
Andreas Ericsson
Re: Quick question: how to generate a patch?
Did you by any chance do chmod -R, chown -R or start an ntp daemon somewhere in between there (don't know if clock skews will be detected Decidedly odd. What happens when you do "git update-index --refresh" and then re-run the "git diff > my.patch" thing? -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Feb 27, 1:09 pm 2006
Linus Torvalds
Re: Quick question: how to generate a patch?
off on this tangent: git shouldn't care about clock skew, because git never cares about the current time. The only thing that matters is that "stat()" returns the same time when called sequentially. Now, if you have a distributed filesystem, and the _filesystem_ has some strange clock-skew problem, that would definitely screw up git. That sounds insane, but a trivial case of it might be a networked filesystem where the mtime/ctime for a file create is filled in by the client first, but...
Feb 27, 1:28 pm 2006
Aubrey
Re: Quick question: how to generate a patch?
I'm using suse9.3. The filesystem is EXT3. I think I forgot one thing last night. When I changed the file, I compiled the package to verify my modification. It should be the reason. But should it really affect the result of "git diff"? Thanks, -Aubrey -
Feb 27, 9:55 pm 2006
Linus Torvalds
Re: Quick question: how to generate a patch?
Ok, something else is going on. There's no way ext3 can get confused about Nope. Something else is happening. If you can re-create this at will, it would be interesting to see _what_ makes git think you've modified a file. A small mod to "read-cache.c" like the appended patch should give you (very very verbose) output that could help us figure this out. Linus ---- diff --git a/read-cache.c b/read-cache.c index f97f92d..4946163 100644 --- a/read-cache.c +++ b/read-cache.c @@ -...
Feb 27, 10:09 pm 2006
Aubrey
Re: Quick question: how to generate a patch?
Oops, It's my fault. My mistake is that copy the clone git directory to another directory for backup. And work on another directory. Sorry for my incaution. -Aubrey -
Feb 27, 10:48 pm 2006
Aubrey
Re: Quick question: how to generate a patch?
Yes, "git update-index --refresh" works. After this command, I got what I want. It's the diff in unified git format. Regards, -Aubrey -
Feb 27, 1:18 pm 2006
Andreas Ericsson
Re: Quick question: how to generate a patch?
The current best practice involves these steps: 1. Create a topic branch (git checkout -b feature-name) 2. Apply your changes and commit them, preferrably in small and isolated steps, making sure it compiles after each change. 3. Run "git format-patch origin". This will result in one or more commit-patches, which contains your author info, the commit-messages you wrote, the commit-time and all other such info and ofcourse the diff in unified git format. You can send those patches on using "g...
Feb 27, 11:28 am 2006
Jim MacBaine
cg-status and empty directories
Hello, Short story: Recently I noticed a change in the way, cogito handles empty directories. Before, empty directories have been silently ignored. Now cg-status always lists the status of empty directories as unknown, but it still refuses to add them. If there is a good reason for this behaviour, can someone enlighten me? Long story: I'm using cogito to track and distribute changes on the /etc directories of a few (almost) identical machines. Whenever I install a package which modifies somthi...
Feb 27, 10:43 am 2006
Andreas Ericsson
Re: cg-status and empty directories
I'm afraid not. You should also note that git doesn't track permissions exactly. It just notices an execution bit and uses it to determine if it should write the working tree using (0666 ^ umask) or (0777 ^ umask). This makes it fairly unsuitable for /etc tracking unless you add some sort of permission restoring thing to it. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - ...
Feb 27, 11:22 am 2006
previous daytodaynext day
February 26, 2006February 27, 2006February 28, 2006
speck-geostationary