Re: Composing git repositories

2013-04-04 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jonathan Nieder jrnie...@gmail.com writes: If you are curious, at a quieter time it might be useful to ask for pointers to the discussions that led to the current design, and folks on the list might be glad to help. Not on the current design but the

Re: Two potential bugs in aliases that expand to shell commands

2013-04-04 Thread Jeff King
On Wed, Apr 03, 2013 at 07:05:33PM -0700, Han wrote: There appears to be another case string values need to be enclosed in quotes, which is a shell command where you want to preserve quote characters (not leading or trailing); a minimal example is shortcut = !cd pwd Yes. You must

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Wed, Apr 3, 2013 at 6:25 PM, Max Horn m...@quendi.de wrote: On 03.04.2013, at 03:31, Felipe Contreras wrote: I only learned about it recently, I've looked at the history and to me it seems rather chaotic, and a lot of the code was simply copied from git-remote-hg without comment.

Re: [PATCH] update pasky's email address

2013-04-04 Thread Junio C Hamano
Eric Wong normalper...@yhbt.net writes: Mail to pa...@suse.cz is bouncing. Signed-off-by: Eric Wong normalper...@yhbt.net --- I noticed this when I attempted to reply to Thomas's email: http://mid.gmane.org/f3d238a4c6cfbc6d68f2c4fa285aefa93acf4b7d.1365027616.git.tr...@inf.ethz.ch

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 12:42 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, Apr 3, 2013 at 6:25 PM, Max Horn m...@quendi.de wrote: On 03.04.2013, at 03:31, Felipe Contreras wrote: I only learned about it recently, I've looked at the history and to me it seems rather chaotic,

Re: [PATCH] update pasky's email address

2013-04-04 Thread Eric Wong
Junio C Hamano gits...@pobox.com wrote: Eric Wong normalper...@yhbt.net writes: Mail to pa...@suse.cz is bouncing. Signed-off-by: Eric Wong normalper...@yhbt.net --- I noticed this when I attempted to reply to Thomas's email:

[PATCH] git-remote-mediawiki: new wiki URL in documentation

2013-04-04 Thread Matthieu Moy
The Bibzball wiki is not maintained anymore. Signed-off-by: Matthieu Moy matthieu@imag.fr --- contrib/mw-to-git/git-remote-mediawiki.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.txt

[BUG] git log -S not respecting --no-textconv

2013-04-04 Thread Matthieu Moy
Hi, It seems the command git log --no-textconv -Sfoo still runs the textconv filter (noticed because I have a broken textconv filter that lets git log -S error out). Steps to reproduce: Create a repo with *.txt file(s) in it $ echo '*.txt diff=wrong' .gitattributes An incorrect textconv

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Max Horn
On 04.04.2013, at 08:46, Felipe Contreras wrote: On Thu, Apr 4, 2013 at 12:42 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, Apr 3, 2013 at 6:25 PM, Max Horn m...@quendi.de wrote: On 03.04.2013, at 03:31, Felipe Contreras wrote: I only learned about it recently, I've

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 3:07 AM, Max Horn m...@quendi.de wrote: On 04.04.2013, at 08:46, Felipe Contreras wrote: On Thu, Apr 4, 2013 at 12:42 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, Apr 3, 2013 at 6:25 PM, Max Horn m...@quendi.de wrote: On 03.04.2013, at 03:31, Felipe

Re: [PATCH] update pasky's email address

2013-04-04 Thread Petr Baudis
Hi! On Thu, Apr 04, 2013 at 01:50:42AM +, Eric Wong wrote: Mail to pa...@suse.cz is bouncing. Oh, I totally forgot to take care of this. Thanks a lot for fixing it! Signed-off-by: Eric Wong normalper...@yhbt.net In general, Acked-by: Petr Baudis pa...@ucw.cz On Thu, Apr 04, 2013

RFC: Very useful script to SVG graph the git commits from a file orientated view

2013-04-04 Thread John Tapsell
Hi, I made this script to help me see the logical connections between commits. It produces a .svg graph showing the commits that affected a file. For example, say you have the commits: commit1 - modify hello.c commit2 - modify goodbye.c commit3 - modify hello.c and goodbye.c It will draw a

Re: RFC: Very useful script to SVG graph the git commits from a file orientated view

2013-04-04 Thread Jeremy Rosen
very usefull indeed, where can I find it ? I have a big rebase/merge/reorganise work that is comming soon and that is going to be tremendously usefull... Cordialement Jérémy Rosen fight key loggers : write some perl using vim - Mail original - Hi, I made this script to

Re: RFC: Very useful script to SVG graph the git commits from a file orientated view

2013-04-04 Thread John Tapsell
Opps, somehow I forgot to actually attach it. It's now attached graph_git.pl Description: Binary data

Re: [PATCH v2] count-objects: output KiB instead of kilobytes

2013-04-04 Thread Mihai Capotă
On Wed, Apr 3, 2013 at 4:38 PM, Junio C Hamano gits...@pobox.com wrote: Mihai Capotă mi...@mihaic.ro writes: diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 73d367c..de44e33 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -1126,12 +1126,12 @@ unless ($opt_P) { } #

trouble on windows network share

2013-04-04 Thread Pyeron, Jason J CTR (US)
I am having trouble when the .git folder is on a network share, given the below where should I start on my debugging? $ git --version git version 1.7.9 $ uname -a CYGWIN_NT-6.1-WOW64 LNDLE642FX7ZTR1 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin jason.pyeron@localhost

Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-04 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: On Tue, Apr 2, 2013 at 1:58 PM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: We can't use stdout for that in remote helpers. Signed-off-by: Felipe Contreras

[PATCH v2 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
Hi, A reroll of the previous series, only a very small bugfix, and one updated commit message. Dusty Phillips (2): remote-hg: add missing config variable in doc remote-hg: push to the appropriate branch Felipe Contreras (10): remote-hg: trivial cleanups remote-hg: properly report errors

[PATCH v2 01/13] remote-hg: trivial cleanups

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 328c2dc..d0dfb1e 100755 ---

[PATCH v2 02/13] remote-hg: add missing config variable in doc

2013-04-04 Thread Felipe Contreras
From: Dusty Phillips du...@linux.ca Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 4 1 file changed, 4 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index d0dfb1e..844ec50

[PATCH v2 04/13] remote-hg: fix for files with spaces

2013-04-04 Thread Felipe Contreras
From: Peter van Zetten peter.van.zet...@cgi.com Set the maximum number of splits to make when dividing the diff stat lines based on space characters. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 03/13] remote-hg: properly report errors on bookmark pushes

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 844ec50..19eb4db 100755 ---

[PATCH v2 05/13] remote-hg: make sure fake bookmarks are updated

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 7 +++ contrib/remote-helpers/test-hg-bidi.sh | 1 + contrib/remote-helpers/test-hg-hg-git.sh | 1 + 3 files changed, 9 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg

[PATCH v2 06/13] remote-hg: trivial test cleanups

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/test-hg-bidi.sh | 5 ++--- contrib/remote-helpers/test-hg-hg-git.sh | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/remote-helpers/test-hg-bidi.sh

[PATCH v2 08/13] remote-hg: split bookmark handling

2013-04-04 Thread Felipe Contreras
Will be useful for remote bookmarks. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 39 +++- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg

[PATCH v2 09/13] remote-hg: refactor export

2013-04-04 Thread Felipe Contreras
No functional changes. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index

[PATCH v2 10/13] remote-hg: update remote bookmarks

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index c741f13..b54de1e 100755 ---

[PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Felipe Contreras
Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push multiple bookmarks (on the same branch), which would be the behavior most similar to git. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com ---

[PATCH v2 12/13] remote-hg: update tags globally

2013-04-04 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index b784c54..56b3641 100755 ---

[PATCH v2 13/13] remote-hg: push to the appropriate branch

2013-04-04 Thread Felipe Contreras
From: Dusty Phillips du...@linux.ca Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 4 1 file changed, 4 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 56b3641..d82eb2d

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

2013-04-04 Thread John Koleszar
On Wed, Apr 3, 2013 at 11:05 AM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net writes: On Wed, Apr 03, 2013 at 12:10:38PM -0400, Jeff King wrote: Hmm. This is testing just the ref advertisement. It would be nice to see a complete transaction tested with namespaces turned

[PATCH v2 0/4] remote-helpers: trivial test fixes

2013-04-04 Thread Felipe Contreras
Hi, A reroll, now we do some checks, just avoid test-lint-duplicates, and fix the outsanding shell portability issue. The rest is the same. Felipe Contreras (4): remote-bzr: avoid echo -n remote-helpers: fix the run of all tests remote-bzr: remove stale check code for tests remote-hg:

[PATCH v2 1/4] remote-bzr: avoid echo -n

2013-04-04 Thread Felipe Contreras
It's not portable, as reported by test-lint. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/test-bzr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index

[PATCH v2 2/4] remote-helpers: fix the run of all tests

2013-04-04 Thread Felipe Contreras
We don't need to check for duplicate test numbers, we don't have them, and either way test-lint-duplicates doesn't work in this situation. Also, while we are on it, enable test-lint-shell-syntax to check for sh errors. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com ---

[PATCH v2 3/4] remote-bzr: remove stale check code for tests

2013-04-04 Thread Felipe Contreras
The fastimport plugin was only required in the early stage of development. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/test-bzr.sh | 14 -- 1 file changed, 14 deletions(-) diff --git a/contrib/remote-helpers/test-bzr.sh

[PATCH v2 4/4] remote-hg: fix hg-git test-case

2013-04-04 Thread Felipe Contreras
There was some lingering code that shouldn't have been there in the first place. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/test-hg-hg-git.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/remote-helpers/test-hg-hg-git.sh

Re: [PATCH 1/3] remote-helpers: fix the run of all tests

2013-04-04 Thread Felipe Contreras
Jeff King wrote: On Mon, Apr 01, 2013 at 11:46:00PM +0200, Antoine Pelisse wrote: On Mon, Apr 1, 2013 at 11:14 PM, Felipe Contreras felipe.contre...@gmail.com wrote: +export TEST_LINT := I think test-lint-executable still makes sense here. Also test-lint-shell-syntax, which finds

Re: trouble on windows network share

2013-04-04 Thread Jeff King
On Thu, Apr 04, 2013 at 03:01:36PM +, Pyeron, Jason J CTR (US) wrote: I am having trouble when the .git folder is on a network share, given the below where should I start on my debugging? [...] jason.pyeron@localhost //server/share/dir/subdir/test $ git add test.txt

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

2013-04-04 Thread John Koleszar
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 Koleszar jkoles...@google.com --- Incorporate peff's suggested test, and Junio's comments. With regard to whether it's

[PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Simon Ruderich
git log -S doesn't respect --no-textconv: $ echo '*.txt diff=wrong' .gitattributes $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo error: cannot run xxx: No such file or directory fatal: unable to read files to diff Signed-off-by: Simon Ruderich si...@ruderich.org

[PATCH 2/2] diffcore-pickaxe: fill_one() doesn't modify textconv

2013-04-04 Thread Simon Ruderich
Signed-off-by: Simon Ruderich si...@ruderich.org --- diffcore-pickaxe.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index f814a52..c378ea0 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -75,10 +75,10 @@

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Tue, Apr 2, 2013 at 4:23 PM, Max Horn m...@quendi.de wrote: I'll try to list some of remaining differences, mostly (in my biased opinion) improvements on the gitifyhg side. Note that some of these might be outdated with felipe's recent changes, i.e. I have not yet had time to review

Re: [PATCH v2] count-objects: output KiB instead of kilobytes

2013-04-04 Thread Junio C Hamano
Mihai Capotă mi...@mihaic.ro writes: The git manual contains an explicit warning about the output of a porcelain command changing: The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience. Yeah, I know that, as I wrote it ;-)

Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: I saw that you update the commit message without consulting here first to: --- remote-hg: redirect unnecessary mercurial output Mercurial emits messages like searching for changes, no changes found, etc. meant for the use of its own

Re: [PATCH v2 07/13] remote-hg: redirect buggy mercurial output

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Mercurial emits messages like searching for changes, no changes found, etc. meant for the use of its own UI layer, which break the pipe between transport helper and remote helper. Since there's no way to silence Mercurial, let's redirect to

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push multiple bookmarks (on the same branch), which would be the behavior most similar to git. Signed-off-by: Felipe Contreras

Re: [PATCH] Documentation/git-commit: reword the --amend explanation

2013-04-04 Thread Carlos Martín Nieto
On Wed, 2013-04-03 at 23:25 +0100, Philip Oakley wrote: Sent: Wednesday, April 03, 2013 9:04 PM Junio C Hamano gits...@pobox.com writes: Yes, and since then we gained --no-edit option and such, so editor starts off also needs to be rethought, no? The original wording with seeded may

Re: [PATCH v2 13/13] remote-hg: push to the appropriate branch

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: From: Dusty Phillips du...@linux.ca Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/git-remote-hg | 4 1 file changed, 4 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg

Re: [PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Matthieu Moy
Simon Ruderich si...@ruderich.org writes: This patch should fix it. It does. --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -78,7 +78,6 @@ static void fill_one(struct diff_filespec *one, mmfile_t *mf, struct userdiff_driver **textconv) { if

Re: [PATCH] Documentation/git-commit: reword the --amend explanation

2013-04-04 Thread Junio C Hamano
Carlos Martín Nieto c...@elego.de writes: On Wed, 2013-04-03 at 23:25 +0100, Philip Oakley wrote: + Replace the tip of the current branch with a fresh commit. [or updated commit, or new commit, or ...] Ack, we should lead with the goal, I'd go for the Replace the tip of the current

Re: [PATCH 2/2] diffcore-pickaxe: fill_one() doesn't modify textconv

2013-04-04 Thread Matthieu Moy
Simon Ruderich si...@ruderich.org writes: --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -75,10 +75,10 @@ static void diffgrep_consume(void *priv, char *line, unsigned long len) } static void fill_one(struct diff_filespec *one, - mmfile_t *mf, struct

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

2013-04-04 Thread Junio C Hamano
John Koleszar jkoles...@google.com writes: @@ -402,7 +404,8 @@ static void get_info_refs(char *arg) } else { select_getanyfile(); - for_each_ref(show_text_ref, buf); + head_ref_namespaced(show_text_ref, buf); +

Re: [PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Jeff King
On Thu, Apr 04, 2013 at 06:03:59PM +0200, Simon Ruderich wrote: git log -S doesn't respect --no-textconv: $ echo '*.txt diff=wrong' .gitattributes $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo error: cannot run xxx: No such file or directory fatal: unable to

Re: [PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Junio C Hamano
Simon Ruderich si...@ruderich.org writes: git log -S doesn't respect --no-textconv: $ echo '*.txt diff=wrong' .gitattributes $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo error: cannot run xxx: No such file or directory fatal: unable to read files to diff

Re: [PATCH 2/2] diffcore-pickaxe: fill_one() doesn't modify textconv

2013-04-04 Thread Jeff King
On Thu, Apr 04, 2013 at 06:05:58PM +0200, Simon Ruderich wrote: Signed-off-by: Simon Ruderich si...@ruderich.org --- diffcore-pickaxe.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index f814a52..c378ea0 100644

Re: [PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Jeff King
On Thu, Apr 04, 2013 at 10:45:25AM -0700, Junio C Hamano wrote: Simon Ruderich si...@ruderich.org writes: git log -S doesn't respect --no-textconv: $ echo '*.txt diff=wrong' .gitattributes $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo error: cannot run xxx:

Re: [PATCH 1/2] diffcore-pickaxe: respect --no-textconv

2013-04-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: I'm OK with this as-is, but I would also be happy to see the re-ordering and extra cleanup I mentioned elsewhere. Yeah, I agree that the order is the other way around. 2/2 could be retitled to say that fill_one() no longer needs to touch, but swapping the order

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Jed Brown
Felipe Contreras felipe.contre...@gmail.com writes: I still don't see any good reason why a user might prefer gitifyhg, even more importantly, why gitifyhg developers don't contribute to remote-hg. Felipe, I read your blog announcement [1] and got the impression that remote-hg was ready for

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Jed Brown
Felipe Contreras felipe.contre...@gmail.com writes: Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push multiple bookmarks (on the same branch), which would be the behavior most similar to git. The problem is that you're

Possible bug: Git submodules can get into broken state

2013-04-04 Thread Chris Wilson
Hi all, If your git repo's .gitmodules contains a URL that you don't have access to (for example you download someone else's code and it references a submodule using their writable g...@github.com URL) then: * git submodule init will add them to .git/config, with the wrong URLs. * git

[RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Hi, The purpose of this series is to convince you that we've made a lot of fundamental mistakes while designing submodules, and that we should fix them now. [1/7] argues for a new object type, and this is the core of the idea. It's an entire beautiful design + UI/UX package. To demo it now:

[PATCH 1/7] link.c, link.h: introduce fifth object type

2013-04-04 Thread Ramkumar Ramachandra
Submodules suffer from one major design flaw: they are represented as commit objects in the tree. There are several problems with this: 1. Since the object is actually part of the submodule's object store (you can't even cat-file the commit), the superproject knows very little about the

[PATCH 2/7] sha1_file, link: write link objects to the database

2013-04-04 Thread Ramkumar Ramachandra
On a 'git add', instead of returning the SHA-1 of the subproject commit, write a real link object to the object database. Also implement parse_link_buffer() correspondingly. index_path() determines the upstream_url and checkout_rev from a pre-cloned submodule. The checkout_rev is set to the

[PATCH 3/7] teach ce_compare_gitlink() about OBJ_LINK

2013-04-04 Thread Ramkumar Ramachandra
This simply requires parsing out the checkout_rev from the link object, and comparing its SHA-1 with that of HEAD. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- read-cache.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git

[PATCH 4/7] builtin/log: teach show about OBJ_LINK

2013-04-04 Thread Ramkumar Ramachandra
'git show' now works with link objects. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- builtin/log.c | 17 + 1 file changed, 17 insertions(+) diff --git a/builtin/log.c b/builtin/log.c index 0f31810..a170df9 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -411,6

[PATCH 5/7] edit-link: add new builtin

2013-04-04 Thread Ramkumar Ramachandra
This is a WIP. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- git-edit-link.sh | 87 1 file changed, 87 insertions(+) create mode 100644 git-edit-link.sh diff --git a/git-edit-link.sh b/git-edit-link.sh new file mode 100644

[PATCH 6/7] clone: introduce clone.submodulegitdir

2013-04-04 Thread Ramkumar Ramachandra
This configuration variable comes into effect when 'git clone' is invoked in an existing git repository. Instead of cloning the repository as-is, it relocates the gitdir of the repository to the path specified by this variable. Arguably, it does the right thing when working with submodules.

[PATCH 7/7] sha1_file: write ref_name to link object

2013-04-04 Thread Ramkumar Ramachandra
Great. Now, we just have to write refs/modules/branch/* at commit-time. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- sha1_file.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/sha1_file.c b/sha1_file.c index a8a6d72..2ea101a 100644 --- a/sha1_file.c +++

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Junio C Hamano
Chris Wilson chris+git...@aptivate.org writes: If your git repo's .gitmodules contains a URL that you don't have access to (for example you download someone else's code and it references a submodule using their writable g...@github.com URL) then: * git submodule init will add them to

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Junio C Hamano
Jed Brown j...@59a2.org writes: ... I felt that it was wildly oversold and that putting it into git.git was premature. I tried gitifyhg later and it basically worked out of the box. All known problems were marked by 'xfail' test cases. At that time, remote-hg failed almost all the

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Linus Torvalds
On Thu, Apr 4, 2013 at 11:30 AM, Ramkumar Ramachandra artag...@gmail.com wrote: The purpose of this series is to convince you that we've made a lot of fundamental mistakes while designing submodules, and that we should fix them now. [1/7] argues for a new object type, and this is the core of

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 12:11 PM, Jed Brown j...@59a2.org wrote: Felipe Contreras felipe.contre...@gmail.com writes: I still don't see any good reason why a user might prefer gitifyhg, even more importantly, why gitifyhg developers don't contribute to remote-hg. Felipe, I read your blog

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: The purpose of this series is to convince you that we've made a lot of fundamental mistakes while designing submodules, and that we should fix them now. [1/7] argues for a new object type, and this is the core of the idea. Oh, dear. Shouldn't it be possible to

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Linus Torvalds wrote: I don't dispute that a new link object might be a good idea, but there's no explanation of the actual format of this thing anywhere, and what the real advantages would be. A clearer this is the design, this is the format of the link object, and this is what it buys us

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: 1. 'git add' should not go past submodule boundaries. I should not be able to 'git add clayoven/' or 'git add clayoven/LICENSE'. In addition, the shell completion also needs to be fixed. Yep. This is a bug. 2. An empty directory containing a .git file is

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 10:44 AM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push multiple bookmarks (on the same branch), which would

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Jonathan Nieder
Jonathan Nieder wrote: Ramkumar Ramachandra wrote: The purpose of this series is to convince you that we've made a lot of fundamental mistakes while designing submodules, and [...] Shouldn't it be possible to explain the same thing using a test script illustrating intended UI? Sorry, I sent

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Jed Brown
Felipe Contreras felipe.contre...@gmail.com writes: Where is the evidence? You say remote-hg doesn't work, I say it does, the difference is that I have evidence to prove it. There are many projects that don't do what they claim. I gave remote-hg a few minutes and moved on since (at the time)

Re: Behavior of git rm

2013-04-04 Thread Jeff King
On Wed, Apr 03, 2013 at 10:35:52AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Of the two situations, I think the first one is less likely to be destructive (noticing that a file is already gone via ENOTDIR), as we are only proceeding with the index deletion, and we end

[PATCH 1/3] rm: do not complain about d/f conflicts during deletion

2013-04-04 Thread Jeff King
If we used to have an index entry d/f, but d has been replaced by a non-directory entry, the user may still want to run git rm to delete the stale index entry. They could use git rm --cached to just touch the index, but git rm should also work: we explicitly try to handle the case that the file

[PATCH 2/3] t3600: test behavior of reverse-d/f conflict

2013-04-04 Thread Jeff King
The previous commit taught rm that it is safe to consider d/f removed when d has become a non-directory. This patch adds a test for the opposite: a file d that becomes a directory. In this case, git rm does need to complain, because we should not be removing arbitrary content under d. Git already

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Linus Torvalds
On Thu, Apr 4, 2013 at 11:52 AM, Ramkumar Ramachandra artag...@gmail.com wrote: 1. upstream_url: this records the upstream URL. No need to keep a .gitmodules. 2. checkout_rev: this records the ref to check out the submodule to. As opposed to a concrete SHA-1, this allows for more

[PATCH 3/3] t3600: test rm of path with changed leading symlinks

2013-04-04 Thread Jeff King
If we have a path d/f but replace d with a symlink to a new directory e, how should we handle git rm d/f? It may seem at first like we need new protections to make sure that we do not delete random content from e/f. However, we are already covered by git-rm's existing protections: it is happy if

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: On Thu, Apr 4, 2013 at 10:44 AM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 12:17 PM, Jed Brown j...@59a2.org wrote: Felipe Contreras felipe.contre...@gmail.com writes: Ideally we shouldn't do this, as it's not recommended in mercurial documentation, but there's no other way to push multiple bookmarks (on the same branch), which would be the

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Jed Brown
Junio C Hamano gits...@pobox.com writes: So,... is there a concrete proposal for _me_ to act on? Do you want to see contrib/remtote-hg out of my tree, and have it compete with the other one (which also shouldn't be in my tree) in the open? Three months ago, I would have said yes. Now I

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Linus Torvalds wrote: So the thing is (and this was pretty much the original basis for .gitmodules) that pretty much *all* of the above fields are quite possibly site-specific, rather than globally stable. So I actually conceptually like (and liked) the notion of a link object, but I just

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Linus Torvalds wrote: don't seem fundamentally antithetical to the current model I don't think it's fundamentally antithetical either. This basically makes the life of git-submodule much simpler, and eventually obsolete it away completely. -- To unsubscribe from this list: send the line

Re: [PATCH 3/3] t3600: test rm of path with changed leading symlinks

2013-04-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: +test_expect_success SYMLINKS 'replace dir with symlink to dir (same content)' ' + git reset --hard + rm -rf d e + mkdir e + echo content e/f + ln -s e d + git rm d/f + test_must_fail git rev-parse --verify :d/f +

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Linus Torvalds
On Thu, Apr 4, 2013 at 12:36 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Let's compare the two alternatives: .gitmodules versus link object. If I want my fork of .gitmodules, I create a commit on top. Or you could also just edit and carry a dirty .gitmodules around for your personal

Re: [PATCH 00/13] remote-hg: general updates

2013-04-04 Thread Felipe Contreras
On Thu, Apr 4, 2013 at 1:23 PM, Jed Brown j...@59a2.org wrote: Junio C Hamano gits...@pobox.com writes: So,... is there a concrete proposal for _me_ to act on? Do you want to see contrib/remtote-hg out of my tree, and have it compete with the other one (which also shouldn't be in my tree) in

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Linus Torvalds wrote: On Thu, Apr 4, 2013 at 12:36 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Let's compare the two alternatives: .gitmodules versus link object. If I want my fork of .gitmodules, I create a commit on top. Or you could also just edit and carry a dirty .gitmodules

Re: [PATCH 3/3] t3600: test rm of path with changed leading symlinks

2013-04-04 Thread Jeff King
On Thu, Apr 04, 2013 at 12:42:54PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: +test_expect_success SYMLINKS 'replace dir with symlink to dir (same content)' ' + git reset --hard + rm -rf d e + mkdir e + echo content e/f + ln -s e d + git rm

Re: Possible bug: Git submodules can get into broken state

2013-04-04 Thread Jens Lehmann
Am 04.04.2013 19:10, schrieb Chris Wilson: If your git repo's .gitmodules contains a URL that you don't have access to (for example you download someone else's code and it references a submodule using their writable g...@github.com URL) then: * git submodule init will add them to

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Junio C Hamano wrote: I think Heiko and Jens's (by the way, why aren't they on the Cc: list when this topic is clearly discussing submodules? Don't we want to learn how the current submodule subsystem is used to solve what real-world problems?) .gitmodules updates is exactly going in that

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Linus Torvalds wrote: Or you could also just edit and carry a dirty .gitmodules around for your personal use-case. I'm sorry, but a dirty worktree is unnecessarily painful to work with. I don't think anyone objects to committing, if they can understand basic rebase. -- To unsubscribe from this

Re: [RFC/PATCH 0/7] Rework git core for native submodules

2013-04-04 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote: Just take the link's buffer with you everywhere. All you have to do is git edit-link name and paste the file's contents there, instead of opening .gitmodules directly in your editor. On this. The buffer doesn't have to conform to a tight spec: we can just expose a

Re: [PATCH v2 11/13] remote-hg: force remote push

2013-04-04 Thread Jed Brown
Felipe Contreras felipe.contre...@gmail.com writes: If that's the case, they should disable in the server, just like some people disable non-fast-forward pushes in git. I don't know how to make Hg allow new branches and bookmarks, but not new anonymous heads. Vanishly few Hg projects use a

[PATCH v2 1/3] diffcore-pickaxe: remove unnecessary call to get_textconv()

2013-04-04 Thread Simon Ruderich
get_textconv() is called in diff_grep() to determine the textconv driver before calling fill_one() and then again in fill_one(). Remove this unnecessary call by determining the textconv driver before calling fill_one(). With this change it's also no longer necessary for fill_one() to modify the

[PATCH v2 2/3] diffcore-pickaxe: remove fill_one()

2013-04-04 Thread Simon Ruderich
From: Jeff King p...@peff.net fill_one is _almost_ identical to just calling fill_textconv; the exception is that for the !DIFF_FILE_VALID case, fill_textconv gives us an empty buffer rather than a NULL one. Signed-off-by: Simon Ruderich si...@ruderich.org --- On Thu, Apr 04, 2013 at 01:49:42PM

  1   2   >