git mailing list

FromSubjectsort iconDate
Shawn Pearce
Re: Remote 'master' not updated, but works somehow
One's gotta wonder how that's ever a valid directory setup... Although I'm running a configuration of: root/proj.git <-- a real repo root/proj.git/info/new-commit-check <-- a fake repo where new-commit-check has root/proj.git not only as an alternate ODB but also has root/proj.git/refs symlinked into its own refs directory. -- Shawn. -
Dec 7, 7:49 am 2006
Shawn O. Pearce
[PATCH 1/1] Make sure the empty tree exists when needed in m...
There are some baseless merge cases where git-merge-recursive will try to compare one of the branches against the empty tree. However most projects won't have the empty tree object in their object database as Git does not normally create empty tree objects. If the empty tree object is missing then the merge process will die, as it cannot load the object from the database. The error message may make the user think that their database is corrupt when its actually not. So instead we should just cre...
Dec 7, 6:17 am 2006
Shawn O. Pearce
[PATCH 2/2] Optionally check for uncommitted changes before ...
Lately I have noticed a number of users are forgetting that they have uncommitted changes in their working directory when they switch to another branch. This causes the user to accidentally carry those changes into the new branch, which is usually not where they wanted to commit them. A correlation does appear to exist between the user being interrupted in the middle of their task and the branch switch, indicating they simply got distracted and forgot what was going on. Git shouldn't cause the us...
Dec 7, 6:02 am 2006
Junio C Hamano
Re: [PATCH 2/2] Optionally check for uncommitted changes bef...
A lot of times the reason to switch branches is because the user starts to make a trivial change in the worktree and realizes that the change belongs to another branch. Other times it is done by mistake and making it easier to notice that mistake is a laudable goal. Your patch allows -m to override this, but that destroys one very useful feature of -m. In the above "ah, this trivial thing belongs to the other branch, so let's switch to the branch to commit only that trivial piece and come back...
Dec 7, 3:38 pm 2006
Shawn Pearce
Re: [PATCH 2/2] Optionally check for uncommitted changes bef...
Yes. That's a problem with this patch. What about when this option is enabled then -m means do what we did before, and -m -m (or -mm, or -m2) does what -m does when the option is false? -- Shawn. -
Dec 7, 3:43 pm 2006
Junio C Hamano
Re: [PATCH 2/2] Optionally check for uncommitted changes bef...
Wouldn't --force be more appropriate? -
Dec 7, 7:01 pm 2006
Shawn O. Pearce
[PATCH 1/2] Allow users to require source branch on git-chec...
I have recently observed a rather large number of users who forget to specify the base revision when they start a new branch with git-checkout -b. Many of these users are shocked many hours and commits later when their prior branch is now also part of the new branch. Nasty words about Git usually follow the discovery. This introduces a new config option: checkout.requireSourceBranch, which the user can set to make git-checkout -b require them to supply not only the new branch name but also the in...
Dec 7, 6:01 am 2006
Junio C Hamano
Re: [PATCH 1/2] Allow users to require source branch on git-...
I'm not sure about this. Often after you started to code something while on 'master' you realize that work is not trivial and needs its own branch and then "checkout -b" without having to say 'master' (or HEAD) is very handy. I think requring an explicit fork-point when you are _not_ on 'master' might be a better behaviour. In other words, you allow "checkout -b" (and "branch") to default to HEAD only while on the branches marked in your configuration file: Then: [branch] a...
Dec 7, 3:48 pm 2006
Shawn Pearce
Re: [PATCH 1/2] Allow users to require source branch on git-...
Are you suggesting that we change "git-checkout -b" to by default require the source branch, but the user can restore the original behavior by setting the above per-branch configuration option? I'm OK with that version too. Most of these users want to be required to enter the source branch, and their topic branches (which are always their current branches btw) are so transient they won't bother with a per-branch setting. So they get what they want: the tool reminding them to select their source...
Dec 7, 3:57 pm 2006
Junio C Hamano
Re: [PATCH 1/2] Allow users to require source branch on git-...
Under my suggestion, the new git-checkout -b (and git-branch) would: (0) proceed if there is an explicit branch point specified on the command like, just like now; (1) allow omission of branch-point if the current branch has allowbranchbydefault configuration set as in above. A new branch is created forking off of the current HEAD; (2) allow omission of branch-point if no branch has such configuration; in other words, existing repositories that do not have the a...
Dec 7, 5:23 pm 2006
J. Bruce Fields
Re: [PATCH 1/2] Allow users to require source branch on git-...
That makes the default behavior more complicated to explain. Is there really sufficient evidence that this a serious problem? --b. -
Dec 7, 5:40 pm 2006
Shawn Pearce
Re: [PATCH 1/2] Allow users to require source branch on git-...
I'm seeing bad branches all to often with some of the folks I have to work with. They apparently have been unable to learn the new trick of either remembering what branch they are currently on and what changes it has, or to always supply the branch they want to start from with their new branch. Consequently they are cussing at Git rather often, as "this damn Git crap always does the wrong with my files". Despite it being their own fault for not thinking before doing... Of course many of thes...
Dec 7, 5:59 pm 2006
J. Bruce Fields
Re: [PATCH 1/2] Allow users to require source branch on git-...
Well, it's true that "git branch" is the first thing I type whenever I sit down, just to remember where I am.... But my main complaint is just that I wouldn't want to see the behavior of defaulting to HEAD--behavior which is simple, easy to explain, and shared by most other git commands--by something significantly more complicated. That's more a complaint about Junio's suggestion than yours, though. --b. -
Dec 8, 12:45 am 2006
Shawn Pearce
Bug in merge-recursive in virtual commit corner case
So I managed to create a fairly complex set of branches which are all merged back against each other at various points in time. Two of them have 3 merge bases according to git-merge-base. Tonight I tried to merge them together, but received the following wonderful error from git-merge-recursive: fatal: unable to read source tree (4b825dc642cb6eb9a060e54bf8d69288fbee4904) For those in the know, that's the empty tree. This particular repository does not have the empty tree anywhere in it, whic...
Dec 7, 4:35 am 2006
Johannes Schindelin
Re: Bug in merge-recursive in virtual commit corner case
Hi, I think there is something else wrong. If you have three merge bases, I do not see how you could get into that particular code path. Any possibility for me to have a private look at your repo? Ciao, Dscho -
Dec 7, 11:38 am 2006
Shawn Pearce
Re: Bug in merge-recursive in virtual commit corner case
Arrgh. I can redo the merge and try to debug it myself; maybe I can at least get enough details about what's going on to create a No, unfortunately for me (I wish I could let you debug this!). Far too many legal issues are involved. There is possible jail time on my part for sharing any of the files in there... ;-) Although Junio mentioned he recently saw something like this in git.git when he merged in your xdl_merge() code. I wonder if its the same issue. -- Shawn. -
Dec 7, 3:24 pm 2006
Johannes Schindelin
Re: Bug in merge-recursive in virtual commit corner case
Hi, can you send me at least the output of $ git-rev-list --parents branch1 branch2 preferrably packed? There is nothing you can do legally wrong, since you are not sending any data, only metadata. Ciao, Dscho -
Dec 7, 11:03 pm 2006
Junio C Hamano
Re: Bug in merge-recursive in virtual commit corner case
I hit the same issue when I integrated Johannes's in-core merge; I originally used hash_sha1_file() but that results in objects that are supposed to be in the virtual parent unreadable when merging the real children. The key is to use write_sha1_file() to actually create the needed objects, and trust later prune to remove them. Replace it with write_sha1_file() and you should be fine, I think. -
Dec 7, 5:13 am 2006
Aneesh Kumar K.V Dec 7, 2:36 am 2006
Junio C Hamano
Re: [PATCH] Add config example with respect to branch
I've tolerated patches in attachments, but please do not do this: This is a multi-part message in MIME format. --------------010006030902030700040300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit --------------010006030902030700040300 Content-Type: text/plain; name="0001-Add-config-example-with-respect-to-branch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-Add-config-e...
Dec 7, 3:20 pm 2006
Junio C Hamano
Re: [PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x
Thanks. Will queue for both maint and master. -
Dec 7, 1:48 am 2006
Martin Waitz
Re: Topic descriptions
hoi :) And it could be useful to automatically generate the summary for please-pull mails or for the [0/N] patch introduction mail. --=20 Martin Waitz
Dec 7, 7:55 am 2006
Andy Parkins
Re: Topic descriptions
It wasn't so much the what's current - as you say that would be fairly ridiculous as it's so fluid. It was more a description of the topic. I've got tonnes of branches where I have quickly thought of an idea and started work on it, only to get bored and move on. Describing a topic in such a short space as "ap/short-name" is hard. The actual place it's stored isn't really relevant, more that I could see a use for it. If it's going in the config I suppose all it needs is a magic "and so i...
Dec 7, 4:37 am 2006
Robin Rosenberg
Re: Topic descriptions
Your situation sounds similiar to mine, but I don't use regular git branches much. Rather I use stacked git instead. Stgit's patches can be though of as virtual branches. Instead of creating a dozen branches I have a dozen commits managed by stgit that I can choose from (and combine) easily, creating and destroying private "branches". -- robin -
Dec 7, 6:45 am 2006
Junio C Hamano
Re: Topic descriptions
I now have this in my .git/config: -- >8 -- snippet from .git/config -- >8 -- [branch "ap/clone-origin"] description = set up a cloned repository with friendlier defaults. [branch "jc/3way"] description = use three-way merge to preserve local changes upon branch switch and fast forward. -- 8< -- and have the script attached at the end. I can say: $ git-topic --base=master to get something like that per-topic summary I sent out earlier. The default $base is set to 'next' be...
Dec 7, 5:34 am 2006
Andy Parkins
Re: What's cooking in git.git (topics)
Don't be too downhearted. I am certainly looking forward to using shallow clones; but by their very nature they are going to be used on big established projects (otherwise why would one need a shallow clone?), so until those projects upgrade their servers the news will be quiet Also; it's probably going to be casual developers that find shallow clones useful, as the main developers will clone the whole repository. This might also mean that they aren't going to be around on the git mailing l...
Dec 7, 1:49 pm 2006
Alexandre Julliard
Re: What's cooking in git.git (topics)
I'm not sure what reaction you expect, but this is something a lot of our occasional Wine users are requesting. The Wine full history is 80Mb, and that's a big download if you just want to try a quick patch. Now of course you won't see these users around here hacking on shallow clone, most likely they just went and downloaded Wine from the CVS mirror instead. But it's a shame to have to maintain a CVS mirror just for that purpose... -- Alexandre Julliard julliard@winehq.org -
Dec 7, 5:03 am 2006
Johannes Schindelin
shallow clones, was Re: What's cooking in git.git (topics)
Hi, Sorry, I was just mumbling about the fact that I would _like_ to hear back about successes and failures. If there are problems I want to fix them. So, do you actually know of people who _used_ (as opposed to "tested") shallow clones? Ciao, Dscho -
Dec 7, 10:59 am 2006
Alexandre Julliard
Re: shallow clones, was Re: What's cooking in git.git (topics)
No, I'm afraid not. Unfortunately, using it requires an upgraded server, and I'm reluctant to put an experimental release on the main Wine server, so I was kind of waiting for it to graduate to master. Of course that's a bit of a chicken and egg problem... -- Alexandre Julliard julliard@winehq.org -
Dec 7, 12:44 pm 2006
Shawn Pearce
Re: [PATCH take 2] change the unpack limit treshold to a san...
I started that out at 5000 because it was a reasonably safe threshold. Users who didn't explicitly lower this value didn't enable the feature. But it was still useful on initial pushes into a brand new repository when the project was very large. For example pushing git.git into a bare repository *sucked* before this change. Yea, 5000 is probably too high. Nice to see it drop. -- Shawn. -
Dec 7, 3:59 am 2006
Marco Costalba
Re: Fast access git-rev-list output: some OS knowledge requi...
So the library approach sounds like the best? Of course in this case the producer git-rev-list and the receiver use the same address space. In the case of a temporary file data is first copied to OS disk cache buffers and then again to userspace, in qgit address space. But the real pain is that the temporary file is always flushed to disk after 4-5 seconds from creation, also if under heavy read/write activity. This is a problem for big repos. I really don't know how to workaround this useless...
Dec 7, 2:46 am 2006
Andreas Ericsson
Re: Fast access git-rev-list output: some OS knowledge requi...
Why not just fork() + exec() and read from the filedescriptor? You can up the output buffer of the forked program to something suitable, which means the OS will cache it for you until you copy it to a buffer in qgit (i.e., read from the descriptor). -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Dec 7, 9:25 am 2006
Johannes Schindelin
Re: Fast access git-rev-list output: some OS knowledge requi...
Hi, Could somebody remind me why different processes are needed? I thought that the revision machinery should be used directly, by linking to libgit.a... Ciao, Dscho -
Dec 7, 10:53 am 2006
Andreas Ericsson
Re: Fast access git-rev-list output: some OS knowledge requi...
You wrote: --%<--%<--%<-- Because, depending on what you do, the revision machinery is not reentrable. For example, if you filter by filename, the history is rewritten in-memory to simulate a history where just that filename was tracked, and nothing else. These changes are not cleaned up after calling the internal revision machinery. --%<--%<--%<-- When I wrote the above suggestion, I hadn't read the posts following the email where I cut this text from (where Linus said "we ...
Dec 7, 11:28 am 2006
Johannes Schindelin
Re: Fast access git-rev-list output: some OS knowledge requi...
Hi, Yes. The reset thingie is already in place: clear_commit_marks(). It would have to be enhanced a little, though: 1) the function rewrite_parents(), should add another flag, HALFORPHANED, and 2) clear_commit_marks() should unset the "parsed" flag of the commits for which HALFORPHANED is reset. -- snip -- diff --git a/commit.c b/commit.c index d5103cd..fd225c8 100644 --- a/commit.c +++ b/commit.c @@ -431,6 +431,10 @@ void clear_commit_marks(struct commit *commit, unsigned int ...
Dec 7, 12:01 pm 2006
Andreas Ericsson
Re: bug: git-sh-setup should not be in $PATH
This part should have been in the commit message, possibly without the "among others ... (examples)" and possibly with an added "This patch makes it so by letting fnurg create them through smurfing the frotz". -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Dec 7, 9:36 am 2006
Johannes Schindelin
Re: [PATCH] Documentation: reorganize cvs-migration.txt
Hi, This is a laudable goal, and the order makes sense (put first that what most people are interested in). A few comments: - just skimming the patch, I found "commiting" (needs another "t"), and "-bare" (needs another "-"). - It might make more sense to "git init-db --shared" and fetch the initial revision into it, rather than clone it and then fix. You might also want to mention that the "--shared" of -clone is different in meaning from that of -init-db (make just a footnote...
Dec 7, 10:28 am 2006
J. Bruce Fields
Re: [PATCH] Documentation: reorganize cvs-migration.txt
Thanks for the comments! Patch, incremental against the previous one, I do like the idea of anything that gets rid of the ugly find|xargs chmod. Result included below (untested). Is that what you were I'm ignoring this for now. We can add it later if someone says they've run into it. (But honestly it's partly just laziness on my part--no objection if you want to make the patch.) It's too bad about that option-name conflict. It'd be nice just to be able to do the whole thing with one c...
Dec 7, 1:43 pm 2006
Johannes Schindelin
Re: [PATCH] Documentation: reorganize cvs-migration.txt
Hi, Even easier: $ mkdir /pub/my-repo.git $ cd /pub/my-repo.git $ git --bare init-db --shared $ git --bare fetch /home/alice/myproject master:master (Totally untested, of course.) Ciao, Dscho -
Dec 7, 1:50 pm 2006
J. Bruce Fields
Re: [PATCH] Documentation: reorganize cvs-migration.txt
Of course--for some reason I didn't think of doing init-db with --bare. Thanks again. --b. From 22e5bdd9de398f29dfb11125a0921bb4529e2ab7 Mon Sep 17 00:00:00 2001 From: J. Bruce Fields <bfields@citi.umich.edu> Date: Thu, 7 Dec 2006 22:32:28 -0500 Subject: [PATCH] Documentation: simpler shared repository creation Take Johannes Schindelin's suggestion for a further simplification of the shared repository creation using git --bare init-db --shared. Also fix a mistake from the previous p...
Dec 7, 11:34 pm 2006
Junio C Hamano
Re: [PATCH] Documentation: reorganize cvs-migration.txt
This conflicted in a funny way with your own commit but I think this version (773fc99 blob) supersedes its contents. I munged only one line, though. The title of this section should not be "a CVS repository" but "a shared repository" for -
Dec 7, 1:51 am 2006
J. Bruce Fields Dec 7, 11:21 am 2006
Aneesh Kumar K.V
Re: [PATCH] Explicitly add the default "git pull" behaviour ...
I liked this. This avoid lot of confusion and the "magic" master update. -aneesh -
Dec 7, 2:49 am 2006
Johannes Schindelin
Re: [PATCH] Explicitly add the default "git pull" behaviour ...
Hi, Yes. And I should back off from my strong language: I think this git-clone the most obvious program to set branch.master.merge. It should make life easier for new Git users. Ciao, Dscho -
Dec 7, 10:13 am 2006
Josef Weidendorfer
Re: [PATCH] Explicitly add the default "git pull" behaviour ...
Oh, no problem ;-) I myself used quite strong words. And I fully agree that it makes life easier for users. And it is way easier to do it in git-clone because (1) in git-clone we _know_ that we branch of a tracking branch; in git-branch, we first have to check if we want the configuration set. (2) git-branch is more difficult to change because it's written in C :-) However, as discussed in another thread, branch.*.merge currently has quite a strange semantic [*1*], and without changing, users hav...
Dec 7, 10:44 am 2006
Josef Weidendorfer
Re: [PATCH] Explicitly add the default "git pull" behaviour ...
We could setup the branch.*.remote option for every tracking branch git-clone is fetching (and git-fetch with the wildcard refspec). And git-branch sets branch.*.remote/merge for the new branch whenever it sees that a remote is set for the branch we are I see. But I hope with my suggestion above, this can be looked up then in the branch."remotes/origin/for-public".remote option. Josef -
Dec 7, 10:52 am 2006
Juergen Ruehle
Re: how to revert changes in working tree?
Liu Yubao writes: > Yes, you are very right. > > $ git ls-files |tr A-Z a-z | sort | uniq -c |grep -v "1 " > 2 include/linux/netfilter/xt_connmark.h > 2 include/linux/netfilter/xt_dscp.h > 2 include/linux/netfilter/xt_mark.h > 2 include/linux/netfilter_ipv4/ipt_connmark.h > 2 include/linux/netfilter_ipv4/ipt_dscp.h > 2 include/linux/netfilter_ipv4/ipt_ecn.h > 2 include/linux/netfilter_ipv4/ipt_mark.h > 2 ...
Dec 7, 3:15 am 2006
Aneesh Kumar K.V
Re: git pull and merging.
This is most confusing part. What merge indicate is not about refs/heads/devel should track refs/remotes/origin/devel. That is specfied in the remote config option. What merge indicate is that when in a local branch ( not the tracking one under remotes/origin) I guess we need to have a standard way of saying the branches. May be we want to document it in repo-config. local branch on which changes can be made <branch-name> local tracking branch refs/remotes/<remote-name&...
Dec 7, 2:46 am 2006
Josef Weidendorfer
Re: git pull and merging.
No. The merging part actually is the easiest, because everything about what to merge with what is already decided in "git pull" 's fetch phase: * git fetch leaves the branches fetched _and_ what to merge of them in .git/FETCH_HEAD. Example for "git pull" it git.git's master(shorted): de51fa... branch 'master' of git://.../git/git 49ed2b... not-for-merge branch 'maint' of git://.../git/git b772ef... not-for-merge branch 'next' of git://.../git/git Which means: Already in the fetch phase,...
Dec 7, 7:27 am 2006
Junio C Hamano
Re: git pull and merging.
I accepted the "branch.*.merge" patch long time ago but I did not see the point of moving things into config back then, so I did not look at the design issue deeply enough to notice that this can be a source of confusion (in other words, "I wouldn't use it myself, but I've seen some people on the list wanting to have it, and the submitter must have thought about what are needed a lot more than myself" did not go so well). Once you place something like "branch.*.merge" in configuration file (eith...
Dec 7, 3:06 pm 2006
previous daytodaynext day
December 6, 2006December 7, 2006December 8, 2006