Re: What's cooking in git.git (Mar 2013, #07; Tue, 26)

2013-03-28 Thread Thomas Rast
Junio C Hamano gits...@pobox.com writes: * tr/line-log (2013-03-23) 6 commits - Speed up log -L... -M - log -L: :pattern:file syntax to find by funcname - Implement line-history search (git log -L) - Export rewrite_parents() for 'log -L' - fixup - Refactor parse_loc Rerolled;

[PATCH v2] Avoid loading commits twice in log with diffs

2013-03-28 Thread Thomas Rast
If you run a log with diffs (such as -p, --raw, --stat etc.) the current code ends up loading many objects twice. For example, for 'log -3000 -p' my instrumentation said the objects loaded more than once are distributed as follows: 2008 blob 2103 commit 2678 tree Fixing blobs and trees

Re: [PATCH] git help config: s/insn/instruction/

2013-03-28 Thread Matthias Krüger
On 03/28/2013 06:59 AM, Junio C Hamano wrote: Matthias Krüger matthias.krue...@famsik.de writes: insn appears to be an in-code abbreviation and should not appear in manual/help pages. --- Thanks; sign-off? Oops, sorry. Signed-off-by: Matthias Krüger matthias.krue...@famsik.de (Is this

Re: Composing git repositories

2013-03-28 Thread Ramkumar Ramachandra
Jens Lehmann wrote: Unless you acknowledge that submodules are a different repo, you'll always run into problems. I believe future enhancements will make this less tedious, but in the end they will stay separate repos (which is the whole point, you'd want to use a different approach - e.g.

Re: [PATCH] merge-tree: fix same file added in subdir

2013-03-28 Thread John Keeping
On Wed, Mar 27, 2013 at 10:57:39PM +, John Keeping wrote: On Wed, Mar 27, 2013 at 03:42:40PM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: When the same file is added with identical content at the top level, git-merge-tree prints added in both with the

Re: Composing git repositories

2013-03-28 Thread Ramkumar Ramachandra
Jonathan Nieder wrote: Do you mean that you wish you could ignore subrepository boundaries and use commands like git clone --recurse-submodules http://git.zx2c4.com/cgit cd cgit vi git/cache.h ... edit edit edit ... git add --recurse-submodules

Collective wisdom about repos on NFS accessed by concurrent clients (== corruption!?)

2013-03-28 Thread Kenneth Ölwing
Hi, I'm hoping to hear some wisdom on the subject so I can decide if I'm chasing a pipe dream or if it should be expected to work and I just need to work out the kinks. Finding things like this makes it sound possible: http://permalink.gmane.org/gmane.comp.version-control.git/122670 but

Re: Composing git repositories

2013-03-28 Thread Ramkumar Ramachandra
Junio C Hamano wrote: As I said in another thread, your top-level may be only a part in somebody else's project, and what you consider just a part of your project may be the whole project to somebody else. If you pick one location to store both for the above clone, e.g. cgit/.git (it could

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

2013-03-28 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 artag...@gmail.com --- Removed first hunk, as per Junio's comment. t/t5520-pull.sh | 18 +++--- 1 file

[PATCH v2] git-send-email.perl: implement suggestions made by perlcritic

2013-03-28 Thread Ramkumar Ramachandra
Running perlcritic with gentle severity reports six problems. The following lists the line numbers on which the problems occur, along with a description of the problem. This patch fixes them all, after carefully considering the consequences. 516: Contrary to common belief, subroutine prototypes

Re: [PATCH] use refnames instead of left/right in dirdiffs

2013-03-28 Thread Christoph Anton Mitterer
Hi John. On Wed, 2013-03-27 at 23:07 +, John Keeping wrote: That's not going to work well on Windows, is it? Uhm Winwhat? No seriously... doesn't dir-diff fail ther anway? The mkdir right now also uses mkpath with /... and I could read in it's documentation that it would automatically

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

2013-03-28 Thread Ramkumar Ramachandra
Jeff King wrote: Subject: [PATCH] t5516: drop implicit arguments from helper functions Thanks a lot for this! I just had to s/ $repo_name/ $repo_name/ to fix the quoting. Will post a re-roll soon. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Bug in git rev-parse --verify

2013-03-28 Thread Michael Haggerty
On Junio's master, git rev-parse --verify accepts *any* 40-digit hexadecimal number. For example, pass it 40 1 characters, and it accepts the argument: $ git rev-parse --verify $ echo $? 0 Obviously, my repo

[PATCH v4 0/6] Support triangular workflows

2013-03-28 Thread Ramkumar Ramachandra
Hi, The changes in this round are: 1. Peff submitted a patch to squash into [3/6]. Since his patch essentially reverts mine, I've blamed him for the change. 2. Peff suggested a code movement in [5/6] to make things flow more naturally. 3. Jonathan suggested a better test description in

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

2013-03-28 Thread Ramkumar Ramachandra
A small segment where handle_config() parses the branch.remote configuration variable can be simplified using git_config_string(). Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- remote.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/remote.c b/remote.c

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

2013-03-28 Thread Ramkumar Ramachandra
The file was originally created in bcdb34f (Test wildcard push/fetch, 2007-06-08), and only contained tests that exercised wildcard functionality at the time. In subsequent commits, many other tests unrelated to wildcards were added but the test description was never updated. Fix this.

[PATCH 3/6] t5516 (fetch-push): drop implicit arguments from helper functions

2013-03-28 Thread Ramkumar Ramachandra
From: Jeff King p...@peff.net Many of the tests in t5516 look like: mk_empty git push testrepo ... check_push_result $commit heads/master It's reasonably easy to see what is being tested, with the exception that testrepo is a magic global name (it is implicitly used in the helpers, but

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

2013-03-28 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string

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

2013-03-28 Thread Ramkumar Ramachandra
This new configuration variable defines the default remote to push to, and overrides `branch.name.remote` for all branches. It is useful in the typical triangular-workflow setup, where the remote you're fetching from is different from the remote you're pushing to. Signed-off-by: Ramkumar

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

2013-03-28 Thread Ramkumar Ramachandra
This new configuration variable overrides `remote.pushdefault` and `branch.name.remote` for pushes. When you pull from one place (e.g. your upstream) and push to another place (e.g. your own publishing repository), you would want to set `remote.pushdefault` to specify the remote to push to for

Re: git subtree oddity

2013-03-28 Thread Stephen Smith
I built v1.8.2 last evening and found that the subtree command isn't supported. What version of git are you using? And where did you get it? SPS Sent from my iPhone On Mar 27, 2013, at 8:12 PM, Thomas Taranowski t...@baringforge.com wrote: I'd like to have the following configuration:

Re: propagating repo corruption across clone

2013-03-28 Thread Jeff Mitchell
On Tue, Mar 26, 2013 at 11:47 PM, Junio C Hamano gits...@pobox.com wrote: The difference between --mirror and no --mirror is a red herring. You may want to ask Jeff Mitchell to remove the mention of it; it only adds to the confusion without helping users. If you made byte-for-byte copy of

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

2013-03-28 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: The changes in this round are: 1. Peff submitted a patch to squash into [3/6]. Since his patch essentially reverts mine, I've blamed him for the change. 2. Peff suggested a code movement in [5/6] to make things flow more naturally.

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

2013-03-28 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ramkumar Ramachandra artag...@gmail.com writes: 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 artag...@gmail.com

Re: Git and GSoC 2013

2013-03-28 Thread Ramkumar Ramachandra
Jeff King wrote: There was a big thread about a month ago on whether Git should do Google Summer of Code this year[1]. Take only one or two students and get the entire community involved in learning from the GSoC experience, so we can do a bigger one next year. -- To unsubscribe from this list:

Re: [PATCH] gitk: Move hard-coded colors to .gitk

2013-03-28 Thread Ramkumar Ramachandra
Gauthier Östervall wrote: Screenshot of my current coloring setup using this patch, based on zenburn: http://s11.postimg.org/hozbtsfj7/gitk_zenburn.png And the .gitk used to that end: https://gist.github.com/fleutot/5253281 This is a really cool color theme. Would we consider shipping some

Re: Bug in git rev-parse --verify

2013-03-28 Thread Michael Haggerty
On 03/28/2013 02:48 PM, Junio C Hamano wrote: I think it has always been about is this well formed and we can turn it into a raw 20-byte object name? and never aboutdoes it exist? That's surprising. The man page says --verify The parameter given must be usable as a single, valid

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

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:56:36PM +0530, Ramkumar Ramachandra wrote: Jeff King (1): t5516 (fetch-push): drop implicit arguments from helper functions Ramkumar Ramachandra (5): remote.c: simplify a bit of code using git_config_string() t5516 (fetch-push): update test description

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: ... The test that checked that pushInsteadOf + pushurl shouldn't work as I expect was actually broken; I have removed it, updated the documentation, and sent a new patch to the list.

Re: [PATCH] git help config: s/insn/instruction/

2013-03-28 Thread Junio C Hamano
Matthias Krüger matthias.krue...@famsik.de writes: On 03/28/2013 06:59 AM, Junio C Hamano wrote: Matthias Krüger matthias.krue...@famsik.de writes: insn appears to be an in-code abbreviation and should not appear in manual/help pages. --- Thanks; sign-off? Oops, sorry. Signed-off-by:

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 08:37:58AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: ... The test that checked that pushInsteadOf + pushurl shouldn't work as I expect was actually broken; I have removed

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: OK, I take it back. I *can* imagine configurations that this change would break, since it does change intentional and documented behavior, but I don't have any such configuration. The only such configuration I can imagine involves directly

Re: which files will have conflicts between two branches?

2013-03-28 Thread Magnus Bäck
On Wednesday, March 27, 2013 at 17:48 EDT, J.V. jvsr...@gmail.com wrote: I have two local branches (tracked to remote) that are in sync (did a git pull on both branches from their corresponding remote). Is this the best way to merge? I would be merging local/branch1 = local/branch2

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread Josh Triplett
On Wed, Mar 27, 2013 at 11:02:28PM -0700, Junio C Hamano wrote: John Koleszar jkoles...@google.com writes: Filter the list of refs returned via the dumb HTTP protocol according to the active namespace, consistent with other clients of the upload-pack service. Signed-off-by: John

Re: git subtree oddity

2013-03-28 Thread Jeremy Rosen
I am starting to regret that I caved in and started carrying a copy of it in contrib/. It probably is a good idea to drop it from my tree and let it mature and eventually flourish outside. that's a shame... it solves a real problem, is simple to use, and really powerfull. but

Re: Bug in git rev-parse --verify

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 04:52:15PM +0100, Michael Haggerty wrote: On 03/28/2013 04:38 PM, Jeff King wrote: On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: Is there a simple way to verify an object name more strictly and convert it to an SHA1? I can only think of

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 09:10:59AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: OK, I take it back. I *can* imagine configurations that this change would break, since it does change intentional and documented behavior, but I don't have any such configuration.

Re: Git and GSoC 2013

2013-03-28 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: On Wed, Mar 27, 2013 at 7:52 PM, Jonathan Nieder jrnie...@gmail.com wrote: Jeff King wrote: There was a big thread about a month ago on whether Git should do Google Summer of Code this year[1]. I think we should do it. It looks strange

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread Junio C Hamano
John Koleszar jkoles...@google.com writes: Facepalm. The intent here is to invert the grep, to make sure that the /ns/ does not appear in the output. No idea why I wrote it that way. Will fix. OK, ! grep /ns/ exp would do. Thanks. -- To unsubscribe from this list: send the line unsubscribe

[PATCH v10 0/5] git log -L

2013-03-28 Thread Thomas Rast
From: Thomas Rast tr...@inf.ethz.ch This adds a bunch of fixes and failing tests for invalid -L arguments; as Antoine discovered, some variations would segfault v9. I also changed the beginning of parse_range_funcname (in patch 4/5), which now also lets you backslash-escape a : in a funcname

[PATCH v10 1/5] Refactor parse_loc

2013-03-28 Thread Thomas Rast
From: Bo Yang struggleyb@gmail.com 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

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

2013-03-28 Thread Thomas Rast
From: Bo Yang struggleyb@gmail.com 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.

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

2013-03-28 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'.

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

2013-03-28 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

Re: Bug in git rev-parse --verify

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: Is there a simple way to verify an object name more strictly and convert it to an SHA1? I can only think of solutions that require two commands, like git cat-file -e $ARG git rev-parse

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

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: Sometimes it's annoyingly verbose to break down a compound function. But I think in this case, you can make your tests more robust by just checking the affirmative that the ref is still where we expect it to be, like: check_push_result up_repo

Re: Git and GSoC 2013

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 09:45:02AM -0700, Junio C Hamano wrote: It is preferrable if the decision were accompanied with a concrete plan for us to prepare our mentoring capability better (if we want to participate in future GSoC, that is), but I think it is a separate issue, and I suspect that

Re: Composing git repositories

2013-03-28 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: Do you realize how difficult this is to implement? We'll need to patch all the git commands to essentially do what we'd get for free if the submodule were a tree object instead of a commit object (although I'm not saying that's the Right thing to do). What are

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Wed, Mar 27, 2013 at 12:29:57PM +0900, Yi, EungJun wrote: Currently, if user tried to access a git repository via HTTP and it fails because the user's permission is not enough to access the repository, git client tells that http request failed and the error was 403 forbidden. The

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jonathan Nieder
Jeff King wrote: One problem is that the content body sent along with the error is not necessarily appropriate for showing to the user (e.g., if it is HTML, it is probably not a good idea to show it on the terminal). So I think we would want to only show it when the server has indicated via

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 11:41:20AM -0700, Jonathan Nieder wrote: Jeff King wrote: One problem is that the content body sent along with the error is not necessarily appropriate for showing to the user (e.g., if it is HTML, it is probably not a good idea to show it on the terminal). So I

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: (on url.$base.pushInsteadOf) If a remote has an explicit pushurl, git will ignore this setting for that remote. That really meant what I just said above: git will prefer an explicit pushurl over the pushInsteadOf rewrite of url. Very correct. It

Re: [PATCH 1/2] fast-import: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Ramsay Jones
Jeff King wrote: On Tue, Mar 26, 2013 at 07:09:44PM +, Ramsay Jones wrote: Commit cbfd5e1c (drop some obsolete x = x compiler warning hacks, 21-03-2013) removed a gcc hack that suppressed an might be used uninitialized warning issued by older versions of gcc. However, commit 3aa99df8

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Ramsay Jones
Jeff King wrote: On Tue, Mar 26, 2013 at 07:20:11PM +, Ramsay Jones wrote: After commit cbfd5e1c (drop some obsolete x = x compiler warning hacks, 21-03-2013) removed a gcc specific hack, older versions of gcc now issue an 'contents' might be used uninitialized warning. In order to

Re: [PATCH 1/2] fast-import: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:20:29PM +, Ramsay Jones wrote: Jeff King wrote: On Tue, Mar 26, 2013 at 07:09:44PM +, Ramsay Jones wrote: Commit cbfd5e1c (drop some obsolete x = x compiler warning hacks, 21-03-2013) removed a gcc hack that suppressed an might be used uninitialized

Re: [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic

2013-03-28 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: Junio: In future, please tell me explicitly that you're expecting a re-roll with an updated commit message. It wasn't obvious to me at all. When there are questions in response to a patch, there are two possibilities: * temporary brainfart --- sorry for the

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:48:43PM +, Ramsay Jones wrote: I'm OK with this, if it's the direction we want to go. But I thought the discussion kind of ended as we do not care about these warnings on ancient versions of gcc; those people should use -Wno-error=uninitialized. Hmm, I

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 11:50:08AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: (on url.$base.pushInsteadOf) If a remote has an explicit pushurl, git will ignore this setting for that remote. That really meant what I just said above: git will prefer an explicit

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: One problem is that the content body sent along with the error is not necessarily appropriate for showing to the user (e.g., if it is HTML, it is probably not a good idea to show it on the terminal). So I think we would want to only show it when the server has

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Jonathan Nieder
Josh Triplett wrote: Related to this, as a path forward, I do think it makes sense to have a setting usable as an insteadOf that only applies to pushurl, even though pushInsteadOf won't end up serving that purpose. That way, pushInsteadOf covers the map read-only repo url to pushable repo

Re: git subtree oddity

2013-03-28 Thread Thomas Taranowski
I agree that subtree solves some specific use cases I would like to support. In particular, I was hoping to use the subtree command in lieu of using the subtree merge strategy to manage and overlay changes to upstream projects, as well as other local components. At any rate, it looks like the

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jonathan Nieder
Jeff King wrote: When we can make the code more readable _and_ help the compiler, I think it is a no-brainer. Yep. :) -- 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

Re: git subtree oddity

2013-03-28 Thread Thomas Taranowski
Oh, this is odd. I can get the behavior I want by adding the '-f' flag to the remote add. So: git remote add -f upstream git://gnuradio.org/gnuradio According to the remote add help, the -f is only doing a fetch, which I was doing as a manual step after the remote add. Another interesting

Re: [PATCH 3/4] attr.c::path_matches(): special case paths that end with a slash

2013-03-28 Thread Jeff King
On Tue, Mar 26, 2013 at 03:05:58PM -0400, Jeff King wrote: On Tue, Mar 26, 2013 at 11:39:30AM -0700, Junio C Hamano wrote: A similar adjustment for match_pathname() might be needed, but I didn't look into it. [...] We do seem to use strncmp_icase through the rest of the function,

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 11:01, schrieb Ramkumar Ramachandra: Jonathan Nieder wrote: Do you mean that you wish you could ignore subrepository boundaries and use commands like git clone --recurse-submodules http://git.zx2c4.com/cgit cd cgit vi git/cache.h ... edit edit

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 12:11:55PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: One problem is that the content body sent along with the error is not necessarily appropriate for showing to the user (e.g., if it is HTML, it is probably not a good idea to show it on the

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 12:48, schrieb Ramkumar Ramachandra: Okay, here's a first draft of the new design. The new mediator object should look like: name = git ref = v1.7.8 The name is looked up in refs/modules/branch, which in turn looks like: [submodule git] origin =

Re: [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic

2013-03-28 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Running perlcritic with gentle severity reports six problems. The following lists the line numbers on which the problems occur, along with a description of the problem. This patch fixes them all, Thanks. after carefully considering the

Re: Git and GSoC 2013

2013-03-28 Thread Christian Couder
On Thu, Mar 28, 2013 at 5:45 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder christian.cou...@gmail.com writes: On Wed, Mar 27, 2013 at 7:52 PM, Jonathan Nieder jrnie...@gmail.com wrote: Jeff King wrote: There was a big thread about a month ago on whether Git should do Google

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 10:16, schrieb Ramkumar Ramachandra: Jens Lehmann wrote: Unless you acknowledge that submodules are a different repo, you'll always run into problems. I believe future enhancements will make this less tedious, but in the end they will stay separate repos (which is the whole

Re: What's cooking in git.git (Mar 2013, #07; Tue, 26)

2013-03-28 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Wed, Mar 27, 2013 at 03:15:44PM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: On Wed, Mar 27, 2013 at 02:47:25PM -0700, Junio C Hamano wrote: * jk/difftool-dir-diff-edit-fix (2013-03-14) 3 commits (merged to 'next' on

[PATCH v2 0/6] attribute regression fix for maint-1.8.1 and upward

2013-03-28 Thread Jeff King
On Tue, Mar 26, 2013 at 11:39:27AM -0700, Junio C Hamano wrote: So here is an attempt to fix the unintended regression, on top of 9db9eecfe5c2 (attr: avoid calling find_basename() twice per path, 2013-01-16). It consists of four patches. Here's my update to the series. I think this should

[PATCH 1/6] attr.c::path_matches(): the basename is part of the pathname

2013-03-28 Thread Jeff King
From: Junio C Hamano gits...@pobox.com The function takes two strings (pathname and basename) as if they are independent strings, but in reality, the latter is always pointing into a substring in the former. Clarify this relationship by expressing the latter as an offset into the former.

[PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the length of the prefix in pattern that is to be matched literally without globbing against the basename) and EXC_* flags that tells

[PATCH 3/6] dir.c::match_pathname(): adjust patternlen when shifting pattern

2013-03-28 Thread Jeff King
If we receive a pattern that starts with /, we shift it forward to avoid looking at the / part. Since the prefix and patternlen parameters are counts of what is in the pattern, we must decrement them as we increment the pointer. We remembered to handle prefix, but not patternlen. This didn't

[PATCH 5/6] attr.c::path_matches(): special case paths that end with a slash

2013-03-28 Thread Jeff King
From: Junio C Hamano gits...@pobox.com The function is given a string that ends with a slash to signal that the path is a directory to make sure that a pattern that ends with a slash (i.e. MUSTBEDIR) can tell directories and non-directories apart. However, the pattern itself (pat-pattern and

[PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Jeff King
Prior to v1.8.1.1, with: git init echo content foo mkdir subdir echo content subdir/bar echo subdir export-ignore .gitattributes git add . git commit -m one git archive HEAD | tar tf - the resulting archive would contain only foo and .gitattributes, not subdir. This was

Re: [PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Eric Sunshine
On Thu, Mar 28, 2013 at 5:50 PM, Jeff King p...@peff.net wrote: A pattern subdir should match any path subdir, whether it is a directory or a non-diretory. A pattern subdir/ insists that a s/diretory/directory/ [1] path subdir must be a directory for it to match. [1]:

Re: [PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:21:08PM -0400, Eric Sunshine wrote: On Thu, Mar 28, 2013 at 5:50 PM, Jeff King p...@peff.net wrote: A pattern subdir should match any path subdir, whether it is a directory or a non-diretory. A pattern subdir/ insists that a s/diretory/directory/ [1] I think

Re: [PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: This function takes two counted strings: a pattern, patternlen pair and a pathname, pathlen pair. But we end up feeding the result to fnmatch, which expects NUL-terminated strings. We can fix this by calling the fnmatch_icase_mem function, which handles

Re: [PATCH v3] checkout: avoid unnecessary match_pathspec calls

2013-03-28 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: diff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh index 56090d2..5e01d58 100755 --- a/t/t2022-checkout-paths.sh +++ b/t/t2022-checkout-paths.sh @@ -39,4 +39,25 @@ test_expect_success 'checking out paths out of a tree does not

Re: [PATCH v4 2/5] commit.c/GPG signature verification: Also look at the first GPG status line

2013-03-28 Thread Junio C Hamano
Sebastian Götte ja...@physik.tu-berlin.de writes: Signed-off-by: Sebastian Götte ja...@physik-pool.tu-berlin.de --- commit.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commit.c b/commit.c index 1aeb17a..533727c 100644 --- a/commit.c +++ b/commit.c @@

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

2013-03-28 Thread Junio C Hamano
Sebastian Götte ja...@physik.tu-berlin.de writes: 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: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the length of the prefix in pattern that is to be matched literally

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as parameters, together with prefix (the

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: From: Junio C Hamano gits...@pobox.com The function takes two counted strings (basename, basenamelen and pattern, patternlen) as

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 5:49 AM, Jeff King p...@peff.net wrote: My match_pathspec fix breaks at least t1011. Haven't looked closely at the series, but I suspect you need this http://article.gmane.org/gmane.comp.version-control.git/219008 -- Duy -- To unsubscribe from this list: send the line

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 4:47 AM, Jeff King p...@peff.net wrote: +static int fnmatch_icase_mem(const char *pattern, int patternlen, +const char *string, int stringlen, +int flags) +{ + int match_status; + struct strbuf

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Fri, Mar 29, 2013 at 08:25:00AM +0700, Nguyen Thai Ngoc Duy wrote: On Fri, Mar 29, 2013 at 4:47 AM, Jeff King p...@peff.net wrote: +static int fnmatch_icase_mem(const char *pattern, int patternlen, +const char *string, int stringlen, +

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Rob Hoelz
On Thu, 28 Mar 2013 12:25:07 -0700 Jonathan Nieder jrnie...@gmail.com wrote: Josh Triplett wrote: Related to this, as a path forward, I do think it makes sense to have a setting usable as an insteadOf that only applies to pushurl, even though pushInsteadOf won't end up serving that

Re: Git and GSoC 2013

2013-03-28 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: On Thu, Mar 28, 2013 at 5:45 PM, Junio C Hamano gits...@pobox.com wrote: What I gathered from the discussion so far is that everybody agrees that our mentoring has been suboptimal in various ways (not enough encouragement to engage with the

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Rob Hoelz r...@hoelz.ro writes: Honestly, if my workflow here is stupid and not Git-like and someone has a better suggestion, I would happy to let my patch go. Using two remotes is an option, but to me, using this triangular setup is just easier. I think you are conflating two unrelated

Re: git subtree oddity

2013-03-28 Thread Junio C Hamano
Jeremy Rosen jeremy.ro...@openwide.fr writes: I am starting to regret that I caved in and started carrying a copy of it in contrib/. It probably is a good idea to drop it from my tree and let it mature and eventually flourish outside. that's a shame... it solves a real problem, is simple to