git mailing list

FromSubjectsort iconDate
Guido Ostkamp
[PATCH] Fix Solaris compiler warnings
Hello, the below patch fixes some compiler warnings returned by Solaris Workshop Compilers. CC builtin-apply.o "builtin-apply.c", line 686: warning: statement not reached CC utf8.o "utf8.c", line 287: warning: statement not reached CC xdiff/xdiffi.o "xdiff/xdiffi.c", line 261: warning: statement not reached CC xdiff/xutils.o "xdiff/xutils.c", line 236: warning: statement not reached Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm> --- builtin-apply.c | ...
Nov 15, 3:19 pm 2007
Junio C Hamano
Re: [PATCH] Fix Solaris compiler warnings
Eh? I've looked at builtin-apply and utf8 cases but these returns are after an endless loop whose exit paths always return directly, so these return statements are in fact never reached. Dumber compilers may not notice and if you remove these returns they may start complaining, though. -
Nov 15, 4:16 pm 2007
Alex Riesen
Re: [PATCH] Fix Solaris compiler warnings
This one is right. Accidentally, as it seems -
Nov 15, 4:00 pm 2007
Junio C Hamano
Re: New repo quickly corrupted
Carelessness is what is going on. Notice how nicely your "find . -type f -exec dos2unix {}" goes down to .git/objects and eats your loose objects You probably wanted to do git ls-files | xargs dos2unix instead. -
Nov 15, 2:55 pm 2007
Jason Sewall
Re: New repo quickly corrupted
Sure enough. I'll chalk that one up to too many mind-numbing meetings today. Thanks for the wake-up... -
Nov 15, 2:59 pm 2007
Jason Sewall
Re: New repo quickly corrupted
Yeah, Junio beat you to it. :) I take comfort in the fact that others have suffered far worse consequences from find misuse.... -
Nov 15, 3:06 pm 2007
Nicolas Pitre
Re: New repo quickly corrupted
Does "dos2unix" override file access bits? Because the object store is always made read-only. Nicolas -
Nov 15, 3:12 pm 2007
Linus Torvalds
Re: New repo quickly corrupted
Oops. You just ran "dos2unix" on all the *git* files! PEBKAC ;) To avoid this error in the future, may I suggest using git ls-files -z | xargs -0 dos2unix or similar. Please DO NOT write to the .git/objects directory. Linus -
Nov 15, 3:01 pm 2007
Jason Sewall
New repo quickly corrupted
I was working on a new repo created from a tar snapshot of an old project, and after about a half-hour and about 5 commits for hacking, I had fixed the problem I set out to take care of. However, I tried to run git gc to clean it up and put it away and I was met with the following: [sewall@hobo SWIFT++_1.2 (master)]$ git gc Counting objects: 227, done. error: corrupt loose object '680aba836639d14a36b81f9e29da52bd9af69770' fatal: object 680aba836639d14a36b81f9e29da52bd9af69770 cannot be ...
Nov 15, 2:50 pm 2007
Linus Torvalds
Re: New repo quickly corrupted
Almost all programs like that will entirely ignor the fact that something is read-only. Why? Becuase you end up having to create a new file *anyway*. So nobody does modify-in-place, they literally end up doing - create temp-file - while (data) read old file, write to tempfile - rename temp-file over oldfile and unless you *explicitly* look at the permission bits you'll never even notice that the old file was read-only, because none of the steps above care at all! So ...
Nov 15, 3:37 pm 2007
Junio C Hamano
Re: [PATCH] rehabilitate some t5302 tests on 32-bit off_ ...
Thanks for a fix-up and clarification. Hannes, otherwise this passed in your environment? -
Nov 15, 12:03 pm 2007
Johannes Sixt Nov 15, 12:39 pm 2007
Johannes Sixt
Re: [PATCH] rehabilitate some t5302 tests on 32-bit off_ ...
Since you changed this test, I assume that the remaining tests that you put back failed only because this one did something wrong. If so, please mention that in the commit message. -- Hannes -
Nov 15, 11:38 am 2007
Nicolas Pitre
[PATCH] rehabilitate some t5302 tests on 32-bit off_t machines
Commit 8ed2fca458d085f12c3c6808ef4ddab6aa40ef14 was a bit draconian in skipping certain tests which should be perfectly valid even on platform with a 32-bit off_t. Signed-off-by: Nicolas Pitre <nico@cam.org> --- diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index d93abc4..2a2878b 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -129,17 +129,15 @@ test_expect_failure \ '[index v1] 6) newly created pack is BAD !' \ 'git verify-pack -v ...
Nov 15, 10:24 am 2007
Nicolas Pitre
Re: [PATCH] rehabilitate some t5302 tests on 32-bit off_ ...
It did nothing wrong. It was simply relying on the product of a previous test that might still be disabled. Nicolas -
Nov 15, 11:51 am 2007
Johannes Sixt
[PATCH] refs.c: Remove unused get_ref_sha1()
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> --- refs.c | 12 ------------ refs.h | 3 --- 2 files changed, 0 insertions(+), 15 deletions(-) diff --git a/refs.c b/refs.c index aff02cd..ae53254 100644 --- a/refs.c +++ b/refs.c @@ -580,18 +580,6 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data) return do_for_each_ref("refs/remotes/", fn, 13, cb_data); } -/* NEEDSWORK: This is only used by ssh-upload and it should go; the - * caller should do resolve_ref or ...
Nov 15, 9:33 am 2007
David Kastrup
Re: [BUG] t7004 (master) busted on Leopard
I imagine it is one of the above. Most sed's add trailing newlines. -- David Kastrup -
Nov 15, 7:48 am 2007
Johannes Sixt
Re: core.excludesfile clean-up
Junio, in 039bc64e886 core.excludesfile clean-up you wrote: > We probably could change git-ls-files to use the standard set > when no excludes are specified on the command line and ignore > processing was asked, or something like that, but that will be a > change in semantics and might break people's scripts in a subtle > way. I am somewhat reluctant to make such a change. Just for the records: git-filter-branch uses git-ls-files in a way that requires that no exclude files are in ...
Nov 15, 7:16 am 2007
Paolo Bonzini
git-fetch--tool and contrib/examples/git-fetch.sh
When git-fetch was builtin-ized the previous script was moved to contrib/examples. Now, it is the sole remaining user for most of git-parse-remote (except for get_remote_url) and for git-fetch--tool. Would it make sense to remove git-fetch--tool, the dead parts of git-parse-remote, and contrib/examples/git-fetch.sh? Anyway, the script is very involuted unlike the other scripts in contrib/examples. Paolo -
Nov 15, 6:12 am 2007
Wincent Colaiuta
Re: [BUG] t9101 (master) busted on Leopard
I don't use Darwin Ports or Fink, and this is a clean Leopard install (ie. nothing installed in /usr/local apart from git and a very small number of other tools that aren't related to Subversion). This is the output of "/usr/bin/svn --version": svn, version 1.4.4 (r25188) compiled Sep 23 2007, 22:32:34 Perhaps then it is something in the environment. Cheers, Wincent -
Nov 15, 9:11 am 2007
Wincent Colaiuta
Re: [BUG] t9101 (master) busted on Leopard
Yes, have just sent you the output of "--verbose" and also running the script using "sh -x" (off list). Cheers, Wincent -
Nov 15, 3:22 pm 2007
Brian Gernhardt
Re: [BUG] t9101 (master) busted on Leopard
It is not a Leopard specific problem, as far as I can tell. I just ran the test and had no errors on my Leopard machine. So perhaps it's I just tested it using svn from fink and (after discovering it exists) from Leopard. No problems. Do you have an old svn package (client, admin, or perl binding) installed from Darwin Ports or Fink perhaps? ~~ Brian -
Nov 15, 9:04 am 2007
Wincent Colaiuta
[BUG] t9101 (master) busted on Leopard
Was just running the test suite against the master branch and saw that t9101 is currently failing on Leopard, and a review with git-bisect indicates that it has been ever since it was first introduced (in commit 15153451). Not sure if this problem is Leopard-specific or not as I only have one machine. This is the specific test that's failing: * FAIL 25: test propget git-svn propget svn:ignore . | cmp - prop.expect && cd deeply && git-svn propget svn:ignore . | cmp - ../prop.expect ...
Nov 15, 6:46 am 2007
Benoit Sigoure
Re: [BUG] t9101 (master) busted on Leopard
Hi Wincent, Can you reproduce this deterministically? If yes, can you re-run the =20= test with the --verbose flag and post the gzipped output (or send it =20 to me if the list doesn't like this sort of attachment). Thanks. --=20 Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Nov 15, 2:13 pm 2007
Johannes Schindelin
Re: [BUG] t7004 (master) busted on Leopard
Hi, I think this is our good old friend, MacOSX' sed. (Wasn't there a question today what's wrong with using sed? I think this issue qualifies.) I imagine that it is that MacOSX' sed is adding a trailing newline (not the regexp like you suggested). Which means that "wc -l" would print "1". (You can see for yourself if you run the script with "sh -x ...".) IMHO a good solution would be test -z "$(grep -e '^#' -e '^$' actual)" Could you test, please? Thanks, Dscho -
Nov 15, 7:37 am 2007
Wincent Colaiuta
[PATCH v2] Fix git-tag test breakage caused by broken se ...
The 'message in editor has initial comment' test fails on Leopard (and possibly on other versions of Mac OS X as well) due to the limited sed syntax available on that platform. Avoid the breakage by using grep instead (suggested by Johannes Schindelin). Signed-off-by: Wincent Colaiuta <win@wincent.com> --- The patch I previously sent had the test sense inverted (it used 'test -z' to test for an empty string when we should have actually been looking for a non-empty string), so it ...
Nov 15, 8:47 am 2007
Wincent Colaiuta
[BUG] t7004 (master) busted on Leopard
Commit 4d8b1dc850 added a couple of tests to t7004, and my testing reveals that this one has been broken on Leopard since then: * FAIL 83: message in editor has initial comment GIT_EDITOR=cat git tag -a initial-comment > actual || true && test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0 (Not sure whether this affects other platforms, or versions of Mac OS X prior to Leopard, as I only have one machine here.) The problem is the version of sed that ships with Leopard fails to match ...
Nov 15, 6:38 am 2007
Wincent Colaiuta
Re: [BUG] t7004 (master) busted on Leopard
Yes, that's exactly what I said in the part of my post that you didn't Unless I am misreading the test, any output from "wc -l" that is greater than 0 will cause the test to pass, so even if it outputted "1" as you suggest then that wouldn't be the cause of the failure. I do think the cause of the failure is the limited regexp syntax that sed accepts on Leopard; witness: on Mac OS X the following prints 0: echo "# hello" | sed -n "/^\(#\|\$\)/p" | wc -l Whereas the following ...
Nov 15, 8:12 am 2007
Wincent Colaiuta
[PATCH] Fix git-tag test breakage caused by broken sed o ...
The 'message in editor has initial comment' test fails on Leopard (and possibly on other versions of Mac OS X as well) due to the limited sed syntax available on that platform. Avoid the breakage by using grep instead (suggested by Johannes Schindelin). Signed-off-by: Wincent Colaiuta <win@wincent.com> --- t/t7004-tag.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 096fe33..02ec9c3 100755 --- a/t/t7004-tag.sh +++ ...
Nov 15, 8:16 am 2007
Sergei Organov
[PATCH v2] Documentation: customize diff-options dependi ...
Customize diff-options depending on particular command as follows, mostly to make git-diff and git-format-patch manuals less confusing: * git-format-patch: - Mark --patch-with-stat as being the default. - Change -p description so that it matches what it actually does and so that it doesn't refer to absent "section on generating patches". * git-diff: mark -p as being the default. * git-diff-index/git-diff-files/git-diff-tree: mark --raw as being the ...
Nov 15, 6:19 am 2007
David Kastrup
Re: Cloning empty repositories, was Re: What is the idea ...
"Conditioned by retarded systems" is pretty close, and it was pretty much the wording employed. And then, when someone gets upset, he gets "Sheesh"ed off, basically calling him stupid again. "People skills" is not something I would associate with the git developer list in general. -- David Kastrup -
Nov 15, 6:15 am 2007
Bruce Stephens
Odd .gitignore behaviour
Perhaps I'm misreading the manpage, but I think this is wrong: % mkdir base; cd base % git init % mkdir -p sub1/sub2 % cd sub1 % echo foo > .gitignore; echo '!sub2/foo' >> .gitignore % touch sub2/foo % git add sub2/foo The following paths are ignored by one of your .gitignore files: sub1/sub2/foo Use -f if you really want to add them. fatal: no files added So sub1/sub2/foo matches the first pattern in sub1/.gitignore, but it also matches the ...
Nov 15, 5:49 am 2007
Bruce Stephens
Re: Odd .gitignore behaviour
Linus Torvalds <torvalds@linux-foundation.org> writes: OK, and if I say "git add subdir/a-ok" I get no error, as expected. So extend it just a tiny bit, moving a-ok down a directory and using the negative pattern "!subsubdir/a-ok" to match: brs% cat .gitignore a* brs% cat subdir/.gitignore !subsubdir/a-ok brs% find * all-files subdir subdir/.gitignore subdir/subsubdir subdir/subsubdir/a-ok subdir/a-ok brs% git ls-files -o ...
Nov 15, 1:15 pm 2007
Linus Torvalds
Re: Odd .gitignore behaviour
Yes. The negated patterns have to show up *before* the patterns that they The priority between nested .gitignore files should be that inner files have higher priority than outer files (since the inner ones "know more", and the outer ones are "generic"). So what you describe sounds wrong. But my quick test didn't actually support the behaviour you see. In this situation: [torvalds@woody git-test]$ cat .gitignore a* [torvalds@woody git-test]$ cat ...
Nov 15, 11:56 am 2007
Junio C Hamano
Re: Odd .gitignore behaviour
By the way, about the problem I described briefly last night. I never understood the intended use of -i option to ls-files, but in your test repository (the one that has subsubdir), you can do: $ git ls-files -i --exclude='a*' to see "What paths have I already _staged_ that would have been ignored if the exclude pattern were 'a*'". You can abuse this to list all the staged header files with: $ git ls-files -i --exclude='*.h' but $ git ls-files -- '*.h' is much simpler for ...
Nov 15, 3:13 pm 2007
Junio C Hamano
Re: Odd .gitignore behaviour
No, you found one of the longstanding bugs in dir.c:read_directory(). The funny thing is that I just sent out a message pointing out bogus handling of per-directory exclude files in ls-files last night. Somehow people have a tendency to encounter the bugs in the same vicinity independently. The initial loop in read_directory() to push per-directory exclusion elements into the stack for directories above the given base forgets that push() does not make a copy of the path given as its ...
Nov 15, 2:51 pm 2007
David Kastrup
Re: [PATCH 1/3] git-bisect: war on "sed"
What about character classes containing the pattern delimiter, \+, \?, \|, nested grouping, anchors in groups, * after groups? That's all rather straightforward usage. -- David Kastrup -
Nov 15, 4:18 am 2007
Miles Bader
Re: [PATCH 1/3] git-bisect: war on "sed"
You're right that the regexp stuff is not really "dusty corners", but none of those affect typical sed usage I think -- most sed usage being really rather simple (and the old "regexps differ between traditional unix tools" issue tends to dampen enthusiasm for really complex regexps with those tools). I looked over the various random uses of sed I have locally (a couple of hundred instances), and the only thing which would potentially affect any of them would be the SVR3 thing about no nested ...
Nov 15, 5:59 am 2007
Miles Bader
Re: [PATCH 1/3] git-bisect: war on "sed"
I don't think that's really a fair characterization -- almost all of the autoconf sed portability caveats concern weird corner cases in the dusty corners of the language (and some are "common" issues with other tools, i.e., avoiding ^ and $ inside of regexp groups). For typical straightforward usage, there seems little problem. [The main portability problems I've actually _noticed_ with sed are the "-e" versus ";" issue and what happens with "\n" in various contexts...] -Miles -- Do ...
Nov 15, 4:00 am 2007
Uwe
[BUG] encoding problem with format-patch + send-email
Hello, Brian just stumbled over a problem with format-patch + send-email. format-patch only adds Content-Type and Content-Transfer-Encoding headers iff the body needs it. send-email adds "From: A. U. Thor <author@tld>" to the body if sender and From: in the patch to send differ. Both is just fine, but if the author has some non-ascii characters in her name but the body is ascii-only the resulting mail is broken. What about adding the Content-Type and Content-Transfer-Encoding ...
Nov 15, 3:57 am 2007
Simon Hausmann
[PATCH] git-p4: Fix direct import from perforce after fe ...
When using an existing git repository to cache the perforce import we don't= fetch the branch mapping from perforce as that is a slow operation. However the origi= n repository may not be fully up-to-date and therefore it may be necessary to import mor= e changes directly from Perforce. Such a direct import needs self.knownBranches to be= set up though, so initialize it from the existing p4/* git branches. Signed-off-by: Simon Hausmann <simon@lst.de> =2D-- contrib/fast-import/git-p4 | ...
Nov 15, 2:38 am 2007
Shawn O. Pearce
Re: auto gc
Jens Axboe <jens.axboe@oracle.com> wrote: Set the following and it won't run automatically anymore for you: git config --global gc.auto 0 git config --global gc.autopacklimit 0 More recently this message has been changed to: Packing your repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information. The two options noted above are described in the manual for git-gc. - Shawn. -
Nov 15, 1:20 am 2007
Jens Axboe
Re: auto gc
Great, that's a lot more appropriate in my opinion. I'll just update to a later git. Thanks! -- Jens Axboe -
Nov 15, 1:28 am 2007
Jens Axboe
auto gc
Hi, I've noticed that recent git versions, in a supposedly helpful fashion, run garbage collection automatically after a pull if it deems it necessary: [...] Resolving 556 deltas... 100% (556/556) done Updating 9418d5d..99fee6d Fast forward Packing your repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information. Generating pack... [...] This is extremely annoying behaviour! If I'm on battery or just in a bit of a hurry, I ...
Nov 15, 1:10 am 2007
Junio C Hamano
[Discussion] cherry-picking a merge
Earlier "git cherry-pick" learned the "-m <parent-number>" option to allow cherry-picking a merge commit. When you have this history: ---o---o---C---A---M \ / o---o-------B You can replay the change between A and M (in other words, the effect of merging B into A) on top of C to create a new commit, with: $ git cherry-pick -m 1 M In the current implementation, the resulting commit has a single parent C. This is quite similar to a squash merge of B ...
Nov 15, 1:00 am 2007
Shawn O. Pearce
Re: [Discussion] cherry-picking a merge
Yes. Then `rebase -i` might be able to learn how to "pick" merge commits. And then my coworkers can stop bothering me about that. And just do it themselves. I used to think of merges as something special. I now really only look at them as being special *during* the merge process, as you may need to generate that recursive base. But otherwise its just -- Shawn. -
Nov 15, 1:16 am 2007
Junio C Hamano
Re: [Discussion] cherry-picking a merge
Actually, this turns to be a trick question ;-) If there was an accidental clean merge between A and B, and a part of the duplicated same changes in the accidental clean merge sits between C and A, replaying the difference from A to M on top of C would not yield the same result as merging B into C. -
Nov 15, 10:40 am 2007
Junio C Hamano
[PATCH 2/3] git-bisect: use update-ref to mark good/bad ...
This removes the last instance of making a ref by hand with "echo SHA1 >.git/refs/$refname" from the script and replaces it with update-ref. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- git-bisect.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 3a21033..4b74a7b 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -130,7 +130,7 @@ bisect_write() { good|skip) tag="$state"-"$rev" ;; *) die "Bad bisect_write ...
Nov 15, 2:01 am 2007
Junio C Hamano
[PATCH 3/3] git-bisect: modernize branch shuffling hack
When switching to a new rev, we first made "new-bisect" branch to point at the chosen commit, attempt to switch to it, and then finally renamed the new-bisect branch to bisect by hand when successful. This is so that we can catch checkout failure (your local modification may interfere with switching to the chosen version) without losing information on which commit the next attempt should be made. Rewrite it using a more modern form but without breaking the safety. Signed-off-by: Junio C ...
Nov 15, 2:01 am 2007
Shawn O. Pearce
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
What's this obsession with whitespace in refnames? Twice in like two days people are talking about whitespace in refnames. WHITESPACE IS NOT PERMITTED IN REFNAMES. Do we need to apply the following patch, to keep people from creating refs by hand with whitespace in them? Is this really that common? git rev-parse HEAD >'.git/refs/heads/..i have spaces hah!' diff --git a/refs.c b/refs.c index aff02cd..b95bf83 100644 --- a/refs.c +++ b/refs.c @@ -246,6 +246,7 @@ static struct ...
Nov 15, 1:49 am 2007
Junio C Hamano
[PATCH 1/3] git-bisect: war on "sed"
We do not need to pipe "echo" to "sed" only to strip refs/heads/ from the beginning. We are assuming not-so-ancient shells these days. Also there is no need to avoid assuming \012 is the LF; we do not run on EBCDIC, sorry. Other parts of the script already uses tr to convert separator to LF that way. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- git-bisect.sh | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index ...
Nov 15, 2:00 am 2007
Johannes Schindelin
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
Hi, Yeah, I'm really sorry I started that. It was meant to do good, but did bad. Oh, well. The road to hell is paved with good intentions. Ciao, Dscho -
Nov 15, 5:10 am 2007
Junio C Hamano
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
Ooops. 'test -d "$GIT_DIR/refs/bisect"' is used as a signal that we are bisecting for the rest of the code, so we cannot lose that rm -fr there. I think a longer term clean-up would be not to treat "bisect" as a reserved branch name but use detached HEAD while bisecting. But that is a larger topic. -
Nov 15, 1:34 am 2007
Junio C Hamano
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
Thanks. Just a few nits. On top of your patch... - You forgot to remove one "removal of filesystem refs"; - for-each-ref takes more than one patterns. git-bisect.sh | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 584906f..21ed02f 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -350,17 +350,12 @@ bisect_reset() { } bisect_clean_state() { - rm -fr "$GIT_DIR/refs/bisect" - # There may be some refs ...
Nov 15, 1:18 am 2007
Wincent Colaiuta
Re: [PATCH 1/3] git-bisect: war on "sed"
Nothing, but using it means forking a new process unnecessarily, and the shorter form without sed is arguably more readable: - echo "$head" | sed 's#^refs/heads/##' >"$GIT_DIR/head-name" + echo "${head#refs/heads/}" >"$GIT_DIR/head-name" Cheers, Wincent -
Nov 15, 2:36 am 2007
Miles Bader
Re: [PATCH 1/3] git-bisect: war on "sed"
Er, I suppose -- if you are acquainted with that particular shell variable syntax (I suspect knowledge of sed is far more widespread). [personally, I know that syntax has something to do with replacing something with something else, but really haven't much clue other than that, and I always _thought_ it was bash-specific and so avoided using any of that stuff.] -miles -- People who are more than casually interested in computers should have at least some idea of what the underlying ...
Nov 15, 2:53 am 2007
Jeff King
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
I even had Junio convinced at one point! I am not actually creating such refs, but I think my brain was still fried from the URL encoding discussion, and I was overly paranoid about spaces. -Peff -
Nov 15, 1:52 am 2007
Miles Bader
Re: [PATCH 1/3] git-bisect: war on "sed"
What's wrong with sed? -Miles -- [|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that will make every christian in the world foamm at the mouth? [iddt] nurg, that's the goal -
Nov 15, 2:29 am 2007
Johannes Sixt
Re: [PATCH v2] Bisect reset: remove bisect refs that may ...
If you also swap %(refname) and %(objectname), then this is also not prone to whitespace in refnames. (Yes, I know, there shouldn't be such, but...) -- Hannes -
Nov 15, 1:27 am 2007
David Kastrup
Re: [PATCH 1/3] git-bisect: war on "sed"
Huh? It is used throughout. That's why "make install" will install xxx.sh scripts as xxx after possibly replacing the initial #!/bin/sh line with a shell known to be reasonably conformant on a particular system. -- David Kastrup -
Nov 15, 3:14 am 2007
Andreas Ericsson
Re: [PATCH 1/3] git-bisect: war on "sed"
It says "remove refs/heads/ from the beginning of the string pointed to by $head". It's not a bashism. Some extensions to that syntax are though (I think). If you want to be sure of portability, use sed instead. git uses this syntax often enough that it's worth using everywhere, but usually only in porcelain commands which one can relatively safely assume are run on at least decently up-to-date developer workstations. You'll note that stuff that absolutely *has* to reside server-side ...
Nov 15, 3:06 am 2007
Christian Couder
[PATCH v2] Bisect reset: remove bisect refs that may hav ...
If refs were ever packed in the middle of bisection, the bisect refs were not removed from the "packed-refs" file. This patch fixes this problem by using "git update-ref -d $ref $hash" in "bisect_clean_state". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- git-bisect.sh | 11 ++++++++++- t/t6030-bisect-porcelain.sh | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletions(-) Ooops, there was a problem with the previous patch if "git bisect ...
Nov 15, 12:18 am 2007
Christian Couder
[PATCH] Bisect reset: remove bisect refs that may have b ...
If refs were ever packed in the middle of bisection, the bisect refs were not removed from the "packed-refs" file. This patch fixes this problem by using "git update-ref -d $ref $hash" in "bisect_clean_state". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- git-bisect.sh | 11 ++++++++++- t/t6030-bisect-porcelain.sh | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 3aac816..73a4da2 ...
Nov 14, 11:40 pm 2007
Johannes Schindelin
[PATCH for kh/commit] Replace "runstatus" with "status" ...
We no longer have "runstatus", but running "status" is no longer that expensive anyway; it is a builtin. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- t/t3001-ls-files-others-exclude.sh | 2 +- t/t4001-diff-rename.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index ae0639d..e25b255 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ ...
Nov 14, 11:27 pm 2007
Junio C Hamano
Re: Problem in our test setup
Yes, but at that point we know we are looking for "git" subcommand not general command on PATH, so we can only look for "git-runstatus" in the git_exec_path (initialized by $GIT_EXEC_PATH or compiled-in) and correctly fail during the test. -
Nov 15, 10:30 am 2007
Johannes Schindelin
Problem in our test setup
Hi, I just realised that our test setup has a serious problem. In my semi-private builtin-commit branch, there is no runstatus anymore. Now, I got a new toy yesterday, and installed git on it (my fork, including builtin-commit), and all of a sudden tests were failing. The failing tests were t3001 and t4001, because they call runstatus, and runstatus is no longer there in the builtin-commit branch. So why did I not catch this earlier? Because my prefix is the default prefix, which ...
Nov 14, 11:24 pm 2007
Johannes Schindelin
Re: Problem in our test setup
Hi, Funnily enough, it _is_ the non-dash form that I replaced. What happens is this: the git wrapper looks for a builtin named 'runstatus', does not find it, then calls out for something like 'git-runstatus', which is found in my $HOME/bin. Sorry, Dscho -
Nov 15, 4:40 am 2007
Junio C Hamano
Re: Problem in our test setup
Yes, we have a problem. We could solve this for commands issued in "git foo" form by not looking for "git-foo" anywhere other than in git_exec_path. The scripts and tests only prepend GIT_EXEC_PATH to their PATH and run "git foo" or "git-foo", but if we replace all of them to the non-dash form, wouldn't that solve the issue as well? -
Nov 15, 12:11 am 2007
Shawn Bohrer
[PATCH] Teach git clean to use setup_standard_excludes()
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> --- builtin-clean.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/builtin-clean.c b/builtin-clean.c index 01fb887..dc6a21e 100644 --- a/builtin-clean.c +++ b/builtin-clean.c @@ -22,7 +22,7 @@ static int git_clean_config(const char *var, const char *value) { if (!strcmp(var, "clean.requireforce")) force = !git_config_bool(var, value); - return 0; + return git_default_config(var, value); } ...
Nov 14, 10:00 pm 2007
Han-Wen Nienhuys
Re: [PATCH] Extend cat-file to take multiple arguments o ...
I know, and that's what I was thinking. However, I was hoping someone else would pick up the hint :-) I suppose fast-export would just be cat-file with a different name and slightly saner interface. How about type <sha1> <newline> size <sha1> <newline> dump <type> <sha1> <newline> ? -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen -
Nov 14, 9:41 pm 2007
Johannes Schindelin
Re: [PATCH] Extend cat-file to take multiple arguments o ...
Hi, IMHO a better idea would be a counterpart to fast-import, probably called "fast-export". You'd need only one process then, and it would not only be faster, but would be usable by even more people, I guess. Ciao, Dscho -
Nov 14, 9:34 pm 2007
Junio C Hamano Nov 14, 11:09 pm 2007
Han-Wen Nienhuys Nov 15, 6:33 am 2007
Han-Wen Nienhuys
[PATCH] Extend cat-file to take multiple arguments or re ...
With this patch, cat-file can be invoked either on an arbitrary number of objects, eg. git cat-file commit HEAD HEAD^^^ the object names can also be supplied on stdin, like so echo -e 'HEAD\nHEAD^^^' | git cat-file commit - With this functionality, the entire object database can be dumped with a limited number of processes: two cat-file processes for discovering size and type, and one cat-file process per type. Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl> --- ...
Nov 14, 9:22 pm 2007
Morten Welinder
Re: [BULLS**T PATCH] Allow Git to work at Insane Bank Corp
Can't you just load a root kit^w^wsystem extension that hides such files from any and all application? Morten -
Nov 14, 7:30 pm 2007
Johannes Schindelin
Re: [BULLS**T PATCH] Allow Git to work at Insane Bank Corp
Hi, Never-To-Be-Acked-By: me. But seriously, some things like these should make it possible for one of the fastest SCMs in the world (both in performance and in development) to get some serious contracts. I mean, how does svn cope with something like that? Ciao, Dscho -
Nov 14, 7:13 pm 2007
Shawn O. Pearce
[BULLS**T PATCH] Allow Git to work at Insane Bank Corp
Oh what a day I've had. Today Insane Bank Corp (my day-job employer) upgraded their Windows desktop encryption software. *Every* directory on every computer is now blessed with a "Desktop.ini" file. Git of course loves this concept: $ git for-each-ref >/dev/null && echo yes error: refs/Desktop.ini points nowhere! error: refs/heads/Desktop.ini points nowhere! yes Fortunately for-each-ref allows corrupt refs to exist in the ref namespace. So until Git is properly patched we are at ...
Nov 14, 6:52 pm 2007
Junio C Hamano
Re: [BULLS**T PATCH] Allow Git to work at Insane Bank Corp
Something like this could be used as an emulation layer for case-corrupting filesystems ;-) -
Nov 14, 8:36 pm 2007
Shawn O. Pearce
Re: [BULLS**T PATCH] Allow Git to work at Insane Bank Corp
Well, see, you can't actually use Git at Insane Bank Corp because it wasn't put on the approved list of software. Furthermore if it was put on that list it would probably only ever be approved for use on RedHat Linux, as on Windows there is Microsoft Visual Source Suck and on Solaris there is Rational ConfusingCase. All provide the same function and therefore are exactly suitable for those platforms. Any deviants get Desktop.ini files where they don't want them. Keep in mind that Insane ...
Nov 14, 7:27 pm 2007
Jakub Narebski
Re: Integrating with hooks
The `ident` feature provides only sensible Id for a file (if you want to avoid potentially rewriting _all_ and not only changed files on checkout / switching branch / reset --hard). All Ids which have commit info, like Cannot help you there, but see examples of `diff` and `merge` attributes, it should I think be similar. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Nov 14, 6:43 pm 2007
Bruce Stephens
Re: refining .gitignores
That doesn't seem to work. For example, if I add '*.c' to .gitignores in git.git, I can't seem to get that command to display any .c files. Run on its own, it displays lots of files, but no .c files. Run with That also doesn't seem to do quite what I want, and probably in the same way. I see git add returns non-zero error status if a file is ignored, so I can do it with excluded=() for f in $(git ls-files) do git add $f || excluded=($excluded $f) done But that feels kind of ...
Nov 15, 4:39 am 2007
Alex Riesen
Re: refining .gitignores
.gitignore? Without "s"? Maybe your .c files are already added to index? Otherwise you have to It shows ignored files from the "known-to-Git" fileset. -
Nov 15, 12:26 pm 2007
Bruce Stephens
Re: refining .gitignores
Alex Riesen <raa.lkml@gmail.com> writes: They are in the index. What I want is a list of files which are known to git, which are matched by the default rules (in particular the .gitignore files). So that should be this? git ls-files --exclude-per-directory=.gitignore -i But that shows nothing at all, and it still shows nothing if I add a "builtin-add.c" as an argument to it (this file exists, and is in the index). "git add builtin-add.c" fails, complaining (correctly) that ...
Nov 15, 1:28 pm 2007
Bruce Stephens
Re: refining .gitignores
OK. I think I sort of understood that, but it's nice to have it clearly stated. I'm not worried so much about files that already exist. I'm worried that we may in the future create files that we want to store in git and which are ignored. If we do that there's a chance we'll miss them (because "git gui", "git status", etc., won't bring attention to them). So it seemed valuable to try to make the .gitignore patterns precise: so that they ignore all the generated files that our builds ...
Nov 15, 2:13 pm 2007
Linus Torvalds
Re: refining .gitignores
Ahh. *All* the .gitignore rules are purely about files that git does not already know about. Once git tracks a pathname, the ignore rules simply do not matter. Files that are in the index are simply never ignored. There's no way to ignore them, and in fact, the whole "git add -f" thing is a way to add files to the index and override the exclude rules - at which point git then tracks them regardless of any such exclude rules. Linus -
Nov 15, 1:40 pm 2007
Linus Torvalds
Re: refining .gitignores
I do think we're not necessarily entirely consistent wrt ignore files. In particular, git-ls-files itself actually is pretty special, because it has two totally different modes: - you can ask for "other" files (and this is where you'd be expected to use .gitignore) - you can just list the files git knows about (and this is where you'd generally be expected to *not* use .gitignore) ..and to make matters more interesting, "git add" used to do the former (it was just a ...
Nov 15, 2:56 pm 2007
Alex Riesen
Re: refining .gitignores
Yes, so it seems. The per-directory ignore-files don't work. No, I honestly believed that Git-known files can be ignored. According to Linus I must be wrong, but I have an excuse: $ mkdir aaa $ cd aaa $ git init Initialized empty Git repository in .git/ $ uname >abc $ git add . $ ls > .gitignore $ git ls-files -X .gitignore $ git ls-files -X .gitignore -i abc -
Nov 15, 2:17 pm 2007
Linus Torvalds
Re: [PATCH] Fix Solaris Workshop Compiler issues
Actually, for old pre-C99 compilers, you're probably better off using -DFLEX_ARRAY=1, since a zero-sized array could be considered bogus by some. Linus -
Nov 14, 5:44 pm 2007
David Kastrup
Re: [PATCH] Fix Solaris Workshop Compiler issues
Is that supposed to work? I would have thought that the only options would be empty and 0. I am pretty sure I have seen size calculations in the deltifying code that would break badly using FLEX_ARRAY=1. So _IFF_ -DFLEX_ARRAY=1 is supposed to be necessary for some compilers, I could try seeing whether I find those locations again. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum -
Nov 14, 6:21 pm 2007
Junio C Hamano
Re: [PATCH] Fix "identifier redeclared" compilation erro ...
Are there problems with the implementation in compat/ directory, we ship specifically to help platforms without mkdtemp()? -
Nov 15, 3:15 pm 2007
Junio C Hamano
Re: [PATCH] Fix Solaris Workshop Compiler issues
I do recall that I received a patch with an explicit member elem[1] that is in fact used as a flexible array, foolishly converted it to use FLEX_ARRAY and saw it mysteriously fail, and realized what it was doing and reverted my changes, and applied the patch as received. IIRC it all happened before I pushed the results out. I unfortunately do not recall which area the patch was about. -
Nov 14, 8:27 pm 2007
Björn
Re: [PATCH] Fix Solaris Workshop Compiler issues
No, just tried with cc: Sun C 5.7 Patch 117837-06 2005/10/05 It's the "struct hack", ie. the incomplete array at the end of delta_index. Still looking for a fix/workaround. Björn -
Nov 14, 5:17 pm 2007
Guido Ostkamp Nov 15, 3:00 pm 2007
Junio C Hamano
Re: [PATCH] Fix Solaris Workshop Compiler issues
I think you can pass -DFLEX_ARRAY=1 as a workaround. It would waste one array member in a flexible structure but that is better than compiler choking. -
Nov 14, 5:46 pm 2007
Björn
Re: [PATCH] Fix Solaris Workshop Compiler issues
Yeah, that at least compiles (didn't do any further tests), forgot to say that in the last email. Björn -
Nov 14, 5:50 pm 2007
Guido Ostkamp
Re: [PATCH] Fix "identifier redeclared" compilation erro ...
The Git version that I used for testing at office did not yet include your compat fix or did not activate it automatically. I shall check this out tomorrow and let you know. Sorry, it's already late here in Germany (23:27h) - I need to get some sleep ;-) Regards Guido -
Nov 15, 3:28 pm 2007
Björn
Re: [PATCH] Fix Solaris Workshop Compiler issues
Actually, I just created a test-case remotely on a Solaris box in my university (see below) and didn't compile the actual git code. With the FAM, cc complains about a redeclared identifier, with a zero-sized array, it complains that an array cannot be zero-sized... Seems to be a known bug in Sun Studio 10: http://forum.java.sun.com/thread.jspa?threadID=5071896&messageID=9263771 Björn #include <stdio.h> struct foo; void bar(const struct foo *, unsigned long); struct bla ...
Nov 14, 5:44 pm 2007
Junio C Hamano
Re: [PATCH] Fix Solaris Workshop Compiler issues
Do you mean the "FLEX_ARRAY" thing? You can ask for FLEX_ARRAY from the command line of your "make" process. There is this thing in git-compat-util.h #ifndef FLEX_ARRAY #if defined(__GNUC__) && (__GNUC__ < 3) #define FLEX_ARRAY 0 #else #define FLEX_ARRAY /* empty */ #endif #endif The sources are written this way: struct foo { ... other members ... char ...
Nov 14, 5:30 pm 2007
Björn Steinbrink
[PATCH] Fix "identifier redeclared" compilation error wi ...
Some versions of SUN's cc have a bug that causes them to complain about a redeclared identifier when you use a function declaration that takes a struct with a FAM and this struct has only been declared but not yet defined. IOW, this will fail: struct foo; void bar(struct foo *); struct foo { int v; long *a[]; }; void bar(struct foo *foo) {} // SUN cc bug strikes here So when we detect a SUN cc, we use an array size of 1 to workaround that bug. Signed-off-by: Björn ...
Nov 14, 6:15 pm 2007
Linus Torvalds
Re: [PATCH] Fix Solaris Workshop Compiler issues
I think it should work, even though some things allocations will end up being a bit too large (ie anything that uses "sizeof()" will have that one unnecessary entry) But no, I didn't actually test it. Linus -
Nov 14, 6:53 pm 2007
Johannes Schindelin
Re: How to change a submodue as a subdirectory?
Hi, Provided you do not kill the repository of the submodule (you have some public repo for that, right?) you will not lose anything, since the history of the superproject has pointers to the submodule. But I guess that you want something different... You probably want to rewrite history as if the submodule had not been a submodule at all, right? Ciao, Dscho -
Nov 14, 11:16 pm 2007
Ping Yin
Re: How to change a submodue as a subdirectory?
Hmm, you're right. I can just just remove it after fetch subB as a I just follow the example of git-filter-branch manual page. If not using GIT_INDEX_FILE.new, the GIT_INDEX_FILE will be read and wirtten at the same time since it is read and writtern at the same in a pipe. -- Ping Yin -
Nov 15, 9:41 am 2007
Ping Yin
Re: How to change a submodue as a subdirectory?
I want to keep the history of the submodule -- Ping Yin -
Nov 14, 10:36 pm 2007
Johannes Schindelin
Re: How to change a submodue as a subdirectory?
Hi, If this works for you, I am all the more happy for you. I thought that you wanted to be able to go to a certain revision and get the same working If you plan to do away with subB, you do not need to specify it... Just The git-cherry call is not really necessary, right? The two repos have no common history (not even common patches). Besides, I think that what you did is just a complicated way of doing a rebase. But be aware that checking out older versions of the ...
Nov 15, 5:28 am 2007
Ping Yin
Re: How to change a submodue as a subdirectory?
Yeah, this actually what i want. Now i find a way: 1. move submodule subB outside mv subB /newpath/to/subB git-commit subB 2. git-filter-branch to rename all files in subA repository to subB directory (say subB/subB). cd newpath/to/subB && git filter-branch --index-filter \ 'git ls-files -s | sed "s-\t-&subB/-" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index --index-info && mv ...
Nov 15, 1:14 am 2007
David Symonds
Re: [PATCH] Grammar fixes for gitattributes documentation
"that" should be used to introduce restrictive clauses (as you point out), and this use should be a restrictive clause, since you can't set the attribute to just any value--you need to set it to the value *that* names the desired filter driver. Dave. ... writing a thesis, so has grammar on the brain. -
Nov 15, 12:20 am 2007
Jeff King
Re: [PATCH] Grammar fixes for gitattributes documentation
Really? I would think "which" works better, in that it is not restrictive. I.e., "The filter attribute is set to a string. This string, btw, names a filter driver" (which) rather than "The filter attribute is set to a string, and from the set of strings, it is set to the particular string that names a filter driver" (that). But in the non-restrictive case, it should be in a parenthetical phrase: A `filter` attribute can be set to a string value, which names a filter driver specified in ...
Nov 15, 12:15 am 2007
Jeff King
Re: [PATCH] Grammar fixes for gitattributes documentation
I don't see it as restrictive, but I can see how one would. I think it is not a case of "this wording is correct" but rather "this wording means one thing, and the other wording means another." But the two meanings are likely to be interpreted the same way, so I -Peff -
Nov 15, 12:27 am 2007
Christian Couder
Re: [PATCH] Bisect visualize: use "for-each-ref" to list ...
Yes, but someone (guess who) started to modernize git-bisect by using "for-each-ref": http://git.kernel.org/?p=git/git.git;a=commitdiff;h=6fecf1915c5fd0b14e2ca2ec9e1a6b620a... http://git.kernel.org/?p=git/git.git;a=commitdiff;h=0a5280a9f444c33b0e4ebf2f073df5899c... Thanks for reminding me of this problem. I just posted a patch that should fix it. Best regards, Christian. -
Nov 14, 11:43 pm 2007
Johannes Sixt
Re: Integrating with hooks
A clean and smudge filter processes one file at a time. It reads the old content from stdin and writes the result to stdout. There is a tiny example in the test suite, t/t0021-conversion.sh, look for rot13.sh. -- Hannes -
Nov 15, 12:57 am 2007
Todd A. Jacobs
Re: Integrating with hooks
Thanks, I took a look at the man page you suggested. The "ident" feature almost does what I want, but doesn't seem to take any sort of format string. So, I thought I'd explore "filter," but can't really find any examples of how to implement the smudge and clean commands, which seem to be what I'm really trying to do here. Is there an example somewhere that you can point me to? The man page doesn't really show any examples of how to implement the filter attribute, so I'm a little unsure how to ...
Nov 14, 6:18 pm 2007
Johannes Schindelin
Re: Integrating with hooks
Hi, Note that the ident feature will give you _only_ the blob sha1. I guess that you're more interested in the export-subst feature. Hth, Dscho -
Nov 14, 6:43 pm 2007
Miles Bader
Re: git-clean won't read global ignore
"git-add -i" _doesn't_ seems to notice it though... -Miles -- [|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that will make every christian in the world foamm at the mouth? [iddt] nurg, that's the goal -
Nov 14, 9:21 pm 2007
Matthieu Moy
Re: git-clean won't read global ignore
+1 for your introduction of setup_standard_excludes(). And woh, I was writting a mail to say that adding a --exclude-standard would be cool, but it has been implemented even before I said it would be cool. Nothing to add, except "Thanks Junio, Thanks Jeff!" :-). At last, I'll be able to write $ git ls-files -o --exclude-standard >> .gitignore $ $EDITOR .gitignore -- Matthieu -
Nov 15, 3:07 am 2007
Miles Bader
Re: git-clean won't read global ignore
To clarify: the "add untracked" sub-menu of "git-add -i" -Miles -- Do not taunt Happy Fun Ball. -
Nov 14, 9:33 pm 2007
Junio C Hamano
Re: [PATCH] Unify the use of standard set of exclude files
I like this, along with the patch to add--interactive. Will forge your signature ;-). -
Nov 15, 2:03 am 2007
Junio C Hamano
Re: git-clean won't read global ignore
I think this is a good cookbook material to put somewhere in the docs. -
Nov 15, 10:27 am 2007
Jeff King Nov 15, 2:15 am 2007
Jeff King
Re: [PATCH] Unify the use of standard set of exclude files
Is that really the case, or is this _just_ when we have asked to include ignored files in the output? Or maybe I am missing something fundamental here. git-add--interactive:list_untracked needs something like this, but I don't think your patch will work. We need something more like this (also on maint because your standard exclude patch is): -- >8 -- git-ls-files: add --exclude-standard This provides a way for scripts to get at the new standard exclude function. --- diff --git ...
Nov 15, 12:04 am 2007
Junio C Hamano
Re: [PATCH] Unify the use of standard set of exclude files
By the way, I think the way in which excluded() is called inside ls-files for --cached, --staged, --deleted and --modified is totally bogus, and as a result, ls-files does not honor per-directory exclude files properly. This is because dir.c:excluded() needs to be called after setting up the exclude_list stack properly, just like how dir.c:read_directory() and unpack-trees.c:unpack_trees_rec() do. The directory traversal should look like this: - Call push_exclude_per_directory() upon ...
Nov 15, 12:41 am 2007
Junio C Hamano
[PATCH] Unify the use of standard set of exclude files
So here it is. This teaches "git ls-files" to read the standard set of exclude files when no exclude patterns nor files is given from the command line. We used to error out in such a case. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- builtin-ls-files.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/builtin-ls-files.c b/builtin-ls-files.c index e0b856f..50dcb89 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -542,11 +542,8 @@ int ...
Nov 14, 11:38 pm 2007
Matthieu Moy
Re: git-clean won't read global ignore
Here it is: http://git.or.cz/gitwiki/GitTips?action=diff&rev2=217&rev1=216 == How to ignore files which are "Untracked" now? == {{{ $ git ls-files -o --exclude-standard >> .gitignore $ $EDITOR .gitignore }}} (note : `--exclude-standard` is not yet in a released version of git as of november 2007, you'll have to use `--exclude-from=.gitignore --exclude-from=.git/info/exclude ...` if you don't have it). -- Matthieu -
Nov 15, 10:50 am 2007
Johannes Sixt
Re: [PATCH 11/11] Allow ETC_GITCONFIG to be a relative path.
How is %s/foo different from ../foo? There are only 2 paths that need to be relocatable. Your proposal is over-engineering, IMHO. -- Hannes -
Nov 15, 2:43 pm 2007
Johannes Sixt
Re: [PATCH 11/11] Allow ETC_GITCONFIG to be a relative path.
I don't see the problem that you are trying to solve. -- Hannes -
Nov 15, 11:31 am 2007
Steffen Prohaska
Re: [PATCH 11/11] Allow ETC_GITCONFIG to be a relative path.
fair enough. Let's take your patches. Steffen -
Nov 15, 3:24 pm 2007
Steffen Prohaska
Re: [PATCH 11/11] Allow ETC_GITCONFIG to be a relative path.
When I first stumbled over this code in msysgit I didn't understand how to use it for making git relocatable. Maybe I didn't appreciate the clue about the relative path, which indicates to change the Makefile to provide ETC_GITCONFIG starting with "..". I think I stumbled over the idea to build a path by starting with an absolute path to exec_path and than go up with ".." before going down again to etc/gitconfig. So, a paths would for example be "C:/msysgit/bin/../etc/gitconfig". Hence ...
Nov 14, 11:53 pm 2007
Steffen Prohaska
Re: [PATCH 11/11] Allow ETC_GITCONFIG to be a relative path.
Path relocation would be more explicit: 1) Paths that need to be relocated are filtered through relocate_path(). That's easy to understand. 2) All the code prefixing the path is in relocate_path(). This avoids code duplication. 3) Path that should be relocated contain "%s" in the Makefile. This indicates that some string expansion may take place. (1) and (2) would be useful even if you do not agree with (3). The code in PATCH 9/11 and PATCH 11/11 looks very similar. If the ...
Nov 15, 1:10 pm 2007
Sergei Organov
Re: [PATCH] user-manual.txt: fix a few mistakes
Then I'd suggest to be precise here, e.g.: "This lists the commits reachable from the previous version of the "master" branch head." The real reason for me to replacing "head" with "branch" in the first place was that a few lines below there is example for HEAD, and I wanted to make it more obvious that those is entirely different. -- Sergei. -
Nov 15, 3:36 am 2007
Jeff King
Re: [PATCH v2 3/3] send-pack: assign remote errors to each ref
Oops, I'm clearly an idiot. I explicitly looked at bad_ref_char before writing the original message, and somehow read that as strictly less than. So the parsing problem goes away, and I think using the sort order as a hint takes away the potential performance problem (I don't even know if it was a problem -- there may be other O(n^2) behavior). I will take a look at the tests Alex has been working on, maybe add a few to it, and submit a cleaned-up series. -Peff -
Nov 14, 9:54 pm 2007
Jeff King
Re: [PATCH v2 3/3] send-pack: assign remote errors to each ref
It is for a fixed version of the remote receive-pack, but I don't want I considered that, but I didn't want to rely on it without your say-so. We could also just use it as a hint to boost performance. I.e., track the last match, and start our linear search there, but if we fail, drop back to searching the whole list. Something like (on top of my other patch): diff --git a/builtin-send-pack.c b/builtin-send-pack.c index 7d466d9..8e9580a 100644 --- a/builtin-send-pack.c +++ ...
Nov 14, 9:47 pm 2007
Jeff King
Re: [PATCH] Improved and extended t5404
BTW, since there seems to be some debate on how this _should_ work, I think the "signal failure if anything failed" approach is the better. Why? Because either way you do it, there is an ambiguity, and I would rather that ambiguity lie with the "failure" case. If I see exit code '0', I _know_ that all of my refs were updated. If I see exit code '1', then there was some failure detected, but my refs might or might not have been updated. But that ambiguity _already_ exists. Consider the ...
Nov 14, 9:35 pm 2007
Junio C Hamano Nov 14, 10:55 pm 2007
Jeff King
Re: [PATCH] Improved and extended t5404
My goal with the recent patches is that _any_ failure will cause a non-0 exit code (but you have to read the stderr output to find out which, if any, refs were successful). -Peff -
Nov 14, 9:18 pm 2007
Alex Riesen
[PATCH] Add test that checks diverse aspects of updating ...
Because we haven't settled on what the exit status from "git push" command itself should be in such a partial failure case, do not check the exit status from it for now. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- I didn't. But Junio already has all your patches in pu, so I activated the deletion test and rebased it on top of your patches in his tree (jk/send-pack, according to merge commit). Tried: works. t/t5404-tracking-branches.sh | 28 +++++++++++++++++++++++++--- 1 ...
Nov 15, 1:46 pm 2007
Jeff King
Re: [PATCH] Improved and extended t5404
After I became disconnected, I looked at my 'next', and the reason for the failure to delete the ref seems to be your is_null_sha1 error-checking patch, which Junio put in next. But maybe you have figured that out in the intervening time. :) -Peff -
Nov 14, 9:26 pm 2007
Ping Yin
Re: [PATCH] status&commit: Teach them to show submodule ...
OK. I'll reconsider it and reimplement it when i have time. -- Ping Yin -
Nov 15, 9:49 am 2007
Andreas Ericsson
Re: Cloning empty repositories, was Re: What is the idea ...
It wouldn't match other --mirror options. You would want it to set up refs/remotes namespace for you, but the other --mirror options (those in push/fetch) are meant to explicitly ignore refs/remotes and make sure branches are named exactly the same on both sides (hence --mirror). I wouldn't mind if it was given some other option that did what you wanted, but having --mirror mean two such very different things would be bad. "git init --remote origin=git://host/repo", where the lhs of the ...
Nov 15, 1:42 am 2007
Johannes Schindelin
Re: Cloning empty repositories, was Re: What is the idea ...
Hi, I recently had somebody asking me "how do I rename master in an empty repository?" It is only logical to think in those terms if you want to start your common development on no common basis at all (i.e. the empty Yes, I agree. That's what Open Source is: some take their formula one car to go shopping. In some cases, others laugh because that crate of beer tied to the front spoiler sure looks funny. In some of these cases, the driver laughs back, because only this car allows ...
Nov 15, 5:44 am 2007
Johannes Schindelin
Re: Cloning empty repositories, was Re: What is the idea ...
Hi, Nope. That is necessary only for the initial push. Remember: "git push" defaults to pushing to the remote "origin", and _all_ local branches which the remote knows about. And the latter is the reason why the initial push needs a special handling: the local and the remote repository have no branches in common, because the remote one does not have _any_ branch yet! So, once you pushed the initial push, you can drop the "origin master" It's highly unlikely that you have the ...
Nov 14, 5:28 pm 2007
David Kastrup
Re: Cloning empty repositories, was Re: What is the idea ...
I do not like the approach of policy by force. It assumes that the developers know better than the users what the users are going to do with git. For example, I use git for tracking and versioning installations and updaters of complex programs. They are basically built into a directory tree, and this tree is checked into a bare repository in a branch corresponding to a particular customer. The trees are _target_ trees created completely by something akin to make install. So every ...
Nov 14, 6:16 pm 2007
Andreas Ericsson
Re: Cloning empty repositories, was Re: What is the idea ...
Junio just said "but that is fine", so afaiu he's not against allowing it per se. It's just that him and the other frequent contributors don't have this particular problem, so if *they* fix it it will a) Not be done with enthusiasm, and it would indeed drain enthusiasm and happiness from the project. b) Perhaps not be done the way those who want this feature would like it. c) Take another scarce resource (time) from other, more pressing issues which may or may not affect your workflow ...
Nov 15, 1:51 am 2007
Jeff King
Re: Cloning empty repositories, was Re: What is the idea ...
Personally, I think cloning empty repositories should be allowed, but there are many more interesting things to be working on right now. However, I think the current behavior of not printing anything is quite bad, so here is a productive email that didn't take too long to write. -- >8 -- git-clone: print an error message when trying to clone empty repo Previously, cloning an empty repository looked like this: $ (mkdir parent && cd parent && git --bare init) $ git-clone parent ...
Nov 14, 11:19 pm 2007
Catalin Marinas
Re: stgit 0.13 + git 1.5.3.5 bogus "empty patch" status, ...
I don't know the exact error but are you sure that changes to If the error is a conflict, 'stg push --undo' should revert the pushed patch to its previous state. Otherwise, fix the conflict and run 'stg I haven't seen this type of error before. There might be some inconsistency between the HEAD and the index. Can you try 'git-read-tree HEAD' and run 'stg refresh' afterwards? You might also want to try the latest StGIT snapshot. It should be pretty stable as we are preparing it for a 0.14 ...
Nov 15, 9:37 am 2007
Jan Hudec
Re: [PATCH] git-branch --with=commit
DWIDNS (Do what I did not say). Normally one would expect 'git branch --with=3Dmaint^' and 'git branch --with=3D$(git ref-parse maint^)' to be exactly the same. Alas, with your suggestion, they would not. --=20 Jan 'Bulb' Hudec <bulb@ucw.cz>
Nov 15, 10:27 am 2007
Alex Bennee
Re: Warning: cvsexportcommit considered dangerous
I think at the time it was felt the speed hit was too great on large trees. Although my view still is we should always go for correctness I also worry about corner cases in parsing code, especially if you have to start poking around in CVS/Root files. Another (ugly) method could be a two pass attempt, falling back to an individual status call if the I've not had another go at fixing this mainly due to being too busy. The It's not just new files that can break (btw another fix has gone in ...
Nov 15, 4:59 am 2007
Catalin Marinas
Re: [StGit RFC] A more structured way of calling git
I eventually managed to have a (not so in-depth) look at this and I am OK with it (but merging after 0.14). As you said the current structure and the new one will work in parallel for some time. It would even be possible to implement unit testing. Some random comments below: Commitdata maybe should be written as CommitData (as in the e-mail text). The Repository.head property is not cached and it is probably OK to avoid some problems I had. We could run profiling afterwards to see As ...
Nov 15, 11:28 am 2007
Kristian Høgsberg
[PATCH] t7501-commit: Add test for git commit <file> wit ...
--- t/t7501-commit.sh | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 5aed3de..3627d9f 100644 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -259,4 +259,14 @@ test_expect_success 'amend commit to fix author' ' diff expected current ' + +test_expect_success 'git commit <file> with dirty index' ' + echo tacocat > elif && + echo tehlulz > chz && + git add chz && + git commit elif -m "tacocat is a ...
Nov 15, 7:49 am 2007
Johannes Schindelin
Re: [PATCH] builtin-commit: fix "git add x y && git comm ...
Hi, This was only lightly tested. Alas, there is still a subtle bug... the generated "Untracked/Staged/ToBeCommitted" list seems off. I guess we'd have to reread the index after resetting it to HEAD and adding the files, but before generating that commit message. Ciao, Dscho -
Nov 15, 9:37 am 2007
Johannes Schindelin Nov 15, 8:55 am 2007
Johannes Schindelin
[PATCH] builtin-commit: fix "git add x y && git commit y ...
Earlier, builtin commit would implicitly commit also the staged changes. This patch fixes that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- The function reset_index_to_head() could be moved to somewhere more central and be reused in builtin-reset.c instead of reset_index_file() later... builtin-add.c | 1 + builtin-commit.c | 30 +++++++++++++++++++++++++++++- t/t7500-commit.sh | 10 ++++++++++ 3 files changed, 40 insertions(+), 1 ...
Nov 15, 9:11 am 2007
Johannes Schindelin
Re: What's cooking in git.git (topics)
Hi, Well, it _is_ in testable shape. My working setup is using builtin-commit since a week. One glitch is serious: "git add a1 && git commit b1" will commit a1, too. Another glitch is only mildly annoying to me (but I have not investigated in detail yet): when you commit new files in a subsubdirectory, no summary "created file" is printed for them. Other than that, I am pretty happy with it, and the other issues I listed I run with it, and like it. Sometimes when I rebase to ...
Nov 14, 5:49 pm 2007
Junio C Hamano
What's cooking in git.git (topics)
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' while commits prefixed with '+' are in 'next'. The topics list the commits in reverse chronological order. ---------------------------------------------------------------- [Will cook further in 'next' and then merge to 'master' soon] * lt/rev-list-interactive (Mon Nov 12 23:16:08 2007 -0800) 5 commits + Fix parent rewriting in --early-output + revision walker: mini clean-up + Enhance --early-output ...
Nov 14, 5:18 pm 2007
Kristian
Re: [PATCH] builtin-commit: fix "git add x y && git comm ...
If you look just above where you added these lines, there is code to deal with this case, except it doesn't work. I was trying to fix this too by adding a discard_cache() call before building the temp index, but then I couldn't add the files in question because the index was now newer than those files. Anyway, I don't know if your code is better that just doing read_tree(), but we should only have one or the other in there. Kristian -
Nov 15, 10:01 am 2007
Junio C Hamano
What's in git.git (stable)
* The 'maint' branch has these fixes since the last announcement. Benoit Sigoure (1): git-svn: prevent dcommitting if the index is dirty. Christian Couder (1): for-each-ref: fix off by one read. Jeff King (1): git-branch: remove mention of non-existent '-b' option Jing Xue (1): replace reference to git-rm with git-reset in git-commit doc Jonas Fonseca (1): Documentation: Fix man page breakage with DocBook XSL v1.72 Junio C Hamano (3): t/t3404: fix test for a bogus ...
Nov 14, 5:20 pm 2007
previous daytodaynext day
November 14, 2007November 15, 2007November 16, 2007