git mailing list

FromSubjectsort iconDate
Linus Torvalds
Bug in "git blame -C"
Ok, this is interesting. Try this sequence (which is a good sequence for showign how something like "git blame -C" _should_ work, but only ends up showing that it doesn't at all, because of some bug ;^): # # create 'testing' repository # mkdir testing cd testing/ git init-db # # copy git.c and sha1_file.c there and commit initial # (Just to get _some_ initial state) # cp ~/git/git.c . cp ~/git/sha1_file.c . git add git.c sha1_file.c git commit -m Initial # # mo...
Nov 29, 12:27 am 2006
Pavel Roskin
[PATCH 1/2] Set HOME to the test directory to avoid reading ...
This makes the tests more system independent and allows better testing for "stg mail" command. Signed-off-by: Pavel Roskin <proski@gnu.org> --- t/test-lib.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 6339c54..459d5cb 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -193,7 +193,8 @@ test_done () { # Test the binaries we have just built. The tests are kept in # t/ subdirectory and are run in trash subdirectory. ...
Nov 28, 11:59 pm 2006
Pavel Roskin
[PATCH 2/2] Don't require config file for "stg mail"
When calculating the string to be used in the From: field, don't require it to come from the configuration file. Instead, reuse already known authname and authemail values as the default. They can be taken from the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables. Signed-off-by: Pavel Roskin <proski@gnu.org> --- stgit/commands/mail.py | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index ...
Nov 28, 11:59 pm 2006
Junio C Hamano
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".
This clearly shows that I did not express myself well. You are correct that there are commands that ignore the index by default (a notable example "git apply" has been given by both of us), and you do have to know about what the commands you use do to the index. What I meant by "do not have to worry about" is not about the index operations each command invocation involves. Of course you need to know (unless you will do a "commit -a" at the end) that git apply without --index will leave the ind...
Nov 28, 11:06 pm 2006
Nicolas Pitre
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".
This argument has its converse. What you should _not_ have to worry about all the time is whether your index really includes all the changes you want included in your next commit. And whether wanting to leave local changes in the working directory without commiting them actually happen more often than wanting to commit every changes is arguable. What should be pretty consensual though, is the fact that having experienced GIT users add an alias for "commit" actually becoming "comit -i" t...
Nov 29, 12:33 am 2006
Eric Wong
[PATCH 1/3] git-svn: color support for the log command
* match LESS environment settings to those in pager.c * parse diff.color and pager.color settings in the config file, and pass --color to git-log * --color and --pager= settings are supported Signed-off-by: Eric Wong <normalperson@yhbt.net> --- git-svn.perl | 67 ++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 47 insertions(+), 20 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index c3ad5ec..d8d8716 100755 --- a/git-svn.perl +++ b/git-svn.perl ...
Nov 28, 10:51 pm 2006
Eric Wong
[PATCH 2/3] git-svn: documentation updates
Eliminate 'commit' from some places and plug 'dcommit' more. Also update the section --id (GIT_SVN_ID) usage since we have multi-init/multi-fetch now. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- Documentation/git-svn.txt | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index a764d1f..a45067e 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt ...
Nov 28, 10:51 pm 2006
Eric Wong
[PATCH 3/3] git-svn: fix multi-init
After the bugfix to connect to repositories where the user has limited read permissions, multi-init was broken due to our SVN::Ra connection being limited to working in a subdirectory; so we now create a new Ra connection for init-ing branches and another for tags Along with that fix, allow the user to use the command-line option flags for multi-init (--revision being the most notable; but also --no-auth-cache, --config-dir, --username (for passing to SVN), and --shared/--template for passing to g...
Nov 28, 10:51 pm 2006
Nicholas Allen
Re: git and bzr
Thanks for the informative response. It helped but I'm still slightly confused by git - I think I need to play around with it a bit more to understand and get more familiar with the concepts... Purely from an initial usage point of view though, for me at least, the bzr output needed no explanation which I think is indicative of a good user interface whereas the git was not so clear or obvious - there must be room for improvement in git's user friendliness here surely. But that might just be because...
Nov 28, 6:34 pm 2006
Jakub Narebski Nov 28, 6:22 pm 2006
Martin Langhoff
Re: git and bzr
Well, there you start depending on everyone using bzr and providing metadata-added patches. Git is really good at dealing with scenarios where not everyone is using Git.. so the content-is-kind-and-metadata-be-damned pays off handsomely. And the "scenarios where not everyone is using Git" are everytime that we are tracking a project that uses a different SCM. For me, the "killer-app" of git is that, as it does not rely on magic metadata, it is perfectly useful on projects that I track that use CV...
Nov 28, 6:14 pm 2006
Nicholas Allen
Re: git and bzr
Of course not - I also added bzr mailing list back on this discussion too... I have to agree that's pretty cool! For the kind of development we do this is not really a big deal though as all developers can agree on using one RCS. But if you mix git and svn in this way then the changes can only go one way (from svn to git) can't they as svn is not so intelligent so this somewhat limits its usefulness doesn't it? I know bzr it has some beta level plugin support for SVN foreign branches (git, m...
Nov 28, 6:36 pm 2006
Martin Langhoff
Re: git and bzr
Well, if you look in the git toolset, you'll find things like git-svn which is geared to make it almost transparent to use git to work on a project where the upstream is using svn and push patches into SVN (if you have write access, naturally). And git-cvsexportcommit which is a lot less useful but helps me push series of patches from git into cvs Sounds roughly like git-svn ;-) converge, ye DSCMs martin -
Nov 28, 6:47 pm 2006
Martin Langhoff
Re: git and bzr
content-is-KING-and-metadata-be-damned :-) cheers, m -
Nov 28, 6:19 pm 2006
Eric Wong
[PATCH] git-svn: error out when the SVN connection fails dur...
finish_report does seem to return a useful value indicating success or failure, so we'll just set a flag when close_edit is called (it is not called on failures, nor is abort_edit) and check the flag before proceeding. Thanks to Pazu for pointing this out. Signed-off-by: Eric Wong <normalperson@yhbt.net> --- git-svn.perl | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 7942bba..c3ad5ec 100755 --- a/git-svn.perl +++ b/g...
Nov 28, 6:06 pm 2006
Eric Wong
Re: [PATCH] git-svn: error out when the SVN connection fails...
Also, this only affects the delta fetcher. When using the non-delta fetch: the SVN libraries will just segfault :) -- Eric Wong -
Nov 28, 6:24 pm 2006
Jakub Narebski
Re: git and bzr
Er? What about merge printed? $ git pull . branch Trying really trivial in-index merge... fatal: Merge requires file-level merging Nope. Merging HEAD with c59706ee42aa7b6b2b203d4219210a684f5581f2 Merging: 8f43c37 Moved hello.txt to hello_master.txt c59706e Moved hello.txt to hello_branch.txt found 1 common ancestor(s): b7d5f1a Initial commit CONFLICT (rename/rename): Rename hello.txt->hello_master.txt in branch HEAD rename hello.txt->hello_branch.txt in c5970...
Nov 28, 5:43 pm 2006
Junio C Hamano
[BUG] git shortlog: need a range!
I just got this: $ git shortlog --since=Oct.20 --until=Nov.20 master fatal: Need a range! Why isn't this a range? -
Nov 28, 4:20 pm 2006
rene.scharfe
[PATCH] shortlog: remove range check
Don't force the user to specify more than one revision parameter, thus making git-shortlog behave more like git-log. 'git-shortlog master' will now produce the expected results; the other end of the range simply is the (oldest) root commit. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> diff --git a/builtin-shortlog.c b/builtin-shortlog.c index b5b13de..f1124e2 100644 --- a/builtin-shortlog.c +++ b/builtin-shortlog.c @@ -298,9 +298,7 @@ int cmd_shortlog(int argc, const char **a...
Nov 28, 5:49 pm 2006
Junio C Hamano
Re: [PATCH] Add support for commit.signoff config option
I muttered something about commit templates which would make this is ugly; please use --bool and check only for 'true'. -
Nov 28, 4:17 pm 2006
Jakub Narebski
Re: git and bzr
Well, there are two cases where this might be not enough. On is following file renames for history tracking. git-blame does that, but git-log and friends does not; the <path> is just revision limiter. There is an idea of --follow option to git-log (and friends), to be implemented. Second is rename detection for 3way merges: only ancestor and final states are considered, so the above would not help. And rename detection might fail if ancestor is not similar enough to end states; well, the ...
Nov 28, 3:59 pm 2006
Junio C Hamano
Re: [PATCH] Trim hint printed when gecos is empty.
Johannes, Andy's interpretation is in line with the policy in SubmittingPatches. S-o-b is about warranty of provenance, and not about correctness or cheering (Acked-by). And I think it makes sense to add "-s" automatically to commits made in a private working repository in which the developer who configured "-s" to be added automatically is the only person who makes commits. As already mentioned in the thread, one of the hooks should be usable for that. And it certainly is a possibility to ad...
Nov 28, 2:29 pm 2006
Jakub Narebski
Re: git and bzr
Git supports renames/moves in different way. Instead of recording renames (which has trouble on it's own, for example rename via applying patch) There are trouble with file-ids. Most common example is trouble with file which was created in two branches (two repositories) independently, then branches got merged. Most (all?) file-id based rename detection has trouble with repeated merging of those branches, even if there are no true conflicts. Read Linus post about file-id based rename detectio...
Nov 28, 2:06 pm 2006
Nicholas Allen
Re: git and bzr
Having not used git I can't really say whether git is better than bzr or not in this regard. I know in the kind of development I do the case where a file with the same name has been added independantly in 2 different branches is a pretty rare one. Usually, when it has happened the files should have been 2 separate files with different names anyway - so bzr would have no problem with this. However, renaming a file is pretty common and I would rather be explicit about it and have file name changes ...
Nov 28, 4:37 pm 2006
Martin Langhoff
Re: git and bzr
Not so rare in a true DSCM scenario where people submit patches via email or a bug tracker. Say two developers apply the same patch to their trees, and one of them tweaks it a bit. While I don't personally do kernel development, I understand that's reasonably common in the linux dev team. It also happens quite a bit if you cherry pick across branches patches that create files. In such cases, I find GIT does the right thing 99% of the time, including spotting situations where the file got added...
Nov 28, 5:40 pm 2006
Nicholas Allen
Re: git and bzr
Ok - I got curious and decided to install git and try this myself. In this test I had a file hello.txt that got renamed to hello1.txt in one branch and hello2.txt in another. Then I merged the changes between the 2 branches. Here is how it looked after the merge in bzr: bzr status renamed: hello2.txt => hello1.txt conflicts: Path conflict: hello2.txt / hello1.txt pending merges: Nicholas Allen 2006-11-28 Renamed hello to hello1 and here's how it looked in git: git status ...
Nov 28, 5:26 pm 2006
Linus Torvalds
Re: git and bzr
Ehh. It told you exactly what happened when you actually did the merge, didn't it? Yeah, "git status" won't tell you _why_ it results in unmerged paths, but the merge will have told you. You must have seen that, but decided to just ignore it and not post it, because it didn't support the conclusion you wanted to get, did it? There are lots of reasons why "git status" may tell you that something isn't merged. The most common one by far being an actual data conflict, not a name confli...
Nov 28, 5:49 pm 2006
Nicholas Allen
Re: git and bzr
I didn't do this deliberately - it's just because merge spewed out a whole load of stuff at me that I didn't understand and therefore overlooked the conflict message in it. I wasn't expecting to see it here anyway and was hoping for a short and informative summary that I would understand when I did a status. Also what happens if I loose the messages because they scrolled off screen or the power goes down, I need to reboot for some reason, or I don't have time and want to shutdown my computer rest...
Nov 28, 6:00 pm 2006
Linus Torvalds
Re: git and bzr
I'd suggest just re-doing the merge. Something like git reset --hard git merge -m "dummy message" MERGE_HEAD will do it for you (that's the new "nicer syntax" for doing a merge, in No, it's actually there, but "git status" doesn't really explain it to you. The go-to command tends to be "git diff", which after a merge will not show anything that already merged correctly (because it will have been updated in the git index _and_ updated in the working tree, so there will be no dif...
Nov 28, 6:25 pm 2006
Nicholas Allen
Re: git and bzr
That sounds good. Better output on status would be nice ;-) Nick -
Nov 28, 6:46 pm 2006
Linus Torvalds
Re: git and bzr
Side note, to clarify: in the _simple_ cases it's all actually there. I can well imagine that in more complex cases, involving multiple different files, you may well want to re-do the merge and let the merge tell you why it refused to merge something. So the index, for example, contains just a "final end result" of what the merge gave up on, and while for a simple rename conflict like your example you could certainly see that directly from the index state (and thus we could, for exampl...
Nov 28, 6:41 pm 2006
Nicholas Allen
Re: git and bzr
I guess I hit a limitation in the output of status as opposed to a limitation in what git can do ;-) Nick -
Nov 28, 6:48 pm 2006
Shawn Pearce
Re: git and bzr
Except when you are doing a large merge, your terminal scrollback is really short, and there's a lot of conflicts. Then you can't see what merge said about any given file. :-( Fortunately its easy to back out of the merge and redo it with large enough scrollback, or redirecting it to a file for later review, but its annoying that we don't save that information off for later review. -- Shawn. -
Nov 28, 5:53 pm 2006
Linus Torvalds
Re: git and bzr
Heh. Which is partly why I just do "git diff", which usually tells me what is up, or "git log --stat --merge", which is usually even better. I've never actually had to scroll up. [ But I'll also admit that I used to have a "xterm*savedlines=5000" in my .Xdefaults, and it might be worth it for some people. I haven't actually needed it with git, because the _real_ reason for it used to be applying patch-sets, and I've made sure that the git patch-application is so robust that I ne...
Nov 28, 6:13 pm 2006
Nicholas Allen
Re: git and bzr
This can't be fail safe though. I would prefer to also have the option to be able to *explicitly* tell the RCS that a file was renamed and not have it try to detect from the content which is bound to have corner cases that fail. When I know I renamed a file why can't I explicitly tell the RCS and it records the change with the *file identifier*. If I change the content then the change is not recorded with the file identifier but with the line/content identifier. Nick -
Nov 28, 3:11 pm 2006
Andy Parkins
Re: git and bzr
You want to tell git about a rename that will never fail to be detected? No problem. $ git mv oldname newname $ git commit The corner cases you speak about are when you rename and edit. For me, I prefer that to be detected as at least the detection algorithm can be tuned - there is no fixing it if the VCS was forced to consider it a rename. When I started using git I was worried about the lack of a rename, but now I realise that it's not needed - it's pointless. The VCS is snapshott...
Nov 28, 3:40 pm 2006
Nicholas Allen
Re: git and bzr
Do you mean if the 2 files should be merged into 1 file? If they should be 2 files with different names there is no problem using file identifiers but if they should be merged into one file then I can see that this would cause problems. You would have to delete one of the files and copy its changes into the other which would create conflicts when that file is modified in the other branch. This is a problem if you *only* have file identifiers. But if you tracked both file identifiers *and* c...
Nov 28, 2:58 pm 2006
Jakub Narebski
Re: git and bzr
Well without the content based detection of contents copying and moving I think not. The first example: $ time git blame -C revision.c >/dev/null real 0m7.577s user 0m7.248s sys 0m0.020s while without content copying and moving detection we have $ time git blame revision.c >/dev/null real 0m2.108s user 0m2.044s sys 0m0.024s (on 2000 BogoMIPS CPU). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Nov 28, 1:29 pm 2006
Aaron Bentley
Re: git and bzr
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There's no question that determining content movement could involve opening a lot of revisions, but you wouldn't need to examine: 1. revisions that didn't alter any lines being examined 2. revisions that altered only the file in question 3. revisions with multiple parents, because any lines attributed to that merge will be the outcome of conflict resolution. (Other lines will be attributed to one of the parents) I'll admit though, that when I w...
Nov 28, 2:31 pm 2006
Jakub Narebski
Re: git and bzr
Dnia wtorek 28. listopada 2006 19:31, Aaron Bentley napisa
Nov 28, 2:43 pm 2006
Aaron Bentley
Re: git and bzr
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 $ time bzr annotate builtins.py > /dev/null real 0m1.479s user 0m1.430s sys 0m0.030s builtins.py has 953 ancestor revisions (i.e. revisions that modified it) and 3016 lines. That's on a machine with 4141.87 Bogomips. I did optimize annotate slightly, but I'm submitting the optimization for our 0.14.0 release. Aaron -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http:/...
Nov 28, 5:59 pm 2006
Jakub Narebski
Re: git and bzr
Hmmm... git-blame (without contents moving or rename detection) takes around 2s user+sys on 2002 BogoMIPS machine, as compared to 1.5s user+sys for bzr annotate on 4141.87 BogoMIPS machine. revision.c has 1208 lines, 62 unique commits in git-blame output, 90 commits history, 102 commits full history. -- Jakub Narebski Poland -
Nov 28, 6:16 pm 2006
Shawn O. Pearce
[PATCH 2/2] Fix broken bash completion of local refs.
Commit 35e65ecc broke completion of local refs, e.g. "git pull . fo<tab>" no longer would complete to "foo". Instead it printed out an internal git error ("fatal: Not a git repository: '.'"). The break occurred when I tried to improve performance by switching from git-peek-remote to git-for-each-ref. Apparently git-peek-remote will drop into directory "$1/.git" (where $1 is its first parameter) if it is given a repository with a working directory. This allowed the bash completion code to w...
Nov 28, 1:12 pm 2006
Shawn O. Pearce
[PATCH 1/2] Teach bash how to complete long options for git-...
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- It appears as though this patch was dropped, probably due to the fact that paint commonly dries faster than tab completion of --author= on the kernel.git repository runs. So this is a resubmit without the paint drying features. contrib/completion/git-completion.bash | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion....
Nov 28, 1:12 pm 2006
Jakub Narebski
Re: Workflow example for remote repository use of GIT
This conflicts a bit with later "Create a topic branch" statement. The statement should be I think twofold: "Never work out of tracking branches" (if you use separate remotes, git takes care of that for yourself), and for typical workflow "Always work out of master or merge changes into master". This of course deopends on the structure of your repo. For example, how many development branches are there. Git repository uses four development branches: 'maint' (maintenance, stable, bugfixes), 'mast...
Nov 28, 12:18 pm 2006
Shawn Pearce
Odd merge message in ad0c31?
Is this because of my bash completion breakage? commit ad0c31801b19d7614fac4c82fba67121b75bdea8 Merge: b3fccc6... 255cae8... Author: Junio C Hamano <junkio@cox.net> Date: Mon Nov 27 17:14:31 2006 -0800 Merge branch 'ap/clone-origin' of .git/ into next ^^^^^^^^ ^^^^^^^^ or were you just doing something weird at that time? -- Shawn. -
Nov 28, 11:46 am 2006
Jakub Narebski
Re: Show remote branches on gitweb
We could simplify things, and assume that remote name is _never_ hierarchical, so that remote branches names are: remotes/<remote>/<branch> where <remote> does not contain '/'. Additional problem is for "summary" view: should we limit number of heads per remote, should we sort heads inside remote, or should we also sort remotes, or should we sort remotes by time without grouping into repos? -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Nov 28, 11:14 am 2006
Sean Kelley
Workflow example for remote repository use of GIT
I have been trying to set-up a workflow for developers in my group using GIT. I came up with this simplified flow. Do you all see any problems with this approach? Thanks, Sean Always work out of master git checkout master Getting The Latest Upstream Code into master git pull origin master Create a topic branch for your development work git checkout -b <new topic branch name> Do your development in the topic branch edit/debug/test Committing Changes ...
Nov 28, 11:08 am 2006
Shawn Pearce
Re: Workflow example for remote repository use of GIT
That can be streamlined slightly: git fetch git checkout -b <new-topic> origin as fetch would by default download from remote 'origin' and update the tracking branches. And of course developers may not want to create their new branch from origin, e.g. if they are doing a bug fix to an earlier release of the product. I think its a good habit to be in to always specify the origination point for a branch when Yes, that works and will get you a merge message like Merge branch ...
Nov 28, 11:25 am 2006
Johannes Schindelin
Re: Workflow example for remote repository use of GIT
Hi, all in all, a good quick start. This gives the impression that the 2nd argument of pull specifies which _local_ branch stuff gets merged to. But it means that you pull into the _current_ branch from the _remote_ master. Ciao, Dscho -
Nov 28, 11:15 am 2006
previous daytodaynext day
November 27, 2006November 28, 2006November 29, 2006