git mailing list

FromSubjectsort iconDate
Don Zickus
git-apply quirks
Hi. I work with a lot of backporting of patches and there are times when people combine multiple patches together such that the resulting patch can have multiple chunks changing the same file. I have noticed git-apply does not handle this case correctly. It usually ignores all previous chunks and only applies the last one. The same scenario can also cause git-apply to fail if a later patch chunk depends on changes from an earlier patch chunk. The traditional 'patch' command seems to handle t...
Jun 10, 3:40 pm 2008
Pascal Obry
git-reflog infinite loop
In one of my repository, "git gc" will never terminate. I have traced to the underlying call git-reflog: $ git-reflog expire --all It seems to heat a good amount of heap memory and will keep running using 100% of CPU. Is that a known issue? Thanks, Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|-----------------------------------------...
Jun 10, 1:44 pm 2008
Denis Bueno
Recovering from repository corruption
I started a thread a while back about repository corruption. It manifested as a clone error and the thread is here: http://kerneltrap.org/mailarchive/git/2007/7/31/253475 I just ran, again, into corruption after my laptop kernel-panic'd. (Ironically, at the moment I ran into the corruption I was trying to push my repo to a backup location.) Since that thread took place it seems a section about recovering from repo corruption was added to the manual --- but it assumes you can (or care to pai...
Jun 10, 1:26 pm 2008
Nicolas Pitre
Re: Recovering from repository corruption
Would you happen, by chance, to have another instance of that repository somewhere else with the concerned objects in it? Nicolas --
Jun 10, 3:40 pm 2008
Denis Bueno
Re: Recovering from repository corruption
Nope. I was *just* about to back it up. -- Denis --
Jun 10, 3:42 pm 2008
Jakub Narebski
Re: Recovering from repository corruption
Without checking Git User's Manual, I think the solution could go as the following. Assume that history looks like this ...---.---a---*---b---.---... where by '*' is marked corruped commit (commit shich tree contains corrupted blobs). First, you can check the commit message for '*' using git-cat-file or git-show, you can get the difference between 'a' and 'b' using "git diff a b". When you know how repaired commit 'X' should look like, do something like: $ git checkout -b <t...
Jun 10, 1:55 pm 2008
Denis Bueno
Re: Recovering from repository corruption
Thanks for the help. My situation was: ...---a---*---b---c---d---*---e---... Following your example, I believe I got this to: ...---a---* b---c---d---* e---... \ / \ / \-X-/ \---/ That is, I replaced the first problematic commit and deleted the second, since I forgot how I changed 'd' to get that commit. I put the following in .git/info/grafts: 'b' X 'e' 'd' (which I gathered from here: [ message continues ]
" title="http://thread.gmane.org...">http://thread.gmane.org...
Jun 10, 3:38 pm 2008
Jakub Narebski
Re: Recovering from repository corruption
Try to clone this repository (using file:/// pseudo-protocol to force transfer of objects instead of hardlinking them), and chek if the problem persists in the clone too. If not, error/missing might be in "garbage". But I'm not sure... -- Jakub Narebski Poland --
Jun 10, 3:59 pm 2008
Denis Bueno
Re: Recovering from repository corruption
You're onto something: [dorothy.local /tmp <Tue Jun 10> <16:02:08>] tmp[176] > git clone file:///Volumes/work/identity.fb/ Initialized empty Git repository in /tmp/identity.fb/.git/ remote: Counting objects: 401, done. remote: Compressing objects: 100% (364/364), done. remote: Total 401 (delta 170), reused 0 (delta 0) Receiving objects: 100% (401/401), 233.76 KiB, done. Resolving deltas: 100% (170/170), done. [dorothy.local /tmp <Tue Jun 10> <16:02:22>] tmp[177] &g...
Jun 10, 4:03 pm 2008
Linus Torvalds
Re: Recovering from repository corruption
[ successful ] Hmm. Scary. That should *not* have been successful with a corrupt repo. Unless you have done a .grafts file to hide the corruption, or something like that? Have you saved away the original corrupt repo (the whole .git directory as a tar-ball, for example)? And is the data public and non-embarrassing enough so that you could make it available for some post-corruption analysis? Even if we cannot help recover it, real-life corruption is always interesting to see if only ...
Jun 10, 4:23 pm 2008
Denis Bueno
Re: Recovering from repository corruption
On Tue, Jun 10, 2008 at 16:23, Linus Torvalds I intended to do that, yes, and I think I was successful. (I only say I "intended to" --- instead of "I did" --- because I read the documentation for the grafts file elsewhere on this list, and not in I do have bunches of personal information in the repo, unfortunately. The particular *file* involved in the corruption, however, is fine for all to view. Is that useful? -- Denis --
Jun 10, 4:28 pm 2008
Linus Torvalds
Re: Recovering from repository corruption
Ahh, ok. Yes, we should probably re-think our 'grafts' file thing, or at least not document it, because it's actually a wondeful way to just cause more corruption by hiding things (ie if you clone a repo with a grafts file, the result will now have neither the grafts file _nor_ the state that was hidden by it, so the result is guaranteed to be corrupt). But that explains why your clone worked, and why the resulting repo had different corruption - it avoided the original corruption, but be...
Jun 10, 5:09 pm 2008
Junio C Hamano
Re: Recovering from repository corruption
"Graft and then clone" will not make the copied repository Ok. You need to propagate the graft in some other way. However, "Graft and then filter-branch" is a way to hide and get rid of the the broken thing in history etched in the objects. After that the repository itself and a clone from it will not need the graft. So I'd rather argue we should document it _differently_ (or just _better_) than not document it. --
Jun 10, 6:52 pm 2008
Denis Bueno
Re: Recovering from repository corruption
On Tue, Jun 10, 2008 at 17:09, Linus Torvalds I'd argue in favor of documenting it, even if it's dangerous, unless there's some other mechanism (rebase?) that would let me do what I did? That is, to recover from corruption in a way that lets me regenerate or ignore inexact, corrupted commits. -- Denis --
Jun 10, 5:27 pm 2008
Denis Bueno
Re: Recovering from repository corruption
On Tue, Jun 10, 2008 at 17:09, Linus Torvalds I checked; no such luck. -- Denis
Jun 10, 5:22 pm 2008
Linus Torvalds
Re: Recovering from repository corruption
Very interesting. Both of them look fairly sane as objects (ie random - it's supposed to eb zlib-compressed), but both of them have the first 512 bytes *identically* corrupted: 0000000 6564 626e 6575 406e 6f64 6f72 6874 2e79 d e n b u e n @ d o r o t h y . 0000020 6f6c 6163 2e6c 3634 0033 0000 0000 0000 l o c a l . 4 6 3 \0 \0 \0 \0 \0 \0 \0 0000040 0000 0000 0000 0000 0000 0000 0000 0000 \0 \0 \0 ...
Jun 10, 5:48 pm 2008
Denis Bueno
Re: Recovering from repository corruption
On Tue, Jun 10, 2008 at 17:48, Linus Torvalds Right --- that's my username and computer's hostname... for some reason. [You are not expected to understand this. My computer's name mysteriously changed. It should not be "dorothy.local" but it is. I It is the same computer on which the problem occurred last time. It's an OS X 10.4 macbook pro. I haven't noticed corruption in other places, but it's fair to assume it's occurring. I'll have to boot off I can't remember if the old one happened...
Jun 10, 6:09 pm 2008
Linus Torvalds
Re: Recovering from repository corruption
Yeah, it's almost certainly not the disk. Disks do go bad, but the behavior tends to be rather different when they do (usually you will get read errors with uncorrectably CRC failures, and you'd know that _very_ clearly). Sure, I could imagine something like the sector remapping could be flaking Oh, ok. If so, then this is much less worrisome, and is in fact almost "normal" HFS+ behaviour. It is a journaling filesystem, but it only journals metadata, so the filenames and inodes will b...
Jun 10, 6:45 pm 2008
Linus Torvalds
Re: Recovering from repository corruption
For me, on the whole kernel, on a pretty good system: - before: [torvalds@woody test-it-out]$ time git add . real 0m7.986s user 0m6.404s sys 0m1.456s - after: [torvalds@woody test-it-out]$ time ~/git/git-add . real 0m52.693s user 0m7.416s sys 0m2.516s so it's definitely quite noticeable in that simplistic form. A more interesting patch would use aio_fsync(), and then just wait for them at the end with aio_return(). Not that I love AIO, but t...
Jun 10, 7:00 pm 2008
Tarmigan
Re: Recovering from repository corruption
Do you have fink installed? Do you have the openssl fink package installed? Vger seems to have swallowed my original reply, but see this thread: http://marc.info/?l=git&m=120787191106549&w=2 If so, try removing the fink openssl packages and reinstalling git. Do you push from this machine often? If you do, then this probably is not your problem as you would have seen it earlier. -Tarmigan --
Jun 10, 6:25 pm 2008
Denis Bueno
Re: Recovering from repository corruption
Yes, almost exclusively. ... That is an odd problem. Thanks for the suggestion. -- Denis --
Jun 10, 6:41 pm 2008
Jakub Narebski
Re: Recovering from repository corruption
Please remember that in such clone you _don't_ have grafts info (unless you copy it manually), so it is a good test if you correctly rewrote history using git-filter-branch. So take a look at history in your clone using gitk or some similar tool. In the history you mentioned: ...---a---* b---c---d---* e---... \ / \ / \-X-/ \---/ you should rewritr from 'a'=='X^' to, and including 'e' (and not only from 'd'). But if it is not ...
Jun 10, 4:14 pm 2008
Denis Bueno
Re: Recovering from repository corruption
So I re-did the filter-branch as: git-filter-branch HEAD 28aa69aafc8ae901e588f6d341b3e6d3558c6d26^..163a93df14d246dee91c3a503e6372b8313f337d Now cloning still works and only shows dangling commits --- no errors! -- Denis --
Jun 10, 4:35 pm 2008
Jakub Narebski
[PATCH 0/2] gitweb: Refactor projects_list generation
These two patches make code generating 'projects_list" view better. This is resend of those patches, this time without following patches which add new features like allowing 'description' field in $projects_list file, searching for projects, and paginating projects list page. Those two patches should also make it easier for Lea to plug-in caching in gitweb. That's why I'm sending them even in the rc/freeze period... Shortlog: ========= Jakub Narebski (2): gitweb: Separate filling list of p...
Jun 10, 1:19 pm 2008
Jakub Narebski
[PATCH 1/2] gitweb: Separate filling list of projects info
Extract filling project list info, i.e. adding age, description, owner and forks information, into fill_project_list_info() subroutine. This is preparation for smart pagination and smart searching (to make it possible to calculate/generate info only for those projects which will be shown). Small changes compared to original version to improve readability (comments, names of variables, named loops). Additionally, store both full ('descr_long') and shortened ('descr') project description in Perl'...
Jun 10, 1:21 pm 2008
Jakub Narebski
[PATCH 2/2] gitweb: Separate generating 'sort by' table header
Extract generating table header cell, for tables which can be sorted by its columns, into print_sort_th_str() and print_sort_th_num() subroutines, and print_sort_th() driver subroutine. This avoids repetition, and should make further improvements (like JavaScript sorting) easier. The subroutine uses now "replay" link, so it is generic enough to be able to use it for other tables which can be sorted by column, like for example 'heads' and 'tags' view (sort by name, or sort by age). Signed-off-by...
Jun 10, 1:21 pm 2008
Andrew Klossner
Re: git clone stable-2.6.25.y fails over HTTP
Following up last week's problem with the stable-2.6.25.y tree: From the HTTP perspective, the tree is stuck in time. The two new tags v2.6.25.5 and v2.6.25.6 do not appear when I do this: % git pull -v From http://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y = [up to date] master -> origin/master Already up-to-date. On my home machine, I verified that these tags appear as expected when I pull with the git protocol. But at work I'm behind a firewall and am stuc...
Jun 10, 11:05 am 2008
Sverre Rabbelier
Date parsing
Heya, I noticed that we parse GIT_COMMITTER_DATE="31-05-2008 11:30pm" as "31st of July at 23:30 +0200" whereas we parse GIT_COMMITTER_DATE="01-06-2008 11:30pm" as "6th of January at 23:30 +0100" Not only is it strange that we accept both orders (since apparently we don't resort to the latter order unless the first digit > 12), but it's also weird that the timezone changes based on which option was chosen! What does the list think about this? Is this "normal" behavior? If not, what (if anythi...
Jun 10, 10:58 am 2008
Brandon Casey
Re: Date parsing
Take a look at match_multi_number in date.c The timezone didn't change. One date is in daylight saving time, the other There will be flaws in any system that tries to automatically guess the format. If there is not already one, perhaps a statement should be added to the appropriate documentation describing how to ensure that european ordering is used to parse the date. -brandon --
Jun 10, 11:10 am 2008
Sverre Rabbelier
Re: Date parsing
I think that it should bail out when it encounters "20-01-2008" instead of automagically going for european notation. Even more helpfull would be to inform the user that "20.01.2008" is the proper notation. -- Cheers, Sverre Rabbelier --
Jun 10, 11:31 am 2008
Linus Torvalds
Re: Date parsing
Well, there are safer ways to give the date. If you do it in strict rfc822 format, you'll never have any confusion what-so-ever. The "approxidate()" thing tries to parse any random input, but it *is* meant to be excessively liberal. IOW, you can literally say "at tea-time two weeks ago" and get a date, and it will even work. But you can also say "my 3rd child was born in December", and it will also give you a date. The date will not make _sense_, but it will give you one (it will decid...
Jun 10, 12:55 pm 2008
Sverre Rabbelier
Re: Date parsing
On Tue, Jun 10, 2008 at 6:55 PM, Linus Torvalds Ok, so it'll eat anything it can make a date of, that makes sense I I overlooked the fact that in Januari there is no DST, so that my Thank you, this explained why it works the way it does very well. I'll go with ISO notation in the future :). -- Cheers, Sverre Rabbelier --
Jun 10, 1:51 pm 2008
Johannes Sixt
Re: Date parsing
Since you did not give a timezone, your local timezone is taken, presumably MET, which has daylight saving time in July, but not in January. This is OK. -- Hannes --
Jun 10, 11:07 am 2008
Sverre Rabbelier
Re: Date parsing
Ah, then I agree the timezone change makes sense, although magical ordering switching is still bothering me. -- Cheers, Sverre Rabbelier --
Jun 10, 11:27 am 2008
Philippe Bruhat (BooK)
[PATCH] git-cvsimport: do not fail when CVSROOT is /
For CVS repositories with unusual CVSROOT, git-cvsimport would fail: $ git-cvsimport -v -C foo -d :pserver:anon:@cvs.example.com:/ foo AuthReply: error 0 : no such repository This patch ensures that the path is never empty, but at least '/'. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> --- git-cvsimport.perl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 5a02550..cacbfc0 100755 --- a/git-cvsimpor...
Jun 10, 8:32 am 2008
Andreas Ericsson
freedesktop.org not really up to date?
I just stumbled across this freedesktop.org site from 2007-06-03: http://www.freedesktop.org/wiki/Infrastructure/git/UIFlaws It seems to me that since then most of the issues have been worked out. Are any of them still valid points? If so, which ones and how should we go about addressing them? Jakub Cc'd as he was the last one to edit the (now immutable) wiki page. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 ...
Jun 10, 9:07 am 2008
Jakub Narebski
Re: freedesktop.org not really up to date?
See below for detailed response. It looks like all, or almost all I wonder why it was made immutable (static page)... errr, it is not immutable, you just are required to login to edit. Below detailed analysis of the contents of the page ------------------------------------------------------------------- I'm not sure if having bug tracker would help. Git development works Git has now "-m <parent-number>|--mainline <parent-number>" option to git-cherry-pick and git-revert,...
Jun 10, 11:03 am 2008
Marius Storm-Olsen
'git format-patch' on older commits, and mailinglist
Hi, Recently, I sent out patches which were fixed up with --amend on older=20 commits. When I sent them out, the patches contained Date: <more than 2 days old datestamp> in the headers. Now, sending these mails is fine, and mail clients=20 generally handles it perfectly fine. However, after doing this I got=20 an email from postmaster@vger.kernel.org, basically telling me to not=20 do this, since they get a lot of bounces where the return is marked with Diagnostic Code: smtp; 550 (...
Jun 10, 6:09 am 2008
Junio C Hamano
Re: 'git format-patch' on older commits, and mailinglist
I think the right solution would be for send-email to move Date: to the beginning of the body part, just like it adds an extra From: there when the sender is different from the author, and not lie about the mail transmission date. Then we won't lose the authorship date information in the resulting commit and will still keep the mailpath happy. --
Jun 10, 6:37 pm 2008
Ben Lynn
git bugs
I've come across a couple of bugs. Most users will probably never encounter them, but I think they ought to be fixed. Apologies if they're well-known issues. I haven't read much of this list. 1. The import/export language poorly handles distinct initial commits on the same branch, because given two commits with same branch name, it assumes the latter is the descendant of the former (if there are no "from" commands). Normally this is what you want. But if your project, like git, ever merges disti...
Jun 10, 4:41 am 2008
Linus Torvalds
Re: git bugs
Heh. That's just because our "smudge_racily_clean_entry()" uses 0 as the magic smudging size. You can fix this multiple ways. One would be to pick another size that is simply less likely (eg ~0 instead), which leaves the theoretical race, and just makes it practically impossible to hit (not that I think it's very practical to hit already). The other approach is to know that an empty blob always has a very specific SHA1. Here's an trial patch. Linus --- read-cache.c | 16 ...
Jun 10, 1:44 pm 2008
Ben Lynn
Re: git bugs
I hadn't thought of exploiting the fact that the SHA1 of an empty file is fixed. Nice! I believe I can prove there are no races now. Incidentally, this is how I first found the bug: I was trying to prove what git did worked. I still prefer a per-entry flag solution (I suspect it's faster, and the proof is easier), but that's too much work. -Ben On Tue, Jun 10, 2008 at 10:44 AM, Linus Torvalds --
Jun 10, 2:45 pm 2008
Linus Torvalds
Re: git bugs
It's worth pointing out that even in the absense of races, you can obviously screw things up if you really work at it, and *want* to. We cannot guarantee that we see all file changes from the stat() information, and we don't even save the whole stat info (ie we only save the low 32 bits). The ctime check is there to help make it harder for people to play games by setting the mtime back in time after having changed things, but we may at some point be forced to remove it because it trigge...
Jun 10, 4:06 pm 2008
Ben Lynn
Re: git bugs
I agree completely. My proof only holds in an abstract setting. It assumes things such as a strictly nondecreasing system clock is and Good point. I confess I've only learned about mmap very recently, from browsing the git code. All this time, I've been using streams, file descriptors, etc. mmap is so much better! What's Linux do in this case? For indexing purposes, so long as the mtime is updated after the last write before git gets to it, things Definitely. e.g. rig the mtime by 2^32 second...
Jun 10, 7:09 pm 2008
Junio C Hamano
Re: git bugs
Hmm, sorry, could you elaborate how you would plan to use the return value from time(2) per file? The "index file timestamp" trick assumes that once we start reading from and writing to the filesystem (in order to hash the current contents, check if there is any modification), nobody else touches the paths we are interested in (e.g., after "read-tree -m -u" checks out the new contents, grabs the stat information from the newly deposited file and stuffs that in the index, you do not go in and edit...
Jun 10, 7:38 pm 2008
Daniel Barkalow
Re: git bugs
We could distinguish a "racily clean" entry from a 0-length file entry based on the hash. That is, say that a file isn't clean even though the size matches, if the size is 0 and the entry's hash isn't the same as the file's hash, which is e69de29bb2d1d6434b8b29ae775ad8c2e48c5391. Nice thing about 0-length files is that you can compute their hashes without reading them. -Daniel *This .sig left intentionally blank* --
Jun 10, 12:58 pm 2008
Benjamin Lynn
git import/export bug?
Sorry if this is a well-known problem, but I only just came across it. I tried searching for it briefly, but to no avail. Maybe nobody cares because there's usually no need to export from git! And it's only one of the satellite features, not the core. Nonetheless, if you export git repos, you might want to know about it. Try this: $ git clone git://git.kernel.org/pub/scm/git/git.git # clone git source $ git checkout -b test 60ea0fdd7de001405fcc7591beb18a66a1f0dd09 $ git fast-export test > /t...
Jun 10, 4:41 am 2008
Benjamin Lynn
Re: git import/export bug?
Sorry about the dupe, I clicked the send button on the wrong email account. This is an earlier edit of my intended post. Please ignore. (Or preferably, an admin can delete these?) --
Jun 10, 4:44 am 2008
Teemu Likonen
[PATCH] Add target "install-html" the the top level Makefile
This makes it possible to install html documents from the top level directory. Previously such target was only in Documentation/Makefile. Signed-off-by: Teemu Likonen <tlikonen@iki.fi> --- I'm wondering why this target doesn't exist. Is this sane and safe thing to do? Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 1937507..b2b8bef 100644 --- a/Makefile +++ b/Makefile @@ -1290,6 +1290,9 @@ endif install-doc: $(MAK...
Jun 10, 4:34 am 2008
Marius Storm-Olsen
[PATCH 1/2] Add testcases for verifying that staged files in...
When you 'git show :2:<file>' in a conflict, the file should have CRLF EOLs, if the repo is configured with core.autocrlf = true. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> --- t/t6033-merge-crlf.sh | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/t/t6033-merge-crlf.sh b/t/t6033-merge-crlf.sh index 75d9602..f161b40 100755 --- a/t/t6033-merge-crlf.sh +++ b/t/t6033-merge-crlf.sh @@ -49,4 +49,22 @@ test_expect_success 'Check that...
Jun 10, 3:40 am 2008
previous daytodaynext day
June 9, 2008June 10, 2008June 11, 2008