git mailing list

FromSubjectsort iconDate
Pavel Roskin
Locking a branch
Hello! I see there is an active discussion about branch attributes. It would be nice to have an attribute to prevent git from changing the branch head in any way. The reason is that it interferes with StGIT on StGIT managed branches. If StGIT is fine with the change, it would remove or override the lock temporarily. StGIT could also unlock the branch permanently if there are no applied patches. Another use of the branch lock would be to prevent damage to remote branches, such as ...
May 6, 7:50 pm 2006
Jakub Narebski
Re: Unresolved issues #2
Or perhaps do git repo-config read and change config file in two passes: read and build some kind of index (beginning of section, end of section/last variable in section, number of elements in section), then in second pass add some information if needed. -- Jakub Narebski Warsaw, Poland -
May 6, 5:41 pm 2006
Johannes Schindelin
Re: [PATCH] config: if mtime (or size) of the config fil ...
Hi, sorry: bad patch. This is needed on top. diff --git a/config.c b/config.c index 6765186..452b587 100644 --- a/config.c +++ b/config.c @@ -261,6 +261,10 @@ int git_config_from_file(config_fn_t fn, config_offset = 0; in_fd = open(filename, O_RDONLY); + if (in_fd < 0 && ENOENT != errno ) + die("opening %s: %s", config_file_name, + strerror(errno)); + fstat(in_fd, &st); if (contents) { @@ -288,9 +292,6 @@ int git_config_from_file(config_fn_t fn, } else { ...
May 6, 4:45 pm 2006
Johannes Schindelin
[PATCH] config: if mtime (or size) of the config file ch ...
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- This is extremely paranoic, I know. config.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/config.c b/config.c index 05d4d8c..6765186 100644 --- a/config.c +++ b/config.c @@ -13,6 +13,7 @@ #define MAXNAME (256) static const char *contents = NULL; static int config_length = 0, config_offset = 0; static const char *config_file_name; +static time_t config_file_mtime = ...
May 6, 4:26 pm 2006
Johannes Schindelin
[PATCH] config: mmap() the contents of the config file
This makes it possible to rewrite the config without accessing the config file twice. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- Linus said he'd prefer this. One thing I am not quite sure about: should we remember the file's mtime and check it to see if the config file has changed since we mmap()ed it? BTW this patch is on top of next, and does not yet contain Sean's bug fix. config.c | 102 ...
May 6, 4:04 pm 2006
Johannes Schindelin
[RFC] get_pathspec(): free() old buffer if rewriting
This might be the wrong way to do it, but as it is without this patch, get_pathspec() is leaking memory. However, it is by no means guaranteed that the input is malloc()ed. The tests run through without problems, but you never know... Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- setup.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/setup.c b/setup.c index fe7f884..9c39d6e 100644 --- a/setup.c +++ b/setup.c @@ -126,6 +126,11 @@ ...
May 6, 3:04 pm 2006
Linus Torvalds
Re: [RFC] get_pathspec(): free() old buffer if rewriting
I'm not at all convinced we want to do somethng like this. get_pathspec() is a one-time event. It doesn't "leak" memory. To me, "leaking" is when you continually lose a bit of memory, and you eventually run out. I don't see that happening here. It's like saying that calling an initialization routine "leaks" memory, because it doesn't free the memory that contains the function that is now no longer ever used. It's clearly leaving that memory unused, "dangling". But the fact is, the ...
May 6, 3:37 pm 2006
Johannes Schindelin
Re: [RFC] get_pathspec(): free() old buffer if rewriting
Hi, I see your point. That was exactly why I put "RFC" and not "PATCH" on the Nope. No automated tool. Just my brain which wanted to fix _all_ occurrences of that prefix_path() usage bug. But in case anybody uses Valgrind et al. on git, how about at least a comment telling the casual observer why we don't free() the buffers? Ciao, Dscho -
May 6, 3:44 pm 2006
Johannes Schindelin
[PATCH] Fix users of prefix_path() to free() only when n ...
Unfortunately, prefix_path() sometimes returns a newly xmalloc()ed buffer, and in other cases it returns a substring! For example, when calling git update-index ./hello.txt prefix_path() returns "hello.txt", but does not allocate a new buffer. The original code only checked if the result of prefix_path() was different from what was passed in, and thusly trigger a segmentation fault. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- checkout-index.c | 4 ++-- ...
May 6, 3:02 pm 2006
Junio C Hamano
Re: [PATCH] fmt-patch: understand old <his> notation
I did that as well, and the thing is, this is _so_ fast that when I noticed and typed ^C, it already has done 400 or so commits starting from the epoch (which was empty by the way). I am already working on adjusting in-tree format-patch users not to use &lt;his&gt; syntax but to use &lt;his&gt;.. syntax, so this should not No, but people want to export the whole history sometimes. -
May 6, 6:28 pm 2006
Linus Torvalds
Re: [PATCH] fmt-patch: understand old <his> notation
Careful, that &quot;X^..X&quot; thing does entirely the wrong thing for merges. Not Maybe not. I've actually cursed the fact that I made &quot;git diff X&quot; mean &quot;diff from X to current working tree&quot;, because it almost never makes any sense at all when X is anything but &quot;HEAD&quot;. I probably _should_ have made &quot;git diff X&quot; mean basically &quot;git show X&quot;, and not what it means now. Oh, well. Linus -
May 6, 3:30 pm 2006
Junio C Hamano
Re: [PATCH] fmt-patch: understand old <his> notation
Actually, I do &quot;git diff next&quot; all the time while on the tip of my topic branches, and also when merging a topic branch into &quot;master&quot;. This &quot;a different tree with the current working files&quot; is probably the second most frequently used form for me (the first one is of course HEAD vs working files). -
May 6, 6:31 pm 2006
Olivier Galibert
Re: [PATCH] fmt-patch: understand old <his> notation
Funny, when tracking other projects I use (sometimes path-filtered) &quot;git diff origin&quot; often, but I find &quot;git show origin&quot; utterly uninteresting. OG. -
May 6, 4:19 pm 2006
Johannes Schindelin
Re: [PATCH] fmt-patch: understand old <his> notation
Hi, No, it is not too late. I did this patch only to prevent cluttering my directory with millions of patches, only because I forgot _again_ to type I just stole the function add_head() from builtin-diff.c, but that feels wrong. I think adding a pending object should not be internal to I gather this is needed for git-am/git-rebase to continue working? Ciao, Dscho -
May 6, 3:01 pm 2006
Johannes Schindelin
[PATCH] fmt-patch: understand old <his> notation
When calling &quot;git fmt-patch HEAD~5&quot;, you now get the same as if you would have said &quot;git fmt-patch HEAD~5..&quot;. This makes it easier for my fingers which are so used to the old syntax. Signed-off-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt; --- I wonder: would it make sense to make add_pending_object() and get_reference() in revision.c non-static? builtin-diff.c | 2 +- builtin-log.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git ...
May 6, 1:56 pm 2006
Junio C Hamano
Re: [PATCH] fmt-patch: understand old <his> notation
While this would be easier on _my_ fingers as well, I have a suspicion that it might make more sense to make this &quot;single ref&quot; case to mean &quot;HEAD~5^..HEAD~5&quot; (if we _were_ designing a new command that is called format-patch today, that would be I'd rather not expose such revision.c internals too much. An alternative approach would be to give instruction to revision.c (read: another flag like rev.no_walk) to tell it to do something special when the user has only one commit, but I think what ...
May 6, 2:41 pm 2006
sean
[PATCH] t1300-repo-config: two new config parsing tests.
- correctly insert a new variable into a section that only contains a single (different) variable. - correctly insert a new section that matches the initial substring of an existing section. Signed-off-by: Sean Estabrooks &lt;seanlkml@sympatico.ca&gt; --- Both tests fail with v1.3.2 and pass with latest patches. t/t1300-repo-config.sh | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) ef2178a10e27f43d4120884bc587c460e9b1bfcb diff --git ...
May 6, 12:43 pm 2006
sean
Re: [PATCH] Another config file parsing fix.
On Sat, 6 May 2006 14:14:02 -0400 Sorry.. this should really be amended to mention that it was Linus who spotted the problem. Sean -
May 6, 11:25 am 2006
Johannes Schindelin
Re: [PATCH] Another config file parsing fix.
Hi, Thanks to both of you! Ciao, Dscho -
May 6, 2:01 pm 2006
sean
[PATCH] Another config file parsing fix.
If the variable we need to store should go into a section that currently only has a single variable (not matching the one we're trying to insert), we will already be into the next section before we notice we've bypassed the correct location to insert the variable. To handle this case we store the current location as soon as we find a variable matching the section of our new variable. Signed-off-by: Sean Estabrooks &lt;seanlkml@sympatico.ca&gt; --- config.c | 4 +++- 1 files changed, 3 ...
May 6, 11:14 am 2006
Jakub Narebski
Re: [ANNOUNCE] Git wiki
Or rather structure, which for given file F in given revision A, for given other revision B would tell ALL the files in the revision B which are source of contents (via history/commit tree) of the file F. -- Jakub Narebski Warsaw, Poland -
May 6, 6:37 am 2006
Jakub Narebski
[RFC] Managing projects - advanced Git tutorial/walkthrough
I have browsed through Git documentation: &quot;A tutorial introduction to git&quot; (tutorial.txt), &quot;A short git tutorial&quot; (core-tutorial.txt) which contrary to the title is the tutorial in low-level git commands and is longer that the first one, &quot;Everyday GIT With 20 Commands Or So&quot; (everyday.txt) and &quot;git for CVS users&quot; (cvs-migration.txt) which does not mention git-blame and git-annotate. What I miss is walkthrough type tutorial, describing typical workflow (or workflows), and tutorial concentrating ...
May 6, 1:43 am 2006
J. Bruce Fields
Re: [RFC] Managing projects - advanced Git tutorial/walk ...
Yeah, I actually made a start at a sequel to tutorial.txt, with the goal that after reading the sequel a user would have encountered the main concepts necessary to read any of the man pages--mainly the object database and the index file. My work so far is in the &quot;advanced-tutorial&quot; branch of git://linux-nfs.org/~bfields/exports/git.git but it needs some cleaning up. I was hoping I'd be able to replace some of the README or core-tutorial.txt in the process, but the latter has a lot ...
May 6, 6:34 pm 2006
Junio C Hamano
Re: [RFC] Managing projects - advanced Git tutorial/walk ...
I was initially somewhat dissapointed that a posting marked as RFC did not contain a draft that is commentable, but we would probably want to know how the updated document set will be organized in general first. There was a discussion both here and on #irc, while Pasky and gang were working on the wiki, about sprucing up the introductory documentation set. The core-tutorial grow out of a short tutorial to start from Plumbing basics (what's in object store) to cover Porcelainish; when it was ...
May 6, 1:09 pm 2006
sean
Re: [RFC] Managing projects - advanced Git tutorial/walk ...
On Sat, 06 May 2006 13:09:03 -0700 Junio C Hamano &lt;junkio@cox.net&gt; wrote: It doesn't mention git log, show or status which are important for the first day. Also an example of git commit --amend would be a nice touch. Part of the problem people new to git are having arise by reading documentation in the wrong order and coming to the conclusion that git is an ugly beast. Also many people are still finding out-of- date information before anything else (eg. git isn't an scm only an object ...
May 6, 2:54 pm 2006
tanew
(No subject)
Hello, your e-mail address git@vger.kernel.org , has been taken from the o= pen sources. My name is Alex Brewster. I am the main manager of Web Click C= ompany. =0D We are engaged in software developing and design. The main office of our Co= mpany is located in Lithuania. =0D We are searching for employees to work in our company worldwide. If you wis= h to have additional income from 4000 to 10 000 dollars a month, =0D working from your house this offer is for you. The choice of vacancies is ...
May 6, 1:33 am 2006
Junio C Hamano
Re: [ANNOUNCE] Git wiki
Have fun implementing that ;-). -
May 6, 12:41 am 2006
Jakub Narebski
Re: [ANNOUNCE] Git wiki
Perhaps an option to do rename detection with walking the commit chain? -- Jakub Narebski Warsaw, Poland -
May 6, 12:33 am 2006
Bertrand Jacquin
Re: [ANNOUNCE] Git wiki
I agree that it could be interesting to have a such thing. But that's increndibly stupid and moreover a rare case. -- Beber #e.fr@freenode -
May 6, 5:46 am 2006
sean
Re: Unresolved issues #2
On Sat, 6 May 2006 09:30:48 -0700 (PDT) Okay, I mistook the scope of you comments to apply to all of git rather than as a reminder that we can't forget about the toolkit design. So I take it you're not at all against git including higher level user commands; just so long as they're built on top of lower level toolkit commands that other porcelain can use as well. In this particular case I see &quot;git repo-config&quot; as the low level command that any porcelain can use to access the remotes ...
May 6, 9:53 am 2006
Linus Torvalds
Re: Unresolved issues #2
Basically, it boils down to the end result. If you design things for &quot;people&quot;, then things tend to become hard to automate, and it's hard to make wrappers around it. Maybe you've even made the interfaces interactive, and thus any wrappers around it are simply screwed, or need to do insane things. On the other hand, if you design things for automation, doing a &quot;people wrapper&quot; that uses the automation should be trivial if the design is even remotely any good at all. In other ...
May 6, 9:30 am 2006
Linus Torvalds
Re: Unresolved issues #2
Correct. I think we've been able to handle that balance particularly well I agree, but my point is that in order for a porcelain to _use_ &quot;repo-config&quot;, the config file format needs to be defined somewhere, and we need to tell people that it's not changing. Are we there yet? That was my argument for why we should concentrate not on what the user wrapper should be named, but why we should look at what the low-level meaning of these things are. Finally, I think &quot;git repo-config&quot; is ...
May 6, 10:20 am 2006
Junio C Hamano
Re: Unresolved issues #2
I share the same reasoning and that is why I am carrying the series in &quot;next&quot;. I think per branch attributes are wonderful In my day job, I maintain a base code for a generic application in &quot;master&quot;, various topics, mostly branched from &quot;master&quot; but sometimes from another topic branch, and one branch each per customer installation, which pulls from the master, topics and contains specific customizations. While on master or any one of generic topic branch, I need to remember not to pull ...
May 5, 10:58 pm 2006
Linus Torvalds
Re: Unresolved issues #2
I _personally_ care about the semantics, but not very deeply - since I tend to actually have just one main branch, and a couple of throw-away ones if I ended up working on something. But I think that for this thing to become useful, we want to care about the format - or at least the interface to the different users (with the acknowledgement that &quot;users&quot; should often be porcelain above us). Right now we've basically had people hand-editing the remotes files, and I think cogito still ...
May 6, 8:26 am 2006
Johannes Schindelin
Re: Unresolved issues #2
Hi, It was done because the very syntax of the config suggests it be a user-editable file. I do not want to mess with the comments more than Does it really hurt? I think not. Anyway, I'll look into this. Ciao, Dscho -
May 6, 2:33 pm 2006
Linus Torvalds
Re: Unresolved issues #2
Yeah, I personally much prefer user-friendly config files. Any format that thinks that &quot;easy parsing&quot; is more important than &quot;visually obvious&quot; is bad. So I obviously think that XML is a horrid piece of cr*p (has anybody ever noticed I have strong opinions?) and totally unreadable. I think &quot;git repo-config&quot; is doing a reasonable job of editing a file that is really designed to be user-friendly. That said, the code _is_ a bit scary. It might be worthwhile to re-write config.c to ...
May 6, 2:51 pm 2006
Junio C Hamano
Re: Unresolved issues #2
Thanks Linus and Sean for bringing this up and fixing it. I have a vague feeling that this may not be the last breakage of the repo-config command. My first reaction to the repo-config code was &quot;eek&quot;. It tries to reuse as much the existing material as possible -- I understand it was done that way in order to preserve the comments and blank lines from the original config file intact, but it just felt very error prone (demonstrated by cases like this and the other one Sean brought up) and ...
May 6, 2:16 pm 2006
sean
Re: Unresolved issues #2
On Sat, 6 May 2006 08:26:36 -0700 (PDT) Linus, Wondering why you feel so strongly that most &quot;users&quot; shouldn't be real people. What is wrong with continuing to make git easier for developers to use without needing any extra software? Sean -
May 6, 8:35 am 2006
Junio C Hamano
[PATCH/RFC (git-core)] update-index --again
After running 'git-update-index' for some paths, you may want to do the update on the same set of paths again. The new flag --again checks the paths whose index entries are are different from the HEAD commit and updates them from the working tree contents. This was brought up by Carl Worth on #git. Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt; --- * I want to reorganize index file to contain both blob and tree entries in not so distant future, so I probably should not be ...
May 5, 10:05 pm 2006
Junio C Hamano
Re: Unresolved issues #2 (shallow clone again)
Commit maybe, but is this based on a hard fact? Earlier Linus said something about &quot;git log&quot; working on commit-only copy, but obviously you would want at least trees for the path limiting part to work, so having commits and trees would be handy, but my impression was that at least for deep project like the kernel trees tend to be nonnegligible (a commit consists of 18K paths and 1200 trees or something like that). -
May 6, 12:10 am 2006
Martin Langhoff
Re: Unresolved issues #2 (shallow clone again)
Would it make sense to make all the shallow clone clone machinery walk everything and trim only blob objects? In that case, all the machinery that walks commits/trees would remain intact -- we only have to deal with the case of not having blob objects, which affects less codepaths. It means that for a merge or checkout involving stuff we &quot;don't have&quot;, it's trivial to know we are missing, and so we can attempt a fetch of the missing objects or tell the user how to request them them ...
May 5, 11:23 pm 2006
Junio C Hamano
Re: [PATCH] binary patch.
OK, now it passes the testsuite I wrote, so I'll push this out in &quot;next&quot;. I was not drunk while doing the testsuite so the code now must be perfect ;-). -
May 6, 12:40 am 2006
Junio C Hamano
Re: [ANNOUNCE] Git wiki
FYI rerere is a totally unrelated voodoo. It remembers the conflict marker pattern &lt;&lt;&lt; === &gt;&gt;&gt; immediately after it runs &quot;merge&quot; (ah, that reminds me -- I should replace them with diff3), and then remembers the result of the manual resolution just before the user makes a commit. Then, when next time it runs &quot;merge&quot; for something and notices &lt;&lt;&lt; === &gt;&gt;&gt; pattern it has seen before, it runs a three-way merge between the previous resolution result and the current conflicted state, using the ...
May 6, 12:14 am 2006
Martin Langhoff
Re: [ANNOUNCE] Git wiki
+1 -- explicit file ids are evil. Arch/TLA demonstrated that amply... they are a serious annoyance to the end user, they have a lot of not-elegantly solvable cases (same file created with the same contents in several repos -- say via an emailed patch) that git gets right _today_. They _are_ useful in a very small set of cases -- namely in the case of a naive mv, which git handles correctly today. Subtler things git sometimes does right, sometimes fails, but it can be made to be much smarter ...
May 5, 11:53 pm 2006
previous daytodaynext day
May 5, 2006May 6, 2006May 7, 2006