[PATCH] sha1-name: refactor get_sha1() parsing

2013-09-01 Thread Felipe Contreras
Instead of parsing left to right, do it right do left, this way it is much more natural and probably efficient too, as there's less recursivity. In theory there shouldn't be any functional changes, although there's at least one error message that has changed. Signed-off-by: Felipe Contreras ---

Re: [PATCH v2] revision: add --except option

2013-09-01 Thread Felipe Contreras
On Mon, Sep 2, 2013 at 1:30 AM, Johannes Sixt wrote: > It would be better to settle on the meaning of --except before throwing > back and forth implementations. I've lost the count of features that get discussed endlessly, and nobody implements them ever. The implementation should dictate the be

Re: [PATCH] revision: add --except option

2013-09-01 Thread Felipe Contreras
On Mon, Sep 2, 2013 at 1:25 AM, Johannes Sixt wrote: > Am 8/31/2013 21:27, schrieb Felipe Contreras: >> On Fri, Aug 30, 2013 at 2:56 AM, Johannes Sixt wrote: >>> Am 8/30/2013 8:32, schrieb Junio C Hamano: If you have a history where - branches "master" and "maint" point at commit

Re: [PATCH] Turn off pathspec magic on "{checkout,reset,add} -p" on native Windows builds

2013-09-01 Thread Johannes Sixt
Am 9/1/2013 4:08, schrieb Nguyễn Thái Ngọc Duy: > git-add--interactive.perl rejects arguments with colons in 21e9757 > (Hack git-add--interactive to make it work with ActiveState Perl - > 2007-08-01). Pathspec magic starts with a colon, so it won't work if > these pathspecs are passed to git-add--i

[PATCH v5 0/2] Add @ shortcut, again

2013-09-01 Thread Felipe Contreras
Felipe Contreras (2): sha1-name: pass len argument to interpret_branch_name() Add new @ shortcut for HEAD Documentation/git-check-ref-format.txt | 2 ++ Documentation/revisions.txt| 3 +++ cache.h| 2 +- refs.c |

[PATCH v5 2/2] Add new @ shortcut for HEAD

2013-09-01 Thread Felipe Contreras
Typing 'HEAD' is tedious, especially when we can use '@' instead. The reason for choosing '@' is that it follows naturally from the ref@op syntax (e.g. HEAD@{u}), except we have no ref, and no operation, and when we don't have those, it makes sens to assume 'HEAD'. So now we can use 'git show @~1

[PATCH v5 1/2] sha1-name: pass len argument to interpret_branch_name()

2013-09-01 Thread Felipe Contreras
This is useful to make sure we don't step outside the boundaries of what we are interpreting at the moment. For example while interpreting foobar@{u}~1, the job of interpret_branch_name() ends right before ~1, but there's no way to figure that out inside the function, unless the len argument is pas

[PATCH 1/4] t: rev-parse-parents: fix style

2013-09-01 Thread Felipe Contreras
Pretty much all the tests follow a different style. Signed-off-by: Felipe Contreras --- t/t6101-rev-parse-parents.sh | 74 ++-- 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh inde

[PATCH 0/4] t: rev-parse-parents: cleanups

2013-09-01 Thread Felipe Contreras
Felipe Contreras (4): t: rev-parse-parents: fix style t: rev-parse-parents: fix weird ! notation t: rev-parse-parents: avoid yoda conditions t: rev-parse-parents: simplify setup t/t6101-rev-parse-parents.sh | 96 +++- 1 file changed, 69 insertions(+

[PATCH 4/4] t: rev-parse-parents: simplify setup

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- t/t6101-rev-parse-parents.sh | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh index b9aef31..0653f5e 100755 --- a/t/t6101-rev-parse-parents.sh +++ b/t/t6101-re

[PATCH 3/4] t: rev-parse-parents: avoid yoda conditions

2013-09-01 Thread Felipe Contreras
Just as 5 == X is weird, so is comparing first the expected value, and then the value we are testing. So switch them around. Signed-off-by: Felipe Contreras --- t/t6101-rev-parse-parents.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t6101-rev-parse-parents.sh b

[PATCH 2/4] t: rev-parse-parents: fix weird ! notation

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- t/t6101-rev-parse-parents.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh index bead4d7..c10580c 100755 --- a/t/t6101-rev-parse-parents.sh +++ b/t/t6101-rev-parse-parents.sh

Re: [PATCH v2] revision: add --except option

2013-09-01 Thread Johannes Sixt
Am 8/31/2013 23:26, schrieb Felipe Contreras: > +--except:: > + Skip the following object names. For example: > + '--branches --except master' will show all the branches, except master. > + This differs from --not in that --except will still show the object, if > + they are referenc

Re: [PATCH] revision: add --except option

2013-09-01 Thread Johannes Sixt
Am 8/31/2013 21:27, schrieb Felipe Contreras: > On Fri, Aug 30, 2013 at 2:56 AM, Johannes Sixt wrote: >> Am 8/30/2013 8:32, schrieb Junio C Hamano: >>> If you have a history where >>> >>> - branches "master" and "maint" point at commit A; >>> - branch "next" points at commit B that is a descenda

[PATCH v2 5/7] glossary: more precise definition of treeish (a.k.a. tree-ish)

2013-09-01 Thread Richard Hansen
A treeish isn't a ref. Also, mention dereferencing, and that a commit dereferences to a tree, to support gitrevisions(7) and rev-parse's error messages. Signed-off-by: Richard Hansen --- Documentation/glossary-content.txt | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) d

[PATCH v2 6/7] revisions.txt: fix and clarify ^{}

2013-09-01 Thread Richard Hansen
If possible, will be dereferenced even if it is not a tag type (e.g., commit dereferenced to a tree). Signed-off-by: Richard Hansen --- Documentation/revisions.txt | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/revisions.txt b/Documentation/revisi

[PATCH v2 4/7] use 'committish' instead of 'commit-ish'

2013-09-01 Thread Richard Hansen
Replace all instances of 'commit-ish' with 'committish': * to standardize on a single spelling (the documentation contained a mix of 'committish' and 'commit-ish') * to be consistent with variable names (hyphens are not usually allowed in variable names) * to be consistent with 'treei

[PATCH v2 3/7] use 'treeish' instead of 'tree-ish'

2013-09-01 Thread Richard Hansen
Replace all instances of 'tree-ish' with 'treeish': * to standardize on a single spelling (the documentation contained a mix of 'treeish' and 'tree-ish') * to be consistent with variable names (hyphens are not usually allowed in variable names) * to be consistent with 'committish' *

[PATCH v2 0/7] documentation cleanups for ^{}

2013-09-01 Thread Richard Hansen
The documentation for the ^{} syntax (e.g., v1.8.4^{tree}) needed some fixing, and the fixes motivated some other documentation cleanups. Changes since v1 (2013-06-18, see ): * standardize on 'treeish' (don't use 'tree-ish') * stan

Re: [PATCH v3 07/11] Documentation/replace: tell that -f option bypasses the type check

2013-09-01 Thread Christian Couder
From: "Philip Oakley" > > From: "Christian Couder" > >> Maybe we can show that in an example. But I think the patch is quite >> clear as it is and should be enough. >> >> If we really want to correct some false beliefs, the best would be to >> state the truth where those false beliefs are stated.

[PATCH v2 1/7] glossary: mention 'treeish' as an alternative to 'tree-ish'

2013-09-01 Thread Richard Hansen
The documentation contains a mix of the two spellings, so include both in the glossary so that a search for either will lead to the definition. Signed-off-by: Richard Hansen --- Documentation/glossary-content.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/g

[PATCH v2 7/7] glossary: fix and clarify the definition of 'ref'

2013-09-01 Thread Richard Hansen
Signed-off-by: Richard Hansen --- Documentation/glossary-content.txt | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index a2edcc3..44d524b 100644 --- a/Documentation/glossary-content.

[PATCH v2 2/7] glossary: define committish (a.k.a. commit-ish)

2013-09-01 Thread Richard Hansen
Signed-off-by: Richard Hansen --- Documentation/glossary-content.txt | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 0273095..b1993e0 100644 --- a/Documentation/glossary-content.txt +++ b/Documentatio

[PATCH v2] peel_onion(): add support for ^{tag}

2013-09-01 Thread Richard Hansen
Complete the ^{} family of object specifiers by having ^{tag} dereference until a tag object is found (or fail if unable). At first glance this may not seem very useful, as commits, trees, and blobs cannot be peeled to a tag, and a tag would just peel to itself. However, this can be used to ensur

Re: [PATCH] {fetch,receive}-pack: drop unpack-objects, delay loosing objects until the end

2013-09-01 Thread Eric Sunshine
On Sun, Sep 1, 2013 at 11:05 PM, Nguyễn Thái Ngọc Duy wrote: > Current code peaks into the transfered pack's header, if the number of s/peaks/peeks/ > objects is under a limit, unpack-objects is called to handle the rest, > otherwise index-pack is. This patch makes fetch-pack use index-pack > un

[PATCH] {fetch,receive}-pack: drop unpack-objects, delay loosing objects until the end

2013-09-01 Thread Nguyễn Thái Ngọc Duy
Current code peaks into the transfered pack's header, if the number of objects is under a limit, unpack-objects is called to handle the rest, otherwise index-pack is. This patch makes fetch-pack use index-pack unconditionally, then turn objects loose and remove the pack at the end. unpack-objects i

RE: THANK YOU

2013-09-01 Thread mslizawong
i have a business proposal for you, write me back for more info. -Sent from my ipad. -- 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 v3 07/11] Documentation/replace: tell that -f option bypasses the type check

2013-09-01 Thread Philip Oakley
From: "Christian Couder" From: "Philip Oakley" From: "Christian Couder" The replaced object and the replacement object must be of the same type. -There is no other restriction on them. +This restriction can be bypassed using `-f`. Unless `-f` is given, the 'replace' reference must not yet

[PATCH v3 2/2] submodule: don't print status output with ignore=all

2013-09-01 Thread brian m. carlson
git status prints information for submodules, but it should ignore the status of those which have submodule..ignore set to all. Fix it so that it does properly ignore those which have that setting either in .git/config or in .gitmodules. Not ignored are submodules that are added, deleted, or move

[PATCH v3 1/2] submodule: fix confusing variable name

2013-09-01 Thread brian m. carlson
cmd_summary reads the output of git diff, but reads in the submodule path into a variable called name. Since this variable does not contain the name of the submodule, but the path, rename it to be clearer what data it actually holds. Signed-off-by: brian m. carlson --- git-submodule.sh | 8

[PATCH v3 0/2] submodule: Don't print status output with submodule..ignore=all

2013-09-01 Thread brian m. carlson
There are configuration options for each submodule that specify under what circumstances git status should display output for that submodule. Unfortunately, these settings were not being respected, and as such the tests were marked TODO. This patch series consists of two patches: the first is a fi

Re: [PATCH v3 01/11] replace: forbid replacing an object with one of a different type

2013-09-01 Thread Philip Oakley
From: "Christian Couder" From: "Philip Oakley" Sorry for not replying earlier in the series. From: "Christian Couder" Users replacing an object with one of a different type were not prevented to do so, even if it was obvious, and stated in the doc, that bad things would result from doing t

RE: THANK YOU

2013-09-01 Thread mslizawong
i have a business proposal for you, write me back for more info. -Sent from my ipad. -- 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 v3 3/4] get rid of "git submodule summary --for-status"

2013-09-01 Thread Jens Lehmann
Am 31.08.2013 19:08, schrieb brian m. carlson: > On Fri, Aug 30, 2013 at 10:08:53PM +0200, Jens Lehmann wrote: >> Am 30.08.2013 21:51, schrieb Jens Lehmann: >>> Am 30.08.2013 21:40, schrieb Jens Lehmann: Am 29.08.2013 23:23, schrieb Matthieu Moy: > Jens Lehmann writes: > >> Am 29.

[RFC] Running a hook on reset

2013-09-01 Thread Andres Freund
Hi, I propose adding a hook that is run after git reset. My personal use case for that is that I am indexing my checkouts using global (a tool similar to ctags, cscope, ...) and I really like that index to be up2date all the time. I can catch most cases where the work tree changes from git via t

Re: [PATCH v3 01/11] replace: forbid replacing an object with one of a different type

2013-09-01 Thread Christian Couder
From: "Philip Oakley" > > Sorry for not replying earlier in the series. > > From: "Christian Couder" >> Users replacing an object with one of a different type were not >> prevented to do so, even if it was obvious, and stated in the doc, >> that bad things would result from doing that. >> >> To

Re: [PATCH v3 07/11] Documentation/replace: tell that -f option bypasses the type check

2013-09-01 Thread Christian Couder
From: "Philip Oakley" > > From: "Christian Couder" >> >> The replaced object and the replacement object must be of the same >> type. >> -There is no other restriction on them. >> +This restriction can be bypassed using `-f`. >> >> Unless `-f` is given, the 'replace' reference must not yet exist.

Re: [PATCH 2/6] Add concept of 'publish' branch

2013-09-01 Thread Felipe Contreras
On Sun, Sep 1, 2013 at 3:41 AM, Eric Sunshine wrote: > On Sun, Sep 1, 2013 at 4:26 AM, Felipe Contreras > wrote: >> +static void setup_push_simple(struct remote *remote, struct branch *branch, >> + int triangular) >> +{ >> + if (branch->push_name) { >> +

Re: [PATCH v3 05/11] Documentation/replace: add Creating Replacement Objects section

2013-09-01 Thread Christian Couder
From: "Philip Oakley" > > From: "Christian Couder" > >> +CREATING REPLACEMENT OBJECTS >> + >> + >> +linkgit:git-filter-branch[1], linkgit:git-hash-object[1] and >> +linkgit:git-rebase[1], > > Let's not forget the obvious 'git commit' or 'git merge' on a > temporary br

Re: [PATCH v3 11/11] t6050-replace: use some long option names

2013-09-01 Thread Christian Couder
From: "Philip Oakley" > >> So that they are tested a litlle bit too. > s /litlle/little/ Thanks, Christian. -- 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 v3 08/11] t6050-replace: check that -f option bypasses the type check

2013-09-01 Thread Christian Couder
From: Eric Sunshine > > On Sat, Aug 31, 2013 at 3:12 PM, Christian Couder > wrote: >> Signed-off-by: Christian Couder >> --- >> t/t6050-replace.sh | 6 ++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh >> index 05be228..0b07a0b 100755 >> --- a/

Re: [PATCH v3 11/11] t6050-replace: use some long option names

2013-09-01 Thread Christian Couder
From: Eric Sunshine > >> diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh >> index 0b07a0b..5dc26e8 100755 >> --- a/t/t6050-replace.sh >> +++ b/t/t6050-replace.sh >> @@ -122,9 +122,9 @@ test_expect_success '"git replace" listing and deleting' >> ' >> test "$HASH2" = "$(git replace -l)"

Re: [PATCH 2/6] Add concept of 'publish' branch

2013-09-01 Thread Eric Sunshine
On Sun, Sep 1, 2013 at 4:26 AM, Felipe Contreras wrote: > The upstream branch is: > > branch.$name.remote > branch.$name.merge > > The publish branch is: > > branch.$name.pushremote > branch.$name.push > > Signed-off-by: Felipe Contreras > --- > builtin/push.c | 19 +++ >

[PATCH 1/6] push: trivial reorganization

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- builtin/push.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/builtin/push.c b/builtin/push.c index 04f0eaf..5dc06a3 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -113,20 +113,11 @@ static NORETUR

[PATCH 5/6] push: add --set-publish option

2013-09-01 Thread Felipe Contreras
To setup publish tracking branch, like 'git branch --set-publish'. Signed-off-by: Felipe Contreras --- Documentation/git-push.txt | 9 +- builtin/push.c | 2 ++ t/t5529-push-publish.sh| 70 ++ transport.c| 28 +

[PATCH 2/6] Add concept of 'publish' branch

2013-09-01 Thread Felipe Contreras
The upstream branch is: branch.$name.remote branch.$name.merge The publish branch is: branch.$name.pushremote branch.$name.push Signed-off-by: Felipe Contreras --- builtin/push.c | 19 +++ remote.c | 34 -- remote.h | 4

[PATCH 3/6] branch: allow configuring the publish branch

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Documentation/git-branch.txt | 11 + branch.c | 43 ++ branch.h | 2 ++ builtin/branch.c | 56 4 files changed, 108 inserti

[PATCH 4/6] t: branch add publish branch tests

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- t/t3200-branch.sh | 76 +++ 1 file changed, 76 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 44ec6a4..cd0b8e9 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -870,4 +870,80

[PATCH 6/6] branch: display publish branch

2013-09-01 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- builtin/branch.c | 45 - 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 48af999..47644ad 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -42,6 +42,7 @@

[PATCH 0/6] Introduce publish tracking branch

2013-09-01 Thread Felipe Contreras
Hi, As it has been discussed before, our support for triangular workflows is lacking, and the following patch series aims to improve that situation. We have the concept of upstream branch (e.g. 'origin/master') which is to where our topic branches eventually should be merged to, so it makes sense

Re: [PATCH v3 11/11] t6050-replace: use some long option names

2013-09-01 Thread Eric Sunshine
On Sat, Aug 31, 2013 at 3:12 PM, Christian Couder wrote: > So that they are tested a litlle bit too. > > Signed-off-by: Christian Couder > --- > t/t6050-replace.sh | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh > index 0b0

Re: [PATCH v3 08/11] t6050-replace: check that -f option bypasses the type check

2013-09-01 Thread Eric Sunshine
On Sat, Aug 31, 2013 at 3:12 PM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > t/t6050-replace.sh | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh > index 05be228..0b07a0b 100755 > --- a/t/t6050-replace.sh > +++ b/t/t6050-

[PATCH 0/2] fast-export: simplification

2013-09-01 Thread Felipe Contreras
Hi, No functional changes, but get_tags_and_duplicates() is quite complex as it is, and can be simplified by spliting code into a separate function. Felipe Contreras (2): fast-export: make extra_refs global fast-export: refactor get_tags_and_duplicates() builtin/fast-export.c | 87 +

[PATCH 2/2] fast-export: refactor get_tags_and_duplicates()

2013-09-01 Thread Felipe Contreras
Split into a separate helper function get_commit() so that the part that finds the relevant commit, and the part that does something with it (handle tag object, etc.) are in different places. No functional changes. Signed-off-by: Felipe Contreras --- builtin/fast-export.c | 68 +

[PATCH 1/2] fast-export: make extra_refs global

2013-09-01 Thread Felipe Contreras
There's no need to pass it around everywhere. This would make easier further refactoring that makes use of this variable. Signed-off-by: Felipe Contreras --- builtin/fast-export.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/builtin/fast-export.c b/