[PATCH v9a 5/5] Speed up log -L... -M

2013-03-22 Thread Thomas Rast
So far log -L only used the implicit diff filtering by pathspec. If the user specifies -M, we cannot do that, and so we simply handed the whole diff queue (which is approximately 'git show --raw') to diffcore_std(). Unfortunately this is very slow. We can optimize a lot if we throw out files tha

[PATCH v9a 3/5] Implement line-history search (git log -L)

2013-03-22 Thread Thomas Rast
This is a rewrite of much of Bo's work, mainly in an effort to split it into smaller, easier to understand routines. The algorithm is built around the struct range_set, which encodes a series of line ranges as intervals [a,b). This is used in two contexts: * A set of lines we are tracking (which

[PATCH v9a 4/5] log -L: :pattern:file syntax to find by funcname

2013-03-22 Thread Thomas Rast
This new syntax finds a funcname matching /pattern/, and then takes from there up to (but not including) the next funcname. So you can say git log -L:main:main.c and it will dig up the main() function and show its line-log, provided there are no other funcnames matching 'main'. Signed-off-by:

[PATCH v9a 2/5] Export rewrite_parents() for 'log -L'

2013-03-22 Thread Thomas Rast
From: Bo Yang The function rewrite_one is used to rewrite a single parent of the current commit, and is used by rewrite_parents to rewrite all the parents. Decouple the dependence between them by making rewrite_one a callback function that is passed to rewrite_parents. Then export rewrite_parent

[PATCH v9a 1/5] Refactor parse_loc

2013-03-22 Thread Thomas Rast
From: Bo Yang We want to use the same style of -L n,m argument for 'git log -L' as for git-blame. Refactor the argument parsing of the range arguments from builtin/blame.c to the (new) file that will hold the 'git log -L' logic. To accommodate different data structures in blame and log -L, the

[PATCH v9a 0/5] git log -L

2013-03-22 Thread Thomas Rast
This is a small fix to an embarrassing problem with 4/5; as Junio noticed > Does not seem to pass its own test (t4211-line-log.sh). This resurrects two t/t4211/expect.* files that were missing from v9 due to a botched cleanup. Sorry for the noise. Bo Yang (2): Refactor parse_loc Export re

Re: feature request - have git honor nested .gitconfig files

2013-03-22 Thread Thomas Rast
Jeff King writes: > I'd rather not invent a new language. It will either not be featureful > enough, or will end up bloated. Or both. How about something like: > > [include] >exec = " > case \"$GIT_DIR\" in) >*/dev/*) cat ~/.config/git/dev-config ;; >

Re: [PATCH v9 3/5] Implement line-history search (git log -L)

2013-03-22 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> +void line_log_init(struct rev_info *rev, const char *prefix, struct >> string_list *args) >> +{ >> +struct commit *commit = NULL; >> +struct line_log_data *range; >> + >> +commit = check_single_commit(rev); >> +range = parse_line

Re: [PATCH v9 5/5] Speed up log -L... -M

2013-03-22 Thread Thomas Rast
Eric Sunshine writes: > On Thu, Mar 21, 2013 at 8:52 AM, Thomas Rast wrote: >> This is a bit hacky and should really be replaced by equivalent >> support in --follow, and just using that. However, in the meantime it > > s/using/use/ I'm not a native speaker, but I really think 'using' is more

Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right

2013-03-22 Thread David Aguilar
On Fri, Mar 22, 2013 at 9:52 AM, Christoph Anton Mitterer wrote: > Hi. > > Right now, when I use difftool --dir-diff, the temp dirs are creates as > e.g.: > /tmp/git-difftool.QqP8x/left > /tmp/git-difftool.QqP8x/right > > Wouldn't it be nice, if instead of left/right... the specified commit > name

Re: [regression?] trailing slash required in .gitattributes

2013-03-22 Thread Duy Nguyen
On Sat, Mar 23, 2013 at 11:18:24AM +0700, Duy Nguyen wrote: > You can use nwildmatch() from this patch. I tested it lightly with > t3070-wildmatch.sh, feeding the strings with no terminating NUL. It > seems to work ok. And valgrind spotted my faults, especially for using strchr. You would need thi

Re: [regression?] trailing slash required in .gitattributes

2013-03-22 Thread Duy Nguyen
On Fri, Mar 22, 2013 at 06:24:39PM -0400, Jeff King wrote: > I'm having trouble figuring out the right solution for this. Thanks for looking into this. It was on my todo list, but you beat me to it :) > But then here we'll end up feeding "foo/" to be compared with "foo", > which we don't want. Fo

Re: mailmap documentation add grave accents

2013-03-22 Thread 乙酸鋰
Any response for such a small fix? 2013/3/10 乙酸鋰 : > Hi, > Here is the patch. > > Regards, > ch3cooli -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] status, branch: fix the misleading "bisecting" message

2013-03-22 Thread Nguyễn Thái Ngọc Duy
The current message is "bisecting %s" (or "bisecting branch %s"). "%s" is the current branch when we started bisecting. Clarify that to avoid confusion with good and bad refs passed to "bisect" command. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/branch.c| 2 +- t/t6030-bisect-po

Re: [PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-22 Thread David Aguilar
On Fri, Mar 22, 2013 at 4:05 PM, John Keeping wrote: > On Fri, Mar 22, 2013 at 03:53:38PM -0700, Junio C Hamano wrote: >> John Keeping writes: >> >> > When 'git difftool --dir-diff' is using --no-symlinks (either explicitly >> > or implicitly because it's running on Windows), any working tree fil

Re: [PATCH v2 00/45] parse_pathspec and :(glob) magic

2013-03-22 Thread Duy Nguyen
On Sat, Mar 23, 2013 at 10:13 AM, Duy Nguyen wrote: > which also includes all document bugs reported so far. s/all/fixes for all/ -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.ker

Re: [PATCH v2 00/45] parse_pathspec and :(glob) magic

2013-03-22 Thread Duy Nguyen
On Thu, Mar 21, 2013 at 10:50:02AM -0700, Junio C Hamano wrote: > > Why could the test pass for you without it? It doesn't look like a > > bug that depended on uninitialized memory or something from the > > above observation. It depends on uninitialized memory. For absolute paths, prefix is usele

Re: [PATCH] merge/pull: verify GPG signatures of commits being merged

2013-03-22 Thread Junio C Hamano
Jonathan Nieder writes: >> git merge/pull: >> When --verify-signatures is specified on the command-line of git-merge >> or git-pull, check whether the commits being merged have good gpg >> signatures and abort the merge in case they do not. This allows e.g. >> auto-deployment from untrusted repo

Re: git branch: multiple --merged and --no-merged options?

2013-03-22 Thread Jed Brown
Jeff King writes: > On Fri, Mar 15, 2013 at 02:38:12PM -0500, Jed Brown wrote: >> $ git branch --no-merged master --merged next > > Yeah, sadly that does not work, as we use the same slot for the flag and > store only one of the two (and we also allow only one "--merged" head, > even though you

[PATCH v2 3/4] merge/pull Check for untrusted good GPG signatures

2013-03-22 Thread Sebastian Götte
When --verify-signatures is specified, abort the merge in case a good GPG signature from an untrusted key is encountered. Signed-off-by: Sebastian Götte --- builtin/merge.c| 2 ++ commit.c | 1 + commit.h | 4 ++-- gpg

[PATCH v2 4/4] pretty printing: extend %G? to include 'N' and 'U'

2013-03-22 Thread Sebastian Götte
Expand %G? in pretty format strings to 'N' in case of no GPG signature and 'U' in case of a good but untrusted GPG signature in addition to the previous 'G'ood and 'B'ad. This eases writing anyting parsing git-log output. Signed-off-by: Sebastian Götte --- Documentation/pretty-formats.txt | 3 ++

[PATCH v2 2/4] merge/pull: verify GPG signatures of commits being merged

2013-03-22 Thread Sebastian Götte
When --verify-signatures is specified on the command-line of git-merge or git-pull, check whether the commits being merged have good gpg signatures and abort the merge in case they do not. This allows e.g. auto-deployment from untrusted repo hosts. Signed-off-by: Sebastian Götte --- Documentatio

[PATCH v2 1/4] Move commit GPG signature verification to commit.c

2013-03-22 Thread Sebastian Götte
Signed-off-by: Sebastian Götte --- commit.c| 54 ++ commit.h| 9 gpg-interface.h | 6 ++ pretty.c| 67 + 4 files changed, 74 insertions(+), 62 deletions(-) d

[PATCH v2 0/4] Verify GPG signatures when merging and extend %G? pretty string

2013-03-22 Thread Sebastian Götte
As suggested by Junio I split the preivous patch into four parts. Sebastian Götte (4): Move commit GPG signature verification to commit.c merge/pull: verify GPG signatures of commits being merged merge/pull Check for untrusted good GPG signatures pretty printing: extend %G? to include 'N'

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Vadim Zeitlin
Johannes Sixt kdbg.org> writes: > > I also wonder if > > > > label : > > > > should also be caught, or is it too weird format to be worth > > supporting? > > It's easy to support, by inserting another [ \t] before the first colon. > So, why not? This is really nitpicking, but if we do i

Re: feature request - have git honor nested .gitconfig files

2013-03-22 Thread Jonathan Nieder
Jeff King wrote: > On Fri, Mar 22, 2013 at 11:22:11AM -0700, Jonathan Nieder wrote: >> It would be easier to understand >>the configuration if ~/.gitconfig could spell out the rule >>explicitly: [...] >>It sounds hard to do right, especially consider

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >>> - struct remote *remote = remote_get(repo); >>> + struct remote *remote = pushremote_get(repo); >> >> "struct remote" has url and pushurl fields. What do they mean in the >> context of these two accessors? /me is confused. >> >> Is the ide

Re: [PATCH] merge/pull: verify GPG signatures of commits being merged

2013-03-22 Thread Jonathan Nieder
Hi, Sebastian Götte wrote: > git merge/pull: > When --verify-signatures is specified on the command-line of git-merge > or git-pull, check whether the commits being merged have good gpg > signatures and abort the merge in case they do not. This allows e.g. > auto-deployment from untrusted repo ho

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Johannes Sixt
Am 22.03.2013 23:32, schrieb Junio C Hamano: > Johannes Sixt writes: > >> Am 22.03.2013 16:02, schrieb Junio C Hamano: >>> Vadim Zeitlin writes: >>> A C++ method start such as void foo::bar() wasn't recognized by cpp diff driver as it mistakenly incl

Re: [regression?] trailing slash required in .gitattributes

2013-03-22 Thread Junio C Hamano
Jeff King writes: > if (pathlen && pathname[pathlen-1] == '/') > pathlen--; > > would work. But it seems that match_basename, despite taking the length > of all of the strings we pass it, will happily use NUL-terminated > functions like strcmp or fnmatch. Converting the former to chec

Re: [PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-22 Thread John Keeping
On Fri, Mar 22, 2013 at 03:53:38PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > When 'git difftool --dir-diff' is using --no-symlinks (either explicitly > > or implicitly because it's running on Windows), any working tree files > > that have been copied to the temporary directory are

Re: [PATCH] merge/pull: verify GPG signatures of commits being merged

2013-03-22 Thread Junio C Hamano
Sebastian Götte writes: > git merge/pull: > When --verify-signatures is specified on the command-line of git-merge > or git-pull, check whether the commits being merged have good gpg > signatures and abort the merge in case they do not. This allows e.g. > auto-deployment from untrusted repo hosts

Re: [PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-22 Thread Junio C Hamano
John Keeping writes: > When 'git difftool --dir-diff' is using --no-symlinks (either explicitly > or implicitly because it's running on Windows), any working tree files > that have been copied to the temporary directory are copied back after > the difftool completes. This includes untracked file

Re: [PATCH 1/3] t7800: don't hide grep output

2013-03-22 Thread Junio C Hamano
Looks good from a cursory read. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: git merge heuristic

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 11:53:04AM -0700, Senthil Natarajan wrote: > I want to learn about how Git compares patches while doing a merge.  > For example, if a patch has been cherry-picked from branch A to branch > B, and then downstream we do a "git merge" from A to B, how does Git > know to skip t

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Junio C Hamano
Johannes Sixt writes: > Am 22.03.2013 16:02, schrieb Junio C Hamano: >> Vadim Zeitlin writes: >> >>> A C++ method start such as >>> >>> void >>> foo::bar() >>> >>> wasn't recognized by cpp diff driver as it mistakenly included "foo::bar" >>> as a >>> label. However the colon in

Re: [PATCH 1/3] t7800: don't hide grep output

2013-03-22 Thread Johannes Sixt
Am 22.03.2013 20:36, schrieb John Keeping: > Remove the stdin_contains and stdin_doesnt_contain helper functions > which add nothing but hide the output of grep, hurting debugging. Thanks. Patch looks good. -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body o

Re: [PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-22 Thread Johannes Sixt
Am 22.03.2013 20:36, schrieb John Keeping: > When 'git difftool --dir-diff' is using --no-symlinks (either explicitly > or implicitly because it's running on Windows), any working tree files > that have been copied to the temporary directory are copied back after > the difftool completes. This inc

Re: [regression?] trailing slash required in .gitattributes

2013-03-22 Thread Jeff King
On Tue, Mar 19, 2013 at 02:10:42PM -0400, Jeff King wrote: > > The issue bisects to 94bc671 (Add directory pattern matching to > > attributes, 2012-12-08). That commit actually tests not only that > > "subdir/" matches, but also that just "subdir" does not match. > [...] > So I think the regressio

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Junio C Hamano
Jonathan Nieder writes: >> --- a/builtin/push.c >> +++ b/builtin/push.c >> @@ -322,7 +322,7 @@ static int push_with_options(struct transport >> *transport, int flags) >> static int do_push(const char *repo, int flags) >> { >> int i, errs; >> -struct remote *remote = remote_get(repo);

[PATCH] merge/pull: verify GPG signatures of commits being merged

2013-03-22 Thread Sebastian Götte
git merge/pull: When --verify-signatures is specified on the command-line of git-merge or git-pull, check whether the commits being merged have good gpg signatures and abort the merge in case they do not. This allows e.g. auto-deployment from untrusted repo hosts. pretty printing: Tell about an "u

Re: [PATCH v2 06/45] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-03-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/Documentation/technical/api-setup.txt > b/Documentation/technical/api-setup.txt > index 4f63a04..59a947e 100644 > --- a/Documentation/technical/api-setup.txt > +++ b/Documentation/technical/api-setup.txt > @@ -8,6 +8,23 @@ Talk about > * is_inside_gi

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Johannes Sixt
Am 22.03.2013 16:02, schrieb Junio C Hamano: > Vadim Zeitlin writes: > >> A C++ method start such as >> >> void >> foo::bar() >> >> wasn't recognized by cpp diff driver as it mistakenly included "foo::bar" as >> a >> label. However the colon in a label can't be followed by anothe

Re: [PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 02:33:16PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > These three are all updated by the same tree_entry_extract() call, > > and whenever we use mode[12] we use path[12], so if it decides path1 > > is used or assigned, it should be able to tell mode1 is,

Re: [PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-22 Thread Junio C Hamano
Junio C Hamano writes: > These three are all updated by the same tree_entry_extract() call, > and whenever we use mode[12] we use path[12], so if it decides path1 > is used or assigned, it should be able to tell mode1 is, too. > > Unsatisfactory, it surely is... And immediately after I wrote the

Re: [PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-22 Thread Junio C Hamano
Jeff King writes: > Of the 8 patches, this is the one I find the least satisfying, if only > because I do not think gcc's failure is because of complicated control > flow, and rearranging the code would only hurt readability. And I'm > quite curious why it complains about "mode", but not about th

Re: Memory corruption when rebasing with git version 1.8.1.5 on arch

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 11:08:59AM -0700, Junio C Hamano wrote: > This may be sufficient. In the olden days, we relied on that all > whitespace fixing rules made the result shorter and took advantage > of it in update-pre-post-images to rewrite the images in place. The > oddball tab-in-indent (a

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-22 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: >This patch has no visible impact, but > serves to enable future patches to introduce configuration variables > to set pushremote_name. For example, you can now do the following in > handle_config(): > > if (!strcmp(key, "remote.pushdefa

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Jonathan Nieder
Junio C Hamano wrote: > I would prefer to see a preparatory patch to teach mk_test/mk_empty > to _always_ take the new name (i.e. the result of your patch) and > then do whatever new things on top. Yes, that sounds like a good way to go. > By the way, I am planning to _not_ look at new stuff tod

Re: [PATCH 7/4] submodule: clarify logic in show_submodule_summary

2013-03-22 Thread Junio C Hamano
Jeff King writes: > There are two uses of the "left" and "right" commit > variables that make it hard to be sure what values they > have (both for the reader, and for gcc, which wrongly > complains that they might be used uninitialized). > > The functions starts with a cascading if statement, che

Re: [PATCH v2] Fix revision walk for commits with the same dates

2013-03-22 Thread Kacper Kornet
On Fri, Mar 22, 2013 at 01:45:47PM -0700, Junio C Hamano wrote: > Kacper Kornet writes: > > Logic in still_interesting function allows to stop the commits > > traversing if the oldest processed commit is not older then the > > youngest commit on the list to process and the list contains only > >

[PATCH 3/3 v2] t7800: run --dir-diff tests with and without symlinks

2013-03-22 Thread John Keeping
Currently the difftool --dir-diff tests may or may not use symlinks depending on the operating system on which they are run. In one case this has caused a test failure to be noticed only on Windows when the test also fails on Linux when difftool is invoked with --no-symlinks. Rewrite these tests

Re: [PATCH v2] Fix revision walk for commits with the same dates

2013-03-22 Thread Junio C Hamano
Kacper Kornet writes: > Logic in still_interesting function allows to stop the commits > traversing if the oldest processed commit is not older then the > youngest commit on the list to process and the list contains only > commits marked as not interesting ones. It can be premature when dealing >

Re: [BUG?] rebase -i: edit versus unmerged changes

2013-03-22 Thread Junio C Hamano
Jonathan Nieder writes: > Ramkumar Ramachandra wrote: > >> I'd really to have that final 'git continue' in Git 2.0. Can someone >> attempt to break up the migration path into manageable logical steps >> that we can start working on? > > Is there any deadline or migration path needed? Depending

Git.pm with recent File::Temp fail

2013-03-22 Thread H.Merijn Brand
git-1.8.2, perl-5.16.3, File::Temp-0.23 Without patch: $ git svn fetch 'tempfile' can't be called as a method at /pro/lib/perl5/site_perl/5.16.3/Git.pm line 1117. After patch: $ git svn fetch M t/06virtual.t r15506 = 6c65be7ff36ffc6fd9b960a4b470ca297103004e (refs/remotes/git-svn)

[PATCH 3/3] t7800: run --dir-diff tests with and without symlinks

2013-03-22 Thread John Keeping
Currently the difftool --dir-diff tests may or may not use symlinks depending on the operating system on which they are run. In one case this has caused a test failure to be noticed only on Windows when the test also fails on Linux when difftool is invoked with --no-symlinks. Rewrite these tests

[PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-22 Thread John Keeping
When 'git difftool --dir-diff' is using --no-symlinks (either explicitly or implicitly because it's running on Windows), any working tree files that have been copied to the temporary directory are copied back after the difftool completes. This includes untracked files in the working tree. During

[PATCH 1/3] t7800: don't hide grep output

2013-03-22 Thread John Keeping
Remove the stdin_contains and stdin_doesnt_contain helper functions which add nothing but hide the output of grep, hurting debugging. Suggested-by: Johannes Sixt Signed-off-by: John Keeping --- t/t7800-difftool.sh | 44 +--- 1 file changed, 17 insertions(

[PATCH 0/3] Improve difftool --dir-diff tests

2013-03-22 Thread John Keeping
How about doing this? The first patch is a cleanup as suggested by Johannes[1], the second fixes the test failure on Windows and the third makes the test behaviour more explicit and would have helped to detect this issue earlier. [1/3] t7800: don't hide grep output [2/3] t7800: fix tests when

git merge heuristic

2013-03-22 Thread Senthil Natarajan
Hi all, I want to learn about how Git compares patches while doing a merge.  For example, if a patch has been cherry-picked from branch A to branch B, and then downstream we do a "git merge" from A to B, how does Git know to skip the cherry-picked patch?  It would have a different SHA-1, so wha

[PATCH v2] Fix revision walk for commits with the same dates

2013-03-22 Thread Kacper Kornet
Logic in still_interesting function allows to stop the commits traversing if the oldest processed commit is not older then the youngest commit on the list to process and the list contains only commits marked as not interesting ones. It can be premature when dealing with a set of coequal commits. Fo

Re: feature request - have git honor nested .gitconfig files

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 11:22:11AM -0700, Jonathan Nieder wrote: > * Maintaining configuration per repository to record a rather simple >is more complicated than ideal. It would be easier to understand >the configuration if ~/.gitconfig could spell out the rule >explicitly: > >

Re: [PATCH 2/6] t5516 (fetch-push): update test description

2013-03-22 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > --- a/t/t5516-fetch-push.sh > +++ b/t/t5516-fetch-push.sh > @@ -1,6 +1,6 @@ > #!/bin/sh > > -test_description='fetching and pushing, with or without wildcard' > +test_description='fetching and pushing' The description before and after are equally useless. You mig

Re: [PATCH 1/6] remote.c: simplify a bit of code using git_config_string()

2013-03-22 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > A small segment where handle_config() parses the branch.remote > configuration variable can be simplified using git_config_string(). Looks correct. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org

Re: [BUG?] rebase -i: edit versus unmerged changes

2013-03-22 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > I'd really to have that final 'git continue' in Git 2.0. Can someone > attempt to break up the migration path into manageable logical steps > that we can start working on? Is there any deadline or migration path needed? Depending on the design, it might be possible

Re: feature request - have git honor nested .gitconfig files

2013-03-22 Thread Jonathan Nieder
Hi Josh, Josh Sharpe wrote: > For example, I have my ~/.gitconfig that has one email address in it, > but I also have multiple repos inside ~/dev which I want to use a > different email address for. The only way to do that now is to edit > all of these: ~/dev/*/.git/conf -- and there are lots of

Re: Memory corruption when rebasing with git version 1.8.1.5 on arch

2013-03-22 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> and so on. I haven't quite figured out what is going on. It looks like >> we call update_pre_post_images with postlen==0, which causes it to just >> write the fixed postimage into the existing buffer. But of course the >> fixed version is bigger, b

Re: git branch: multiple --merged and --no-merged options?

2013-03-22 Thread Jeff King
On Fri, Mar 15, 2013 at 02:38:12PM -0500, Jed Brown wrote: > I find myself frequently running commands like this > > $ comm -12 <(git branch --no-merged master) <(git branch --merged next) That's a reasonable thing to want to do. > when checking for graduation candidates. Of course I first tr

Re: Tag peeling peculiarities

2013-03-22 Thread Jeff King
[this email is from last week, and I think most of was responded to in other parts of the thread, but there were a few loose ends] On Sat, Mar 16, 2013 at 02:38:12PM +0100, Michael Haggerty wrote: > >> * Change pack-refs to use the peeled information from ref_entries if it > >> is available, r

Re: [PATCH 6/6] remote.c: introduce branch..pushremote

2013-03-22 Thread Junio C Hamano
Ramkumar Ramachandra writes: > This new configuration variable overrides `remote.pushdefault` and > `branch..remote` for pushes. In a typical triangular-workflow > setup, you would want to set `remote.pushdefault` to specify the > remote to push to for all branches, and use this option to overri

Re: Bug: git web--browse doesn't recognise browser on OS X

2013-03-22 Thread John Szakmeister
On Fri, Mar 22, 2013 at 12:19 PM, Timo Sand wrote: > Hi, > > well my use case is actually that I'm trying to use the gem > 'gem-browse' which uses 'git web--browse' > I'm not using Apple Terminal, I'm using iTerm2 and there doesn't seem > to be a SECURITYSESSIONID set, at least echo didn't find an

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Vadim Zeitlin
Junio C Hamano pobox.com> writes: > > Vadim Zeitlin zeitlins.org> writes: ... > > diff --git a/userdiff.c b/userdiff.c > > index ea43a03..9415586 100644 > > --- a/userdiff.c > > +++ b/userdiff.c > > @@ -125,7 +125,7 @@ PATTERNS("tex", > > "^(((sub)*section|chapter|part)\\*{0,1}\\{.*)$", >

Re: [PATCH 3/3] git-pull.sh: introduce --[no-]autostash and pull.autostash

2013-03-22 Thread Junio C Hamano
Ramkumar Ramachandra writes: > @@ -1786,6 +1786,11 @@ pull.rebase:: > of merging the default branch from the default remote when "git > pull" is run. See "branch..rebase" for setting this on a > per-branch basis. > + > +pull.autostash:: > + When true, automatically stash all

[FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right

2013-03-22 Thread Christoph Anton Mitterer
Hi. Right now, when I use difftool --dir-diff, the temp dirs are creates as e.g.: /tmp/git-difftool.QqP8x/left /tmp/git-difftool.QqP8x/right Wouldn't it be nice, if instead of left/right... the specified commit name would be used? e.g. /tmp/git-difftool.QqP8x/r1.1.1 /tmp/git-difftool.QqP8x/HEAD

Re: [PATCH 2/3] t5521 (pull-options): use test_commit() where appropriate

2013-03-22 Thread Junio C Hamano
Ramkumar Ramachandra writes: > test_commit() is a well-defined function in test-lib-functions.sh that > allows you to create commits with a terse syntax. Prefer using it > over creating commits by hand. > > Signed-off-by: Ramkumar Ramachandra > --- > t/t5521-pull-options.sh | 4 ++-- > 1 file

feature request - have git honor nested .gitconfig files

2013-03-22 Thread Josh Sharpe
It'd be cool if I were able to override config settings at every nested directory. For example, I have my ~/.gitconfig that has one email address in it, but I also have multiple repos inside ~/dev which I want to use a different email address for. The only way to do that now is to edit all of the

[PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-22 Thread Jeff King
These nonsense assignments are meant to squelch gcc warnings that the variables might be used uninitialized. However, gcc gets it mostly right, realizing that we will either extract tree entries from both sides, or we will hit a "continue" statement and go to the top of the loop. However, while ge

[PATCH 7/4] submodule: clarify logic in show_submodule_summary

2013-03-22 Thread Jeff King
There are two uses of the "left" and "right" commit variables that make it hard to be sure what values they have (both for the reader, and for gcc, which wrongly complains that they might be used uninitialized). The functions starts with a cascading if statement, checking that the input sha1s exis

Re: Bug: git web--browse doesn't recognise browser on OS X

2013-03-22 Thread Timo Sand
Hi, well my use case is actually that I'm trying to use the gem 'gem-browse' which uses 'git web--browse' I'm not using Apple Terminal, I'm using iTerm2 and there doesn't seem to be a SECURITYSESSIONID set, at least echo didn't find any. But neither did I find it on Apple Terminal either. What tr

Re: [PATCH 0/4] drop some "int x = x" hacks to silence gcc warnings

2013-03-22 Thread Jeff King
On Thu, Mar 21, 2013 at 11:44:02AM -0400, Jeff King wrote: > > I am for dropping "= x" and leaving it uninitialized at the > > declaration site, or explicitly initializing it to some > > reasonable starting value (e.g. NULL if it is a pointer) and > > adding a comment to say that t

Re: [PATCH 1/4] wt-status: fix possible use of uninitialized variable

2013-03-22 Thread Jeff King
On Thu, Mar 21, 2013 at 12:49:50PM -0700, Jonathan Nieder wrote: > > We could also convert the flag to an enum, which would > > provide a compile-time check on the function input. > > Unfortunately C permits out-of-bounds values for enums. True, although I would think that most compilers take th

Re: git merge behavior

2013-03-22 Thread Junio C Hamano
Yann Droneaud writes: > Thanks. I wasn't aware of the --no-ff-only option and > thought --no-ff would be the opposite of --ff-only, > or at least disable it given the order of the options. > > Please find a patch to document option --no-ff-only > > Documentation/merge-options.txt | 4 > 1

Re: [PATCH v2 0/6] Support triangular workflows

2013-03-22 Thread Junio C Hamano
"Philip Oakley" writes: > Shouldn't Documentation/gitworkflows.txt also be updated with the > triangular workflow and its configuration? What is missing from gitworkflows documentation is actually a non-triangular workflow, where people pull from and push into the same central repository. The "

Re: [PATCH] t7600: merge tag shoud create a merge commit

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 03:56:15PM +0100, Yann Droneaud wrote: > Le 22.03.2013 15:48, Junio C Hamano a écrit : > >> > >>It's not in final shape: the line > >> > >>EDITOR=false test_must_fail git merge signed > > > >Because test_must_fail is a shell function, single-shot environment > >assignme

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Junio C Hamano
Vadim Zeitlin writes: > A C++ method start such as > > void > foo::bar() > > wasn't recognized by cpp diff driver as it mistakenly included "foo::bar" as a > label. However the colon in a label can't be followed by another colon, so > recognize this case specially to correctly det

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 07:52:47AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I think this is OK, and I do not mind if it gets applied. But what I was > > hinting at in my earlier mail was that we might want to do this (I have > > it as a separate patch on top of your 3/6 here, but i

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 07:54:06AM -0700, Junio C Hamano wrote: > Ramkumar Ramachandra writes: > > > mk_empty () { > > - rm -fr testrepo && > > - mkdir testrepo && > > + repo_name="$1" > > + test -z "$repo_name" && repo_name=testrepo > > + rm -fr $repo_name && > > + mkdir $repo_name

Re: [PATCH 5/6] remote.c: introduce remote.pushdefault

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 01:22:35PM +0530, Ramkumar Ramachandra wrote: > diff --git a/remote.c b/remote.c > index 185ac11..bdb542c 100644 > --- a/remote.c > +++ b/remote.c > @@ -350,6 +350,11 @@ static int handle_config(const char *key, const char > *value, void *cb) > const char *subkey; >

Re: [PATCH] t7600: merge tag shoud create a merge commit

2013-03-22 Thread Yann Droneaud
Le 22.03.2013 15:48, Junio C Hamano a écrit : It's not in final shape: the line EDITOR=false test_must_fail git merge signed Because test_must_fail is a shell function, single-shot environment assignment like this should not be used. It's used throughout the test. The test 'merge --no-e

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Junio C Hamano
Ramkumar Ramachandra writes: > mk_empty () { > - rm -fr testrepo && > - mkdir testrepo && > + repo_name="$1" > + test -z "$repo_name" && repo_name=testrepo > + rm -fr $repo_name && > + mkdir $repo_name && Your quoting is sloppy in this entire patch X-<. -- To unsubscr

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Junio C Hamano
Jeff King writes: > I think this is OK, and I do not mind if it gets applied. But what I was > hinting at in my earlier mail was that we might want to do this (I have > it as a separate patch on top of your 3/6 here, but it would make more > sense squashed in): I would prefer to see a preparator

Re: [PATCH] t7600: merge tag shoud create a merge commit

2013-03-22 Thread Junio C Hamano
y...@quest-ce.net writes: > From: Yann Droneaud > > This test ensures a merge commit is always created > when merging an annotated (signed) tag without --ff-only option. > > Signed-off-by: Yann Droneaud > --- > > Here's a proposition for a test tath check the creation of a merge commit > when me

Re: [PATCH] t7600: test merge configuration override

2013-03-22 Thread Junio C Hamano
Yann Droneaud writes: > +test_expect_success 'merges with merge.ff=only and --no-ff-only' ' > + git reset --hard c1 && > + test_tick && > + test_when_finished "git config --unset merge.ff" && > + git config merge.ff only && I see this was copied from existing tests, but we should

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-22 Thread Jeff King
On Fri, Mar 22, 2013 at 01:22:33PM +0530, Ramkumar Ramachandra wrote: > mk_test() creates a repository with the constant name "testrepo", and > this may be limiting for tests that need to create more than one > repository for testing. To fix this, create a new mk_test_with_name() > which accepts

[PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-22 Thread Vadim Zeitlin
A C++ method start such as void foo::bar() wasn't recognized by cpp diff driver as it mistakenly included "foo::bar" as a label. However the colon in a label can't be followed by another colon, so recognize this case specially to correctly detect C++ methods using this style. Sig

[PATCH 1/2] t5520 (pull): update test description

2013-03-22 Thread Ramkumar Ramachandra
d09e79c (git-pull: allow pulling into an empty repository, 2006-11-16) created the file with the description. At the time, there were only tests to check pulling into an empty repository. The description was never updated even after more tests, unrelated to the original, were added. Fix this now

[PATCH 0/2] Fix a couple of minor things in pull test

2013-03-22 Thread Ramkumar Ramachandra
I just happened to open the file when searching for the right file to put my autostash tests. Ramkumar Ramachandra (2): t5520 (pull): update test description t5520 (pull): use test_config where appropriate t/t5520-pull.sh | 24 ++-- 1 file changed, 10 insertions(+), 14 de

[PATCH 2/2] t5520 (pull): use test_config where appropriate

2013-03-22 Thread Ramkumar Ramachandra
Configuration from test_config does not last beyond the end of the current test assertion, making each test easier to think about in isolation. Signed-off-by: Ramkumar Ramachandra --- t/t5520-pull.sh | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/t/t5

[PATCH 3/3] git-pull.sh: introduce --[no-]autostash and pull.autostash

2013-03-22 Thread Ramkumar Ramachandra
This new configuration variable executes 'git stash' before attempting to merge/rebase, and 'git stash pop' after a successful merge/rebase. It makes it convenient for people to pull with dirty worktrees. Signed-off-by: Ramkumar Ramachandra --- Documentation/config.txt | 5 Documentation

[PATCH 2/3] t5521 (pull-options): use test_commit() where appropriate

2013-03-22 Thread Ramkumar Ramachandra
test_commit() is a well-defined function in test-lib-functions.sh that allows you to create commits with a terse syntax. Prefer using it over creating commits by hand. Signed-off-by: Ramkumar Ramachandra --- t/t5521-pull-options.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

  1   2   >