Re: Notes and submodules

2013-08-20 Thread Johan Herland
On Tue, Aug 20, 2013 at 10:39 AM, Francis Moreau francis.m...@gmail.com wrote: On Mon, Aug 19, 2013 at 3:55 PM, Johan Herland jo...@herland.net wrote: On Mon, Aug 19, 2013 at 10:13 AM, Francis Moreau francis.m...@gmail.com wrote: Is it possible to keep submodules notes in the super project

Re: Notes and submodules

2013-08-19 Thread Johan Herland
be removed when running git notes prune in the super project. -- Johan Herland, jo...@herland.net www.herland.net -- 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: [RFD] Making git push [--force/--delete] safer?

2013-07-03 Thread Johan Herland
On Wed, Jul 3, 2013 at 12:55 AM, Johan Herland jo...@herland.net wrote: I assume that in most cases the expected value of the remote ref would equal the current value of the corresponding remote-tracking ref in the user's repo, so why not use that as the default expected value? E.g.: $ git

Re: [RFD] Making git push [--force/--delete] safer?

2013-07-03 Thread Johan Herland
On Wed, Jul 3, 2013 at 10:49 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Overnight, it occured to me that --force-if-expected could be simplified by leveraging the existing --force option; for the above two examples, respectively: $ git push --force

Re: [PATCH] Change remote tracking to remote-tracking

2013-07-03 Thread Johan Herland
Schubert msc...@elegosoft.com Reviewed-by: Johan Herland jo...@herland.net -- Johan Herland, jo...@herland.net www.herland.net -- 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

Re: [RFD] Making git push [--force/--delete] safer?

2013-07-03 Thread Johan Herland
into a shared repo... ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- 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: What's cooking in git.git (May 2013, #05; Mon, 20)

2013-07-02 Thread Johan Herland
On Mon, Jul 1, 2013 at 11:56 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Tue, May 21, 2013 at 5:35 PM, Junio C Hamano gits...@pobox.com wrote: ... I think we can go either way, and the above I think this is being rerolld was primarily keeping

Re: Feature request: author branch in commit object

2013-07-02 Thread Johan Herland
notes. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- 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: [RFD] Making git push [--force/--delete] safer?

2013-07-02 Thread Johan Herland
The option name probably needs a little work, but as long as it properly communicates the user's _intent_ I'm fine with whatever we call it. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: Off-line deverloper workflow?

2013-06-27 Thread Johan Herland
://vger.kernel.org/majordomo-info.html -- Johan Herland, jo...@herland.net www.herland.net -- 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: device files should be handled by git

2013-06-27 Thread Johan Herland
(and elsewhere), and write a script for generating the device files, rather than storing them as-is. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- 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

Re: Off-line deverloper workflow?

2013-06-27 Thread Johan Herland
On Thu, Jun 27, 2013 at 3:41 PM, Woody Wu narkewo...@gmail.com wrote: On Thu, Jun 27, 2013 at 03:14:05PM +0200, Johan Herland wrote: On Thu, Jun 27, 2013 at 2:46 PM, Woody Wu narkewo...@gmail.com wrote: I have a colleague who has to left our office for three month, but still need to work

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
); + setup_push_current(remote, branch); break; case PUSH_DEFAULT_NOTHING: Otherwise, this looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH 6/6] push: honor branch.*.push

2013-06-24 Thread Johan Herland
-- Johan Herland, jo...@herland.net www.herland.net -- 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: [PATCH 4/6] t/t5528-push-default: generalize test_push_*

2013-06-24 Thread Johan Herland
at http://vger.kernel.org/majordomo-info.html -- Johan Herland, jo...@herland.net www.herland.net -- 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: [PATCH 4/6] t/t5528-push-default: generalize test_push_*

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 9:28 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: + git --git-dir=${3:-repo1} log -1 --format='%h %s' $2 actual Isn't ${3:-repo1} a bashism? I do not think so. But now I looked at it again, I think I would use ${3

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 9:59 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: An earlier round of this change by mistake broke the safety for simple mode we have had since day 1 of that mode to make sure that the branch in the repository we update is set

Re: [PATCH 3/6] push: change `simple` to accommodate triangular workflows

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 9:46 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Johan Herland wrote: +static void setup_push_current(struct remote *remote, struct branch *branch) +{ + if (!branch) + die(_(message_detached_head_die), remote-name); + add_refspec

Re: [PATCH 4/6] t/t5528-push-default: generalize test_push_*

2013-06-24 Thread Johan Herland
On Mon, Jun 24, 2013 at 10:44 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Jun 24, 2013 at 4:33 AM, Johan Herland jo...@herland.net wrote: On Mon, Jun 24, 2013 at 9:28 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: + git --git-dir=${3

Re: [PATCH 6/6] push: honor branch.*.push

2013-06-24 Thread Johan Herland
. ...Johan [1]: I do realize that I'm abusing the foo/bar notation to mean $remote/$ref, and that this does not work in the general case where both remote names and ref names may contain slashes, or when remote names don't correspond to eponymous ref namespaces... -- Johan Herland, jo

Re: [PATCH 2/6] config doc: rewrite push.default section

2013-06-20 Thread Johan Herland
is not set to integrate with the branch with the same name, + to ensure that a `push` and a `push` are symmetrical. to ensure that a `push` and a `pull` are symmetrical. Otherwise, this looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list

Re: [PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c

2013-06-12 Thread Johan Herland
On Wed, Jun 12, 2013 at 2:32 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Tue, Jun 11, 2013 at 7:13 PM, Johan Herland jo...@herland.net wrote: This is a pure code movement of the machinery for copying notes to rewritten objects. This code was located in builtin/notes.c

Re: [PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c

2013-06-12 Thread Johan Herland
On Wed, Jun 12, 2013 at 8:28 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, Jun 12, 2013 at 2:10 AM, Johan Herland jo...@herland.net wrote: On Wed, Jun 12, 2013 at 2:32 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Tue, Jun 11, 2013 at 7:13 PM, Johan Herland jo

[PATCH 3/3] Move create_notes_commit() from notes-merge.c into notes-utils.c

2013-06-11 Thread Johan Herland
create_notes_commit() is needed by both the notes-merge code, and by commit_notes() in notes-utils. Since it is generally useful, and not bound to the notes-merge machinery, we move it from (the more specific) notes-merge to (the more general) notes-utils. Signed-off-by: Johan Herland jo

[PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c

2013-06-11 Thread Johan Herland
tr...@inf.ethz.ch Signed-off-by: Johan Herland jo...@herland.net --- Makefile | 2 + builtin.h| 16 --- builtin/commit.c | 1 + builtin/notes.c | 131 +- notes-utils.c| 132

[PATCH 1/3] finish_copy_notes_for_rewrite(): Let caller provide commit message

2013-06-11 Thread Johan Herland
notes commit message instead of hardcoding it. The above message is used for 'git notes copy', but when calling finish_copy_notes_for_rewrite() from builtin/commit.c, we use the following message instead: Notes added by 'git commit --amend' Cc: Thomas Rast tr...@inf.ethz.ch Signed-off-by: Johan

[PATCH 0/3] Refactor useful notes functions into notes-utils.[ch]

2013-06-11 Thread Johan Herland
, refactor the function and its callers and move it to libgit.a. Here goes... ...Johan Johan Herland (3): finish_copy_notes_for_rewrite(): Let caller provide commit message Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c Move create_notes_commit() from notes

Re: [PATCH 2/2] Move sequencer to builtin

2013-06-09 Thread Johan Herland
support for the opinions expressed by Jonathan, Jeff and Thomas. They accurately describe my impression of these discussion threads. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: What's cooking in git.git (May 2013, #05; Mon, 20)

2013-05-22 Thread Johan Herland
On Tue, May 21, 2013 at 5:35 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Tue, May 21, 2013 at 2:15 AM, Junio C Hamano gits...@pobox.com wrote: * jh/shorten-refname (2013-05-07) 4 commits - t1514: refname shortening is done after dereferencing

Re: [PATCH 00/17] Remove assumptions about refname lifetimes

2013-05-20 Thread Johan Herland
work... ;) ...Johan PS: Keeping reflogs is just a matter of wrapping the ref tree in a commit object using the previous state of the ref tree as its parent. -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [RFC 16/17] object_array_entry: copy name before storing in name field

2013-05-20 Thread Johan Herland
. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- 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

Storing refs in the odb (was: Re: [PATCH 00/17] Remove assumptions about refname lifetimes)

2013-05-20 Thread Johan Herland
On Mon, May 20, 2013 at 2:15 PM, Michael Haggerty mhag...@alum.mit.edu wrote: This is a very interesting idea. It's turtles all the way down. :) On 05/20/2013 12:28 PM, Johan Herland wrote: For server-class installations we need ref storage that can be read (and updated?) atomically

Re: [PATCH 00/17] Remove assumptions about refname lifetimes

2013-05-20 Thread Johan Herland
On Mon, May 20, 2013 at 6:37 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: For server-class installations we need ref storage that can be read (and updated?) atomically, and the current system of loose + packed files won't work since reading (and updating

Re: [PATCH 00/17] Remove assumptions about refname lifetimes

2013-05-20 Thread Johan Herland
On Mon, May 20, 2013 at 6:59 PM, Jeff King p...@peff.net wrote: On Mon, May 20, 2013 at 09:37:30AM -0700, Junio C Hamano wrote: Johan Herland jo...@herland.net writes: For server-class installations we need ref storage that can be read (and updated?) atomically, and the current system

Re: Storing refs in the odb

2013-05-20 Thread Johan Herland
On Mon, May 20, 2013 at 7:21 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Of course in either case we couldn't use a tree object directly, because these new reference tree objects would refer not only to blobs and other trees but also to commits and tags

Re: Storing refs in the odb

2013-05-20 Thread Johan Herland
On Mon, May 20, 2013 at 8:28 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I wasn't considering disallowing _anything_, rather open up to the idea that a tree object might refer to tag objects as well as commits/trees/blobs. E.g. in my suggested

Re: [PATCHv2 04/10] remote: Reject remote names containing '/'

2013-05-16 Thread Johan Herland
On Thu, May 16, 2013 at 11:48 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Johan Herland wrote: The disambiguation can probably be resolved, although the resulting code will obviously be somewhat more cumbersome and ugly (and IMHO the current code is plenty of that already...). Combine

Re: [PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames

2013-05-15 Thread Johan Herland
On Wed, May 15, 2013 at 8:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 05/14/2013 04:24 PM, Johan Herland wrote: I am not sure why we would want refs/remotes/%1/%2 instead of refs/remote/%*. Maybe I've been staring at this for too long, but I find the latter shorter and more

Re: [PATCH] make color.ui default to 'auto'

2013-05-15 Thread Johan Herland
On Wed, May 15, 2013 at 2:09 PM, Matthieu Moy matthieu@imag.fr wrote: Signed-off-by: Matthieu Moy matthieu@imag.fr Reviewed and supported-by: Johan Herland jo...@herland.net ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line

Re: [PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames

2013-05-15 Thread Johan Herland
On Wed, May 15, 2013 at 9:39 AM, Johan Herland jo...@herland.net wrote: On Wed, May 15, 2013 at 8:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: refs/remotes/%1/%2 (or refs/remotes/%1/%*) might be a nice way to imply that the rule should only be attempted if the input has at least two

Re: [PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames

2013-05-14 Thread Johan Herland
On Mon, May 13, 2013 at 10:34 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Johan Herland jo...@herland.net writes: Obviously, I named it '%1' since it expands into the _first_ component of the (slash-separated) shorthand. OK, I can buy something like

Re: [PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames

2013-05-13 Thread Johan Herland
On Mon, May 13, 2013 at 6:56 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: The refname_expand() function no longer uses mkpath()/mksnpath() to perform the pattern expansion. Instead, it uses strbuf_expand(), which removes the need for using fixed-length

Re: [PATCHv2 04/10] remote: Reject remote names containing '/'

2013-05-13 Thread Johan Herland
On Mon, May 13, 2013 at 6:54 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Although we definitely support and encourage use of multi-level branch names, we have never conciously tried to give support for multi-level remote names. Currently

Re: [PATCHv2 10/10] branch: Fix display of remote branches in refs/peers/*

2013-05-13 Thread Johan Herland
On Mon, May 13, 2013 at 7:19 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, May 11, 2013 at 12:21 PM, Johan Herland jo...@herland.net wrote: +* When displaying more then just remote-tracking branches, make the s/then/than/ Thanks, will fix. ...Johan -- Johan Herland, jo

[PATCHv2 00/10] Prepare for alternative remote-tracking branch location

2013-05-11 Thread Johan Herland
of the jh/shorten-refname series in 'pu'. Have fun! ...Johan Johan Herland (10): t7900: Start testing usability of namespaced remote refs t7900: Demonstrate failure to expand $peer/$branch according to refspecs refs.c: Refactor code for mapping between shorthand names and full refnames

[PATCHv2 01/10] t7900: Start testing usability of namespaced remote refs

2013-05-11 Thread Johan Herland
easy) to establish a clone with the above configuration, and that fetching into it yields the expected result. Signed-off-by: Johan Herland jo...@herland.net --- t/t7900-working-with-namespaced-remote-refs.sh | 82 ++ 1 file changed, 82 insertions(+) create mode 100755 t

[PATCHv2 02/10] t7900: Demonstrate failure to expand $peer/$branch according to refspecs

2013-05-11 Thread Johan Herland
/master when abbreviating them into their shortest unambiguous representation, e.g. when running git rev-parse --abbrev-ref on them. A (currently failing) test verifying this behavior is also added by this patch. Signed-off-by: Johan Herland jo...@herland.net --- t/t7900-working-with-namespaced

[PATCHv2 03/10] refs.c: Refactor code for mapping between shorthand names and full refnames

2013-05-11 Thread Johan Herland
and shortening happens. All of the existing users of ref_rev_parse_rules are converted to refname_patterns by this patch, so ref_rev_parse_rules is removed as well. Signed-off-by: Johan Herland jo...@herland.net --- cache.h | 4 -- refs.c | 187

[PATCHv2 04/10] remote: Reject remote names containing '/'

2013-05-11 Thread Johan Herland
name shall never contain a '/' character, and that the only correct way to parse foo/bar/baz is $nick = foo, $name = bar/baz. This patch teaches 'git remote' to reject remote names with slashes, and adds tests verifying this. Signed-off-by: Johan Herland jo...@herland.net --- builtin/remote.c

[PATCHv2 06/10] t7900: Test git branch -r/-a output w/remote-tracking branches in refs/peers/*

2013-05-11 Thread Johan Herland
These tests will be made to pass by subsequent patches. Signed-off-by: Johan Herland jo...@herland.net --- t/t7900-working-with-namespaced-remote-refs.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/t/t7900-working-with-namespaced-remote-refs.sh b/t/t7900-working

[PATCHv2 07/10] t3203: Add testcase for fix in 1603ade81352a526ccb206f41ff81ecbc855df2d

2013-05-11 Thread Johan Herland
This adds a testcase for some behavior that I very nearly broke while refactoring some stuff in builtin/branch.c. Signed-off-by: Johan Herland jo...@herland.net --- t/t3203-branch-output.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/t/t3203-branch-output.sh b/t/t3203

[PATCHv2 08/10] builtin/branch.c: Refactor ref_item.name and .dest into strbufs

2013-05-11 Thread Johan Herland
In preparation of a future patch which reorganizes how the display of the ref_list is done. Signed-off-by: Johan Herland jo...@herland.net --- builtin/branch.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/builtin/branch.c b/builtin

[PATCHv2 09/10] builtin/branch.c: Refactor remotes/ prepending to remote-tracking branches

2013-05-11 Thread Johan Herland
in refs/peers/*. Signed-off-by: Johan Herland jo...@herland.net --- builtin/branch.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index c8b49e3..4480be2 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -384,7

[PATCHv2 10/10] branch: Fix display of remote branches in refs/peers/*

2013-05-11 Thread Johan Herland
of tests for the expected output from git branch, and this patch does not break any of them. However, we do fix the two tests with remote-tracking branches in refs/peers/* introduced in a previous patch. Signed-off-by: Johan Herland jo...@herland.net --- builtin/branch.c

[PATCHv2 05/10] refs.c: Add support for expanding/shortening refs in refs/peers/*

2013-05-11 Thread Johan Herland
disallowed in the previous patch). A testcase demonstrating how multi-level remote names fail is therefore included in this patch. Signed-off-by: Johan Herland jo...@herland.net --- refs.c | 101 + t/t7900-working-with-namespaced-remote

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Mon, May 6, 2013 at 7:52 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: ... there is AFAICS _no_ way for sscanf() - having already done one or more format extractions - to indicate to its caller that the input fails to match the trailing part

[PATCHv2 1/3] t1514: Add tests of shortening refnames in strict/loose mode

2013-05-07 Thread Johan Herland
These tests verify the correct behavior of git rev-parse --abbrev-ref in both strict and loose modes. Really, it tests the correct behavior of refs.c:shorten_unambiguous_ref() with its 'strict' argument set to either true of false. Signed-off-by: Johan Herland jo...@herland.net --- t/t1514-rev

[PATCHv2 2/3] t1514: Demonstrate failure to correctly shorten refs/remotes/origin/HEAD

2013-05-07 Thread Johan Herland
There is currently a bug in refs.c:shorten_unambiguous_ref() that causes refs/remotes/origin/HEAD to be shortened to origin/HEAD instead of origin (which is expected from matching against the refs/remotes/%.*s pattern from refs.c:ref_rev_parse_rules). Signed-off-by: Johan Herland jo

[PATCHv2 3/3] shorten_unambiguous_ref(): Fix shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
-by: Johan Herland jo...@herland.net --- refs.c | 77 ++-- t/t1514-rev-parse-shorten_unambiguous_ref.sh | 4 +- t/t6300-for-each-ref.sh | 2 +- 3 files changed, 29 insertions(+), 54 deletions(-) diff --git a/refs.c

Re: [PATCH 2/7] t7900: Start testing usability of namespaced remote refs

2013-05-07 Thread Johan Herland
On Tue, May 7, 2013 at 3:29 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: +test_expect_success 'work-around clone with namespaced remote refs' ' + rm -rf client + git init client + ( + cd client + git remote add

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Tue, May 7, 2013 at 11:31 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Mon, May 6, 2013 at 7:52 PM, Junio C Hamano gits...@pobox.com wrote: It is interesting that this bug has stayed so long with us, which may indicate that nobody actually uses

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Wed, May 8, 2013 at 12:06 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: ...oops, I see I forgot the trailing on this line. Do you want a resend, or fix up yourself? I've pushed out a heavily fixed-up version on 'pu', mostly for styles and some log

Re: [PATCH 0/7] Make $remote/$branch work with unconventional refspecs

2013-05-06 Thread Johan Herland
On Mon, May 6, 2013 at 7:06 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Let me try to summarize my views on how refnames should work in Git, to see if we can identify where we differ on the principles (or if we, in fact, differ at all): Thanks; I think

Re: [PATCH 0/7] Make $remote/$branch work with unconventional refspecs

2013-05-05 Thread Johan Herland
On Sun, May 5, 2013 at 6:28 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: The $remote/$branch syntax can be interpreted in two subtly different ways: 1. A shorthand name for the remote-tracking branch corresponding to a specific $branch from

Re: [PATCH 0/7] Make $remote/$branch work with unconventional refspecs

2013-05-05 Thread Johan Herland
= +refs/heads/*:refs/remotes/topics/jk/* [remote fc] fetch = +refs/heads/*:refs/remotes/topics/fc/* your git merge topics/jh/rbranch should work with current Git. With my patch series on top, it would also be equivalent to git merge jh/rbranch. ...Johan -- Johan Herland, jo

Re: How do I modify the commit message (not the topmost one) of a git commit?

2013-05-04 Thread Johan Herland
stashed some uncommitted changes in step #0, you might want to un-stash them now: git stash pop Hope this helps, ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

[PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-04 Thread Johan Herland
bert.wes...@googlemail.com Signed-off-by: Johan Herland jo...@herland.net --- refs.c | 82 +++-- t/t6300-for-each-ref.sh | 12 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/refs.c b/refs.c index d17931a..7231f54

[PATCH 2/7] t7900: Start testing usability of namespaced remote refs

2013-05-04 Thread Johan Herland
will work comfortably with this kind of setup. For now, we only verify that it is possible (though not exactly easy) to establish a clone with the above configuration, and that fetching into it yields the expected result. Signed-off-by: Johan Herland jo...@herland.net --- t/t7900-working

[PATCH 3/7] t7900: Demonstrate failure to expand $remote/$branch according to refspecs

2013-05-04 Thread Johan Herland
be shortened into origin/master when abbreviating them into their shortest unambiguous representation, e.g. when running git rev-parse --abbrev-ref on them. A (currently failing) test verifying this behavior is also added by this patch. Signed-off-by: Johan Herland jo...@herland.net --- t/t7900-working

[PATCH 4/7] refs.c: Refactor rules for expanding shorthand names into full refnames

2013-05-04 Thread Johan Herland
of the existing code that uses ref_rev_parse_rules to expand shorthand refs are converted to use ref_expand_rules instead. Signed-off-by: Johan Herland jo...@herland.net --- cache.h | 4 refs.c | 46 +- refs.h | 11 +++ remote.c | 6

[PATCH 5/7] refs.c: Refactor code for shortening full refnames into shorthand names

2013-05-04 Thread Johan Herland
been fully replaced by ref_expand_rules. Hence this patch also removes ref_rev_parse_rules. Signed-off-by: Johan Herland jo...@herland.net --- refs.c | 110 - refs.h | 2 ++ 2 files changed, 50 insertions(+), 62 deletions(-) diff

[PATCH 7/7] refs.c: Add rules for resolving refs using remote refspecs

2013-05-04 Thread Johan Herland
compatibility for refs under refs/remotes/* that are not covered by any configured refspec. Signed-off-by: Johan Herland jo...@herland.net --- refs.c | 98 +- t/t7900-working-with-namespaced-remote-refs.sh | 21 +- 2 files changed, 114

Re: another packed-refs race

2013-05-03 Thread Johan Herland
of loose refs, you're more likely to hit #1, and not have to load all refs.) That said, my intuition on the number of loose vs. packed refs, or the relative cost of reading all loose refs might be off here... ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from

Re: another packed-refs race

2013-05-03 Thread Johan Herland
for most Git commands, and definitely not for git rev-parse foo. I think your approach is better. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

Re: removing a bad commit

2013-05-02 Thread Johan Herland
as the bad commit did, Git might stop the rebase because of conflicts when it replays those patches. In this case, fix the conflicts, add the file, and git rebase --continue. Repeat until all commits have been replayed and the rebase is finished. Hope this helps, ...Johan -- Johan Herland, jo

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Johan Herland
/notes/commits or, in your notation: notes.commits.remote=origin notes.commits.merge=refs/notes/commits Just an idea ... Adam Thanks for your interest and insight. It's enlightening to see how others approach and work with notes and notes sharing. Have fun! :) ...Johan -- Johan

Re: Premerging topics (was: [RFD] annnotating a pair of commit objects?)

2013-04-23 Thread Johan Herland
this mechanism to store rerere information? We could then easily derive to something that would allow to pre-merge a new topic with all topics already merged in master..pu (for example). Anyway, this task is left for latter. -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from

Re: git fetch refs and tags

2013-04-23 Thread Johan Herland
objects. Something like git gc --prune=now should do the job. Hope this helps, ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- 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

Re: git fetch refs and tags

2013-04-23 Thread Johan Herland
On Tue, Apr 23, 2013 at 1:45 PM, Jan Weitzel j.weit...@phytec.de wrote: Am Dienstag, den 23.04.2013, 13:25 +0200 schrieb Johan Herland: On Tue, Apr 23, 2013 at 12:53 PM, Jan Weitzel j.weit...@phytec.de wrote: Hello, I have the following problem: I have 2 bare git repositories one has

Re: git fetch refs and tags

2013-04-23 Thread Johan Herland
13ce4fbc1761562a36f755b081b0d44b657c25a9 refs/tags/spam $ git log --graph --decorate --all --oneline * 7294fc9 (tag: sausage) side | * 13ce4fb (tag: spam, master) d | * 09e4bb2 (tag: eggs) c | * e90d835 (HEAD, foo) b |/ * 92f92ec a Have fun! :) ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from

Re: Premerging topics (was: [RFD] annnotating a pair of commit objects?)

2013-04-23 Thread Johan Herland
On Tue, Apr 23, 2013 at 4:51 PM, Antoine Pelisse apeli...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:34 AM, Johan Herland jo...@herland.net wrote: On Wed, Apr 10, 2013 at 10:35 PM, Antoine Pelisse apeli...@gmail.com wrote: Data-structure == We could use a note ref to store the pre

[PATCHv3 0/8] Improving the search for remote-tracking branches

2013-04-21 Thread Johan Herland
Hi, This is third iteration of this series. The only difference from v2 is improved test code (in patches #1 and #2) thanks to Jonathan Nieder, and Eric Wong's ACK to patch #6. Have fun! :) ...Johan Johan Herland (8): t2024: Add tests verifying current DWIM behavior of 'git checkout branch

[PATCHv3 1/8] t2024: Add tests verifying current DWIM behavior of 'git checkout branch'

2013-04-21 Thread Johan Herland
starting point and configured upstream. Improved-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Johan Herland jo...@herland.net --- t/t2024-checkout-dwim.sh | 99 1 file changed, 99 insertions(+) create mode 100755 t/t2024-checkout-dwim.sh diff

[PATCHv3 2/8] t2024: Show failure to use refspec when DWIMming remote branch names

2013-04-21 Thread Johan Herland
-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Johan Herland jo...@herland.net --- t/t2024-checkout-dwim.sh | 70 +++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh index 1452bea

[PATCHv3 3/8] checkout: Use remote refspecs when DWIMming tracking branches

2013-04-21 Thread Johan Herland
in the previous patch. Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-checkout.txt | 6 +++--- builtin/checkout.c | 42 ++ t/t2024-checkout-dwim.sh | 6 +++--- 3 files changed, 28 insertions(+), 26 deletions(-) diff

[PATCHv3 4/8] t3200.39: tracking setup should fail if there is no matching refspec.

2013-04-21 Thread Johan Herland
with test_expect_failure in anticipation of a following patch to introduce the new behavior. Signed-off-by: Johan Herland jo...@herland.net --- t/t3200-branch.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index d969f0e..1bfdadc

[PATCHv3 5/8] t7201.24: Add refspec to keep --track working

2013-04-21 Thread Johan Herland
is introduced. Signed-off-by: Johan Herland jo...@herland.net --- t/t7201-co.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t7201-co.sh b/t/t7201-co.sh index be9672e..0c9ec0a 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -431,6 +431,7 @@ test_expect_success 'detach a symbolic link HEAD

[PATCHv3 6/8] t9114.2: Don't use --track option against svn-remote-tracking branches

2013-04-21 Thread Johan Herland
with this remote). Furthermore, the usage of --track in this case is unnecessary, since the upstreaming config that would be created is never used. Simply removing --track fixes the issue without changing the expected behavior of the test. Acked-by: Eric Wong normalper...@yhbt.net Signed-off-by: Johan

[PATCHv3 7/8] branch.c: Validate tracking branches with refspecs instead of refs/remotes/*

2013-04-21 Thread Johan Herland
in t2024-checkout-dwim. Signed-off-by: Johan Herland jo...@herland.net --- branch.c | 17 - t/t2024-checkout-dwim.sh | 2 +- t/t3200-branch.sh| 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/branch.c b/branch.c index 6ae6a4c..beaf11d

[PATCHv3 8/8] glossary: Update and rephrase the definition of a remote-tracking branch

2013-04-21 Thread Johan Herland
as an upstream. This patch rewrites the paragraph on remote-tracking branches accordingly. Signed-off-by: Johan Herland jo...@herland.net --- Documentation/glossary-content.txt | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/glossary-content.txt b

Re: [RFD/PATCH 3/5] checkout: Use remote refspecs when DWIMming tracking branches

2013-04-20 Thread Johan Herland
, but I do not see how that happens. It's technically a regression since it breaks existing tests, but as you observe in your reply to patch #5, it is really the test that relies on current implementation details. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from

[PATCHv2 0/8] Improving the search for remote-tracking branches

2013-04-20 Thread Johan Herland
in the glossary to be somewhat closer to the current state of things. Have fun! :) ...Johan Johan Herland (8): t2024: Add tests verifying current DWIM behavior of 'git checkout branch' t2024: Show failure to use refspec when DWIMming remote branch names checkout: Use remote refspecs when DWIMming

[PATCHv2 1/8] t2024: Add tests verifying current DWIM behavior of 'git checkout branch'

2013-04-20 Thread Johan Herland
starting point and configured upstream. Signed-off-by: Johan Herland jo...@herland.net --- t/t2024-checkout-dwim.sh | 66 1 file changed, 66 insertions(+) create mode 100755 t/t2024-checkout-dwim.sh diff --git a/t/t2024-checkout-dwim.sh b/t/t2024

[PATCHv2 2/8] t2024: Show failure to use refspec when DWIMming remote branch names

2013-04-20 Thread Johan Herland
-by: Johan Herland jo...@herland.net --- t/t2024-checkout-dwim.sh | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh index 5650d21..36bf52f 100755 --- a/t/t2024-checkout-dwim.sh +++ b

[PATCHv2 3/8] checkout: Use remote refspecs when DWIMming tracking branches

2013-04-20 Thread Johan Herland
in the previous patch. Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-checkout.txt | 6 +++--- builtin/checkout.c | 42 ++ t/t2024-checkout-dwim.sh | 6 +++--- 3 files changed, 28 insertions(+), 26 deletions(-) diff

[PATCHv2 4/8] t3200.39: tracking setup should fail if there is no matching refspec.

2013-04-20 Thread Johan Herland
with test_expect_failure in anticipation of a following patch to introduce the new behavior. Signed-off-by: Johan Herland jo...@herland.net --- t/t3200-branch.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index d969f0e..1bfdadc

[PATCHv2 5/8] t7201.24: Add refspec to keep --track working

2013-04-20 Thread Johan Herland
is introduced. Signed-off-by: Johan Herland jo...@herland.net --- t/t7201-co.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t7201-co.sh b/t/t7201-co.sh index be9672e..0c9ec0a 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -431,6 +431,7 @@ test_expect_success 'detach a symbolic link HEAD

[PATCHv2 6/8] t9114.2: Don't use --track option against svn-remote-tracking branches

2013-04-20 Thread Johan Herland
with this remote). Furthermore, the usage of --track in this case is unnecessary, since the upstreaming config that would be created is never used. Simply removing --track fixes the issue without changing the expected behavior of the test. Cc: Eric Wong normalper...@yhbt.net Signed-off-by: Johan Herland

[PATCHv2 7/8] branch.c: Validate tracking branches with refspecs instead of refs/remotes/*

2013-04-20 Thread Johan Herland
in t2024-checkout-dwim. Signed-off-by: Johan Herland jo...@herland.net --- branch.c | 17 - t/t2024-checkout-dwim.sh | 2 +- t/t3200-branch.sh| 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/branch.c b/branch.c index 6ae6a4c..beaf11d

[PATCHv2 8/8] glossary: Update and rephrase the definition of a remote-tracking branch

2013-04-20 Thread Johan Herland
as an upstream. This patch rewrites the paragraph on remote-tracking branches accordingly. Signed-off-by: Johan Herland jo...@herland.net --- Documentation/glossary-content.txt | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/glossary-content.txt b

<    1   2   3   4   >