Git development
 help / color / mirror / Atom feed
* [PATCH 4/8] dir.c: git-status --ignored: don't list empty directories as ignored
From: Karsten Blees @ 2013-03-18 20:28 UTC (permalink / raw)
  To: Git List
  Cc: Junio C Hamano, Erik Faye-Lund, Ramkumar Ramachandra, Robert Zeh,
	Duy Nguyen, Antoine Pelisse, Adam Spiers
In-Reply-To: <514775FA.9080304@gmail.com>

'git-status --ignored' lists empty untracked directories as ignored, even
though they don't have any ignored files.

When checking if a directory is already listed as untracked (i.e. shouldn't
be listed as ignored as well), don't assume that the dirctory has only
ignored files if it doesn't have untracked files, as the directory may be
empty.

Signed-off-by: Karsten Blees <blees@dcon.de>
---
 dir.c                      | 17 ++++++++---------
 t/t7061-wtstatus-ignore.sh | 26 ++++++++++++++++++++++++--
 2 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/dir.c b/dir.c
index fd1f088..64457db 100644
--- a/dir.c
+++ b/dir.c
@@ -1071,17 +1071,16 @@ static enum directory_treatment treat_directory(struct dir_struct *dir,
 
 	/*
 	 * We are looking for ignored files and our directory is not ignored,
-	 * check if it contains only ignored files
+	 * check if it contains untracked files (i.e. is listed as untracked)
 	 */
 	if ((dir->flags & DIR_SHOW_IGNORED) && !exclude) {
-		int ignored;
-		dir->flags &= ~DIR_SHOW_IGNORED;
-		dir->flags |= DIR_HIDE_EMPTY_DIRECTORIES;
-		ignored = read_directory_recursive(dir, dirname, len, 1, simplify);
-		dir->flags &= ~DIR_HIDE_EMPTY_DIRECTORIES;
-		dir->flags |= DIR_SHOW_IGNORED;
-
-		return ignored ? ignore_directory : show_directory;
+		int untracked;
+		dir->flags &= ~(DIR_SHOW_IGNORED|DIR_SHOW_OTHER_DIRECTORIES);
+		untracked = read_directory_recursive(dir, dirname, len, 1, simplify);
+		dir->flags |= DIR_SHOW_IGNORED|DIR_SHOW_OTHER_DIRECTORIES;
+
+		if (untracked)
+			return ignore_directory;
 	}
 	if (!(dir->flags & DIR_SHOW_IGNORED) &&
 	    !(dir->flags & DIR_HIDE_EMPTY_DIRECTORIES))
diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh
index 28b7d95..6171a49 100755
--- a/t/t7061-wtstatus-ignore.sh
+++ b/t/t7061-wtstatus-ignore.sh
@@ -64,13 +64,35 @@ cat >expected <<\EOF
 ?? .gitignore
 ?? actual
 ?? expected
-!! untracked-ignored/
 EOF
 
-test_expect_success 'status untracked directory with ignored files with --ignore' '
+test_expect_success 'status empty untracked directory with --ignore' '
 	rm -rf ignored &&
 	mkdir untracked-ignored &&
 	mkdir untracked-ignored/test &&
+	git status --porcelain --ignored >actual &&
+	test_cmp expected actual
+'
+
+cat >expected <<\EOF
+?? .gitignore
+?? actual
+?? expected
+EOF
+
+test_expect_success 'status empty untracked directory with --ignore -u' '
+	git status --porcelain --ignored -u >actual &&
+	test_cmp expected actual
+'
+
+cat >expected <<\EOF
+?? .gitignore
+?? actual
+?? expected
+!! untracked-ignored/
+EOF
+
+test_expect_success 'status untracked directory with ignored files with --ignore' '
 	: >untracked-ignored/ignored &&
 	: >untracked-ignored/test/ignored &&
 	git status --porcelain --ignored >actual &&
-- 
1.8.1.2.8021.g7e51819

^ permalink raw reply related

* Re: [PATCH v4] submodule: add 'deinit' command
From: Jens Lehmann @ 2013-03-18 20:54 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Phil Hord, Git Mailing List, Heiko Voigt, Michael J Gruber,
	Marc Branchaud, W. Trevor King
In-Reply-To: <7v1ubk8u6o.fsf@alter.siamese.dyndns.org>

Am 12.03.2013 17:22, schrieb Junio C Hamano:
> Phil Hord <phil.hord@gmail.com> writes:
> 
>> I think this would be clearer if 'git deinit' said
>>
>>     rm 'submodule/*'
>>
>> or maybe
>>
>>     Removed workdir for 'submodule'
>>
>> Is it just me?
> 
> The latter may probably be better.  

Hmm, it doesn't really remove the directory but only empties it
(it recreates it a few lines after removing it together with its
contents). So what about

    Cleared directory 'submodule'

The attached interdiff suppresses the "rm 'submodule'" message
and issues the "Cleared ..." message after it successfully removed
the work tree. (But please note that it also prints this message
even if the submodule work tree is already empty, e.g. when you
deinit a submodule the second time)

----------------8<-------------------------
diff --git a/git-submodule.sh b/git-submodule.sh
index 204bc78..d003e8a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -601,10 +601,12 @@ cmd_deinit()

 			if test -z "$force"
 			then
-				git rm -n "$sm_path" ||
+				git rm -qn "$sm_path" ||
 				die "$(eval_gettext "Submodule work tree '\$sm_path' contains local modifications; use '-f' to discard them")"
 			fi
-			rm -rf "$sm_path" || say "$(eval_gettext "Could not remove submodule work tree '\$sm_path'")"
+			rm -rf "$sm_path" &&
+			say "$(eval_gettext "Cleared directory '\$sm_path'")" ||
+			say "$(eval_gettext "Could not remove submodule work tree '\$sm_path'")"
 		fi

 		mkdir "$sm_path" || say "$(eval_gettext "Could not create empty submodule directory '\$sm_path'")"

^ permalink raw reply related

* Re: [PATCH] push: Alias pushurl from push rewrites
From: Rob Hoelz @ 2013-03-18 20:59 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, josh
In-Reply-To: <7vd2uxppk0.fsf@alter.siamese.dyndns.org>

On Sun, 17 Mar 2013 16:35:59 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> Rob Hoelz <rob@hoelz.ro> writes:
> 
> > git push currently doesn't consider pushInsteadOf when
> > using pushurl; this tests and fixes that.
> >
> > If you use pushurl with an alias that has a pushInsteadOf
> > configuration value, Git does not take advantage of it.  For
> > example:
> >
> > [url "git://github.com/"]
> >     insteadOf = github:
> > [url "git://github.com/myuser/"]
> >     insteadOf = mygithub:
> > [url "git@github.com:myuser/"]
> >     pushInsteadOf = mygithub:
> > [remote "origin"]
> >     url     = github:organization/project
> >     pushurl = mygithub:project
> 
> Incomplete sentence?  For example [this is an example configuration]
> and then what happens?  Something like "with the sample
> configuration, 'git push origin' should follow pushurl and then turn
> it into X, but instead it ends up accessing Y".
> 
> If there is no pushInsteadOf, does it still follow insteadOf?  Is it
> tested already?
> 
> Wouldn't you want to cover all the combinations to negative cases
> (i.e. making sure the codepath to support a new case does not affect
> behaviour of the code outside the new case)?  A remote with and
> without pushurl (two combinations) and a pseudo URL scheme with and
> without pushInsteadOf (again, two combinations) will give you four
> cases.
> 
> 
> Thanks.

I've taken your advice, and an amended patch follows.

> 
> >
> > Signed-off-by: Rob Hoelz <rob@hoelz.ro>
> > ---
> >  remote.c              |  2 +-
> >  t/t5516-fetch-push.sh | 20 ++++++++++++++++++++
> >  2 files changed, 21 insertions(+), 1 deletion(-)
> >
> > diff --git a/remote.c b/remote.c
> > index ca1f8f2..de7a915 100644
> > --- a/remote.c
> > +++ b/remote.c
> > @@ -465,7 +465,7 @@ static void alias_all_urls(void)
> >  		if (!remotes[i])
> >  			continue;
> >  		for (j = 0; j < remotes[i]->pushurl_nr; j++) {
> > -			remotes[i]->pushurl[j] =
> > alias_url(remotes[i]->pushurl[j], &rewrites);
> > +			remotes[i]->pushurl[j] =
> > alias_url(remotes[i]->pushurl[j], &rewrites_push); }
> >  		add_pushurl_aliases = remotes[i]->pushurl_nr == 0;
> >  		for (j = 0; j < remotes[i]->url_nr; j++) {
> > diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
> > index b5417cc..272e225 100755
> > --- a/t/t5516-fetch-push.sh
> > +++ b/t/t5516-fetch-push.sh
> > @@ -244,6 +244,26 @@ test_expect_success 'push with pushInsteadOf
> > and explicit pushurl (pushInsteadOf )
> >  '
> >  
> > +test_expect_success 'push with pushInsteadOf and explicit pushurl
> > (pushInsteadOf does rewrite in this case)' '
> > +	mk_empty &&
> > +	TRASH="$(pwd)/" &&
> > +	mkdir ro &&
> > +	mkdir rw &&
> > +	git init --bare rw/testrepo &&
> > +	git config "url.file://$TRASH/ro/.insteadOf" ro: &&
> > +	git config "url.file://$TRASH/rw/.pushInsteadOf" rw: &&
> > +	git config remote.r.url ro:wrong &&
> > +	git config remote.r.pushurl rw:testrepo &&
> > +	git push r refs/heads/master:refs/remotes/origin/master &&
> > +	(
> > +		cd rw/testrepo &&
> > +		r=$(git show-ref -s --verify
> > refs/remotes/origin/master) &&
> > +		test "z$r" = "z$the_commit" &&
> > +
> > +		test 1 = $(git for-each-ref refs/remotes/origin |
> > wc -l)
> > +	)
> > +'
> > +
> >  test_expect_success 'push with matching heads' '
> >  
> >  	mk_test heads/master &&
> 

^ permalink raw reply

* [PATCH] push: Alias pushurl from push rewrites
From: Rob Hoelz @ 2013-03-18 21:02 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, josh

git push currently doesn't consider pushInsteadOf when
using pushurl; this test tests that.

If you use pushurl with an alias that has a pushInsteadOf configuration
value, Git does not take advantage of it.  For example:

[url "git://github.com/"]
    insteadOf = github:
[url "git://github.com/myuser/"]
    insteadOf = mygithub:
[url "git@github.com:myuser/"]
    pushInsteadOf = mygithub:
[remote "origin"]
    url     = github:organization/project
    pushurl = mygithub:project

With the above configuration, the following occurs:

$ git push origin master
fatal: remote error:
  You can't push to git://github.com/myuser/project.git
  Use git@github.com:myuser/project.git

So you can see that pushurl is being followed (it's not attempting to
push to git://github.com/organization/project), but insteadOf values are
being used as opposed to pushInsteadOf values for expanding the pushurl
alias.

This commit fixes that.

Signed-off-by: Rob Hoelz <rob@hoelz.ro>
---
 remote.c              |  2 +-
 t/t5516-fetch-push.sh | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/remote.c b/remote.c
index ca1f8f2..de7a915 100644
--- a/remote.c
+++ b/remote.c
@@ -465,7 +465,7 @@ static void alias_all_urls(void)
 		if (!remotes[i])
 			continue;
 		for (j = 0; j < remotes[i]->pushurl_nr; j++) {
-			remotes[i]->pushurl[j] = alias_url(remotes[i]->pushurl[j], &rewrites);
+			remotes[i]->pushurl[j] = alias_url(remotes[i]->pushurl[j], &rewrites_push);
 		}
 		add_pushurl_aliases = remotes[i]->pushurl_nr == 0;
 		for (j = 0; j < remotes[i]->url_nr; j++) {
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index b5417cc..709f506 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -244,6 +244,87 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf
 	)
 '
 
+test_expect_success 'push with pushInsteadOf and explicit pushurl (pushurl + pushInsteadOf does rewrite in this case)' '
+	mk_empty &&
+	rm -rf ro rw &&
+	TRASH="$(pwd)/" &&
+	mkdir ro &&
+	mkdir rw &&
+	git init --bare rw/testrepo &&
+	git config "url.file://$TRASH/ro/.insteadOf" ro: &&
+	git config "url.file://$TRASH/rw/.pushInsteadOf" rw: &&
+	git config remote.r.url ro:wrong &&
+	git config remote.r.pushurl rw:testrepo &&
+	git push r refs/heads/master:refs/remotes/origin/master &&
+	(
+		cd rw/testrepo &&
+		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
+		test "z$r" = "z$the_commit" &&
+
+		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+	)
+'
+
+test_expect_success 'push without pushInsteadOf and explicit pushurl (pushurl + insteadOf is used for rewrite)' '
+	mk_empty &&
+	rm -rf ro rw &&
+	TRASH="$(pwd)/" &&
+	mkdir ro &&
+	mkdir rw &&
+	git init --bare rw/testrepo &&
+	git config "url.file://$TRASH/ro/.insteadOf" ro: &&
+	git config "url.file://$TRASH/rw/.insteadOf" rw: &&
+	git config remote.r.url ro:wrong &&
+	git config remote.r.pushurl rw:testrepo &&
+	git push r refs/heads/master:refs/remotes/origin/master &&
+	(
+		cd rw/testrepo &&
+		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
+		test "z$r" = "z$the_commit" &&
+
+		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+	)
+'
+
+test_expect_success 'push with pushInsteadOf but without explicit pushurl (url + pushInsteadOf is used for rewrite)' '
+	mk_empty &&
+	rm -rf ro rw &&
+	TRASH="$(pwd)/" &&
+	mkdir ro &&
+	mkdir rw &&
+	git init --bare rw/testrepo &&
+	git config "url.file://$TRASH/ro/.insteadOf" rw: &&
+	git config "url.file://$TRASH/rw/.pushInsteadOf" rw: &&
+	git config remote.r.url rw:testrepo &&
+	git push r refs/heads/master:refs/remotes/origin/master &&
+	(
+		cd rw/testrepo &&
+		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
+		test "z$r" = "z$the_commit" &&
+
+		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+	)
+'
+
+test_expect_success 'push without pushInsteadOf and without explicit pushurl (url + insteadOf is used for rewrite)' '
+	mk_empty &&
+	rm -rf ro rw &&
+	TRASH="$(pwd)/" &&
+	mkdir ro &&
+	mkdir rw &&
+	git init --bare rw/testrepo &&
+	git config "url.file://$TRASH/ro/.insteadOf" rw: &&
+	git config remote.r.url rw:testrepo &&
+	git push r refs/heads/master:refs/remotes/origin/master &&
+	(
+		cd rw/testrepo &&
+		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
+		test "z$r" = "z$the_commit" &&
+
+		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+	)
+'
+
 test_expect_success 'push with matching heads' '
 
 	mk_test heads/master &&
-- 
1.8.2

^ permalink raw reply related

* Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well
From: Jens Lehmann @ 2013-03-18 21:10 UTC (permalink / raw)
  To: Phil Hord
  Cc: Junio C Hamano, Eric Cousineau, Heiko Voigt, git@vger.kernel.org,
	Lars Hjemli
In-Reply-To: <CABURp0qBA6myf7_SuaxJSrePJHmh2v-nmtLRzKTtgAJxLkJ-tQ@mail.gmail.com>

Am 12.03.2013 17:01, schrieb Phil Hord:
> On Sat, Mar 9, 2013 at 1:18 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>> Am 05.03.2013 22:17, schrieb Phil Hord:
>>> On Tue, Mar 5, 2013 at 3:51 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>>> Am 05.03.2013 19:34, schrieb Junio C Hamano:
>>>>> Eric Cousineau <eacousineau@gmail.com> writes:
>>>>>> ...
>>>>> I am not entirely convinced we would want --include-super in the
>>>>> first place, though.  It does not belong to "submodule foreach";
>>>>> it is doing something _outside_ the submoudules.
>>>>
>>>> I totally agree with that. First, adding --include-super does not
>>>> belong into the --post-order patch at all, as that is a different
>>>> topic (even though it belongs to the same use case Eric has). Also
>>>> the reason why we are thinking about adding the --post-order option
>>>> IMO cuts the other way for --include-super: It is so easy to do
>>>> that yourself I'm not convinced we should add an extra option to
>>>> foreach for that, especially as it has nothing to do with submodules.
>>>> So I think we should just drop --include-super.
>>>
>>> I agree it should not be part of this commit, but I've often found
>>> myself in need of an --include-super switch.   To me,
>>> git-submodule-foreach means "visit all my .git repos in this project
>>> and execute $cmd".  It's a pity that the super-project is considered a
>>> second-class citizen in this regard.
>>
>> Hmm, for me the super-project is a very natural second-class citizen
>> to "git *submodule* foreach". But also I understand that sometimes the
>> user wants to apply a command to superproject and submodules alike (I
>> just recently did exactly that with "git gc" on our build server).
>>
>>> I have to do this sometimes:
>>>
>>>    ${cmd} && git submodule foreach --recursive '${cmd}'
>>>
>>> I often forget the first part in scripts, though, and I've seen others
>>> do it too.  I usually create a function for it in git-heavy scripts.
>>>
>>> In a shell, it usually goes like this:
>>>
>>>    git submodule foreach --recursive '${cmd}'
>>>    <up><home><del>{30-ish}<end><backspace><enter>
>>>
>>> It'd be easier if I could just include a switch for this, and maybe
>>> even create an alias for it.  But maybe this is different command
>>> altogether.
>>
>> Are you sure you wouldn't forget to provide such a switch too? ;-)
> 
> No.  However, when I remember to add the switch, my shell history will
> remember it for me.  This does not happen naturally for me in the
> "<up><home><del>{30-ish}..." workflow.

I started to use '&&' in my daily shell work for exactly that reason:
that the bash history remembers groups of two or more commands for me.

> I also hope this switch grows up into a configuration option someday.
> Or maybe a completely different command, like I said before; because I
> actually think it could be dangerous as a configuration option since
> it would have drastic consequences for users executing scripts or
> commands in other users' environments.

I agree on the possible problems a configuration option introduces.

>> I'm still not convinced we should add a new switch, as it can easily
>> be achieved by adding "${cmd} &&" to your scripts. And on the command
>> line you could use an alias like this one to achieve that:
>>
>> [alias]
>>         recurse = !sh -c \"$@ && git submodule foreach --recursive $@\"
> 
> Yes, making the feature itself a 2nd-class citizen.  :-)
> 
> But this alias also denies me the benefit of the --post-order option.
> For 'git recurse git push', for example, I wouldn't want the
> superproject push to occur first; I would want it to occur last after
> the submodules have been successfully pushed.

[alias]
         recurse-post = !sh -c \"git submodule foreach --recursive --post-order $@ && $@\"
;-)

> I agree this should go in some other commit, but I do not think it is
> so trivial it should never be considered as a feature for git.  That's
> all I'm trying to say.

I am not against adding such a functionality to Git, I'm just not
convinced "git submodule foreach" is the right command for that. I
suspect the "git for-each-repo" Lars proposed earlier this year might
be a better choice, as that could also recurse into other repos which
aren't registered as submodules. And a "for-each-repo" to me looks
like a command which could include the superproject too (at least when
told to do so with an option).

^ permalink raw reply

* What's cooking in git.git (Mar 2013, #05; Mon, 18)
From: Junio C Hamano @ 2013-03-18 21:19 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.

We have been scheduling each cycle to last 8-10 weeks, but at the
end of 1.8.2 cycle we already have quite a many topics in flight.  I
am wondering we should cut this cycle a bit short by tagging -rc0
soon after we have those we already have been cooking graduated to
'master' (we already have 200 non-merge commits on 'next').

This issue of "What's cooking" classifies the topics in flight into
three categories: Trivially Safe, Safe and Risky.  "Risky" does not
mean the topic is with known breakages, but just that my gut feeling
tells it would not be surprising if there were unintended
consequences, either these topics touch fairly deep part of the
codepath, their design may not match some obscure but still valid
use cases, or for some other unforeseen reason.  Feeding this
message to "cook -w" (found in 'todo' branch) script may make the
overall picture easier to review.

The tip of 'next' hasn't been rewound yet, but it soon will.

You can find the changes described here in the integration branches
of the repositories listed at

    http://git-blame.blogspot.com/p/git-public-repositories.html

--------------------------------------------------
[New Topics]

* ap/combine-diff-ignore-whitespace (2013-03-14) 1 commit
  (merged to 'next' on 2013-03-18 at 32435a6)
 + Allow combined diff to ignore white-spaces

 Teach "diff --cc" output to honor options to ignore various forms
 of whitespace changes.

 Will merge to 'master' in the 4th batch (Safe).


* jk/checkout-attribute-lookup (2013-03-14) 2 commits
  (merged to 'next' on 2013-03-15 at 28bd515)
 + entry: fix filter lookup
 + t2003: modernize style

 Codepath to stream blob object contents directly from the object
 store to filesystem did not use the correct path to find conversion
 filters when writing to temporary files.

 Will merge to 'master' in the 4th batch (Safe).


* jk/difftool-dir-diff-edit-fix (2013-03-14) 3 commits
  (merged to 'next' on 2013-03-15 at add7b77)
 + difftool --dir-diff: symlink all files matching the working tree
 + difftool: avoid double slashes in symlink targets
 + git-difftool(1): fix formatting of --symlink description

 "git difftool --dir-diff" made symlinks to working tree files when
 preparing a temporary directory structure, so that accidental edits
 of these files in the difftool are reflected back to the working
 tree, but the logic to decide when to do so was not quite right.

 Will merge to 'master' in the 4th batch (Safe).


* lf/setup-prefix-pathspec (2013-03-14) 2 commits
  (merged to 'next' on 2013-03-14 at 7552204)
 + setup.c: check that the pathspec magic ends with ")"
 + setup.c: stop prefix_pathspec() from looping past the end of string

 Rerolls aw/setup-prefix-pathspec.

 Will merge to 'master' in the 3rd batch (Safe).


* tb/document-status-u-tradeoff (2013-03-16) 2 commits
  (merged to 'next' on 2013-03-18 at 2fc53b0)
 + status: advise to consider use of -u when read_directory takes too long
 + git status: document trade-offs in choosing parameters to the -u option

 Suggest users to look into using--untracked=no option when "git
 status" takes too long.

 Will merge to 'master' in the 2nd batch (Trivially Safe).


* jk/fully-peeled-packed-ref (2013-03-18) 4 commits
  (merged to 'next' on 2013-03-18 at cbcfa32)
 + pack-refs: add fully-peeled trait
 + pack-refs: write peeled entry for non-tags
 + use parse_object_or_die instead of die("bad object")
 + avoid segfaults on parse_object failure

 Not that we do not actively encourage having annotated tags outside
 refs/tags/ hierarchy, but they were not advertised correctly to the
 ls-remote and fetch with recent version of Git.

 Will merge to 'master' in the 3rd batch (Safe).


* jk/peel-ref (2013-03-16) 3 commits
  (merged to 'next' on 2013-03-18 at 77f0e4e)
 + upload-pack: load non-tip "want" objects from disk
 + upload-pack: make sure "want" objects are parsed
 + upload-pack: drop lookup-before-parse optimization

 Recent optimization broke shallow clones.

 Will merge to 'master' in the 3rd batch (Safe).


* nd/index-pack-l10n-buf-overflow (2013-03-16) 1 commit
  (merged to 'next' on 2013-03-18 at b7a4a8e)
 + index-pack: fix buffer overflow caused by translations

 Will merge to 'master' in the 2nd batch (Trivially Safe).


* nd/magic-pathspecs (2013-03-15) 45 commits
 - Rename field "raw" to "_raw" in struct pathspec
 - pathspec: support :(glob) syntax
 - pathspec: make --literal-pathspecs disable pathspec magic
 - pathspec: support :(literal) syntax for noglob pathspec
 - Kill limit_pathspec_to_literal() as it's only used by parse_pathspec()
 - parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN
 - parse_pathspec: make sure the prefix part is wildcard-free
 - tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
 - Remove match_pathspec() in favor of match_pathspec_depth()
 - Remove init_pathspec() in favor of parse_pathspec()
 - Remove diff_tree_{setup,release}_paths
 - Convert common_prefix() to use struct pathspec
 - Convert add_files_to_cache to take struct pathspec
 - Convert {read,fill}_directory to take struct pathspec
 - Convert refresh_index to take struct pathspec
 - Convert report_path_error to take struct pathspec
 - checkout: convert read_tree_some to take struct pathspec
 - Convert unmerge_cache to take struct pathspec
 - Convert run_add_interactive to use struct pathspec
 - Convert read_cache_preload() to take struct pathspec
 - reset: convert to use parse_pathspec
 - add: convert to use parse_pathspec
 - check-ignore: convert to use parse_pathspec
 - archive: convert to use parse_pathspec
 - ls-files: convert to use parse_pathspec
 - rm: convert to use parse_pathspec
 - checkout: convert to use parse_pathspec
 - rerere: convert to use parse_pathspec
 - status: convert to use parse_pathspec
 - commit: convert to use parse_pathspec
 - clean: convert to use parse_pathspec
 - Guard against new pathspec magic in pathspec matching code
 - parse_pathspec: support prefixing original patterns
 - parse_pathspec: support stripping/checking submodule paths
 - parse_pathspec: support stripping submodule trailing slashes
 - parse_pathspec: a special flag for max_depth feature
 - Convert some get_pathspec() calls to parse_pathspec()
 - parse_pathspec: add PATHSPEC_PREFER_{CWD,FULL}
 - parse_pathspec: save original pathspec for reporting
 - Add parse_pathspec() that converts cmdline args to struct pathspec
 - pathspec: add copy_pathspec
 - pathspec: i18n-ize error strings in pathspec parsing code
 - Move struct pathspec and related functions to pathspec.[ch]
 - clean: remove unused variable "seen"
 - setup.c: check that the pathspec magic ends with ")"

 Migrate the rest of codebase to use "struct pathspec" more.

 Expecting a reroll, but this is overall going in the right direction.
 $gmane/218385


* nd/preallocate-hash (2013-03-16) 1 commit
  (merged to 'next' on 2013-03-18 at 0b928c5)
 + Preallocate hash tables when the number of inserts are known in advance

 When we know approximately how many entries we will have in the
 hash-table, it makes sense to size the hash table to that number
 from the beginning to avoid unnecessary rehashing.

 Will merge to 'master' in the 2nd batch (Trivially Safe).


* pe/pull-rebase-v-q (2013-03-16) 1 commit
  (merged to 'next' on 2013-03-18 at 8e17883)
 + pull: Apply -q and -v options to rebase mode as well

 Will merge to 'master' in the 2nd batch (Safe).


* rs/archive-zip-raw-compression (2013-03-16) 1 commit
  (merged to 'next' on 2013-03-18 at 229897a)
 + archive-zip: use deflateInit2() to ask for raw compressed data
 (this branch uses rs/zip-compresssed-size-with-export-subst.)

 Will merge to 'master' in the 4th batch (Safe).


* jk/fast-export-object-lookup (2013-03-17) 2 commits
  (merged to 'next' on 2013-03-18 at 98c436d)
 + fast-export: do not load blob objects twice
 + fast-export: rename handle_object function

 Will merge to 'master' in the 3rd batch (Safe).


* sw/safe-create-leading-dir-race (2013-03-17) 2 commits
 - SQUASH???
 - safe_create_leading_directories: fix race that could give a false negative

 Waiting for response to review comments.

--------------------------------------------------
[Stalled]

* po/help-guides (2013-03-03) 5 commits
 - help doc: include --guide option description
 - help.c: add list_common_guides_help() function
 - help.c: add --guide option
 - help.c: use OPT_COUNTUP
 - show 'git help <guide>' usage, with examples

 Give more visibility to "concept guides" to help "git help" users.

 Expecting a reroll.
 $gmane/217384


* hv/config-from-strbuf (2013-03-10) 4 commits
 - teach config parsing to read from strbuf
 - config: make parsing stack struct independent from actual data source
 - config: drop file pointer validity check in get_next_char()
 - config: factor out config file stack management

 Expecting a reroll.
 $gmane/217811


* mb/gitweb-highlight-link-target (2012-12-20) 1 commit
 - Highlight the link target line in Gitweb using CSS

 Expecting a reroll.
 $gmane/211935


* mb/remote-default-nn-origin (2012-07-11) 6 commits
 - Teach get_default_remote to respect remote.default.
 - Test that plain "git fetch" uses remote.default when on a detached HEAD.
 - Teach clone to set remote.default.
 - Teach "git remote" about remote.default.
 - Teach remote.c about the remote.default configuration setting.
 - Rename remote.c's default_remote_name static variables.

 When the user does not specify what remote to interact with, we
 often attempt to use 'origin'.  This can now be customized via a
 configuration variable.

 Expecting a reroll.
 $gmane/210151

 "The first remote becomes the default" bit is better done as a
 separate step.

--------------------------------------------------
[Cooking]

* ph/tag-force-no-warn-on-creation (2013-03-13) 1 commit
  (merged to 'next' on 2013-03-14 at 809e9ae)
 + tag: --force does not have to warn when creating tags

 Will merge to 'master' in the 3rd batch (Safe).


* nd/branch-show-rebase-bisect-state (2013-03-16) 6 commits
  (merged to 'next' on 2013-03-18 at 4a46064)
 + branch: show more information when HEAD is detached
 + status: show more info than "currently not on any branch"
 + wt-status: move wt_status_get_state() out to wt_status_print()
 + wt-status: split wt_status_state parsing function out
 + wt-status: move strbuf into read_and_strip_branch()
 + Merge branch 'jc/reflog-reverse-walk' into nd/branch-show-rebase-bisect-state
 (this branch uses jc/reflog-reverse-walk.)

 Will merge to 'master' in the 4th batch (Safe).


* kb/p4merge (2013-03-13) 2 commits
  (merged to 'next' on 2013-03-14 at 6d390d4)
 + mergetools/p4merge: create a base if none available
 + mergetools/p4merge: swap LOCAL and REMOTE

 Adjust the order mergetools feeds the files to the p4merge backend
 to match the p4 convention.

 Will merge to 'master' in the 3rd batch (Safe).


* jc/maint-push-refspec-default-doc (2013-03-08) 1 commit
  (merged to 'next' on 2013-03-14 at 912eb14)
 + Documentation/git-push: clarify the description of defaults

 Clarify in the documentation "what" gets pushed to "where" when the
 command line to "git push" does not say these explicitly.

 Will merge to 'master' in the 2nd batch (Trivially Safe).


* jc/reflog-reverse-walk (2013-03-08) 3 commits
  (merged to 'next' on 2013-03-14 at 3f2ed32)
 + reflog: add for_each_reflog_ent_reverse() API
 + for_each_recent_reflog_ent(): simplify opening of a reflog file
 + for_each_reflog_ent(): extract a helper to process a single entry
 (this branch is used by nd/branch-show-rebase-bisect-state.)

 An internal function used to implement "git checkout @{-1}" was
 hard to use correctly.

 Will merge to 'master' in the 3rd batch (Safe).


* jk/alias-in-bare (2013-03-08) 3 commits
  (merged to 'next' on 2013-03-09 at 2f9d72a)
 + setup: suppress implicit "." work-tree for bare repos
 + environment: add GIT_PREFIX to local_repo_env
 + cache.h: drop LOCAL_REPO_ENV_SIZE

 An aliased command spawned from a bare repository that does not say
 it is bare with "core.bare = yes" is treated as non-bare by mistake.

 Will merge to 'master' in the 3rd batch (Safe).


* pw/p4-symlinked-root (2013-03-11) 3 commits
  (merged to 'next' on 2013-03-12 at 559b926)
 + git p4: avoid expanding client paths in chdir
 + git p4 test: should honor symlink in p4 client root
 + git p4 test: make sure P4CONFIG relative path works

 Will merge to 'master' in the 3rd batch (Safe).


* jc/add-2.0-delete-default (2013-03-08) 3 commits
  (merged to 'next' on 2013-03-14 at 4684748)
 + git add <pathspec>... defaults to "-A"
  (merged to 'next' on 2013-03-14 at 2b7a7a2)
 + git add: start preparing for "git add <pathspec>..." to default to "-A"
 + builtin/add.c: simplify boolean variables

 "git add dir/" updated modified files and added new files, but does
 not notice removed files, which may be "Huh?" to some users.  They
 can of course use "git add -A dir/", but why should they?

 There seemed to be some interest in this topic, so resurrected and
 rebased on top of recent documentation updates to propose a
 possible transition plan.

 Will cook in 'next' until Git 2.0.


* jc/add-2.0-u-A-sans-pathspec (2013-03-14) 2 commits
  (merged to 'next' on 2013-03-14 at 9538716)
 + git add: -u/-A now affects the entire working tree
 + t2200: check that "add -u" limits itself to subdirectory

 "git add -u/-A" without pathspec has traditonally limited its
 operation to the current directory and its subdirectories, but in
 Git 1.8.2 we started encouraging users to be more explicit to
 specify "." when they mean it (and use ":/" to make it affect the
 entire working tree).  With this, we finally change the behaviour
 and make it affect the entire working tree in Git 2.0.

 Will cook in 'next' until Git 2.0.


* jk/empty-archive (2013-03-10) 2 commits
  (merged to 'next' on 2013-03-12 at 942e592)
 + archive: handle commits with an empty tree
 + test-lib: factor out $GIT_UNZIP setup

 "git archive" reports a failure when asked to create an archive out
 of an empty tree.  It would be more intuitive to give an empty
 archive back in such a case.

 Will merge to 'master' in the 3rd batch (Safe).


* jk/graph-c-expose-symbols-for-cgit (2013-03-03) 1 commit
  (merged to 'next' on 2013-03-04 at be35b12)
 + Revert "graph.c: mark private file-scope symbols as static"

 In the v1.8.0 era, we changed symbols that do not have to be global
 to file scope static, but a few functions in graph.c were used by
 CGit from sideways bypassing the entry points of the API the
 in-tree users use.

 Will merge to 'master' in the 1st batch (Trivially Safe).


* we/submodule-update-prefix-output (2013-03-03) 1 commit
  (merged to 'next' on 2013-03-04 at 908df73)
 + submodule update: when using recursion, show full path

 Will merge to 'master' in the 2nd batch (Safe).


* jc/nobody-sets-src-peer-ref (2013-03-04) 1 commit
  (merged to 'next' on 2013-03-07 at 1910e21)
 + match_push_refs(): nobody sets src->peer_ref anymore

 Dead code removal.

 Even though I think this change is correct, please report
 immediately if you find any unintended side effect.

 Will merge to 'master' in the 4th batch (Risky).


* jc/push-follow-tag (2013-03-05) 4 commits
  (merged to 'next' on 2013-03-09 at 748fbed)
 + push: --follow-tags
 + commit.c: use clear_commit_marks_many() in in_merge_bases_many()
 + commit.c: add in_merge_bases_many()
 + commit.c: add clear_commit_marks_many()

 The new "--follow-tags" option tells "git push" to push relevant
 annotated tags when pushing branches out.

 Will merge to 'master' in the 3rd batch (Safe).


* jc/maint-reflog-expire-clean-mark-typofix (2013-03-05) 1 commit
  (merged to 'next' on 2013-03-07 at 0a61cbb)
 + reflog: fix typo in "reflog expire" clean-up codepath

 Will merge to 'master' in the 3rd batch (Safe).


* lf/bundle-verify-list-prereqs (2013-03-08) 2 commits
  (merged to 'next' on 2013-03-08 at 9e55d6d)
 + bundle: Add colons to list headings in "verify"
 + bundle: Fix "verify" output if history is complete

 Will merge to 'master' in the 1st batch (Trivially Safe).


* ks/rfc2047-one-char-at-a-time (2013-03-09) 1 commit
  (merged to 'next' on 2013-03-09 at a12465e)
 + format-patch: RFC 2047 says multi-octet character may not be split

 When "format-patch" quoted a non-ascii strings on the header files,
 it incorrectly applied rfc2047 and chopped a single character in
 the middle of it.

 Will merge to 'master' in the 3rd batch (Safe).


* kb/name-hash (2013-02-27) 1 commit
  (merged to 'next' on 2013-03-05 at 7f7e5d4)
 + name-hash.c: fix endless loop with core.ignorecase=true

 The code to keep track of what directory names are known to Git on
 platforms with case insensitive filesystems can get confused upon
 a hash collision between these pathnames and looped forever.

 Even though I think this change is correct, please report
 immediately if you find any unintended side effect.

 Will merge to 'master' in the 4th batch (Risky).


* rs/zip-compresssed-size-with-export-subst (2013-02-27) 1 commit
  (merged to 'next' on 2013-03-03 at c1ac6d8)
 + archive-zip: fix compressed size for stored export-subst files
 (this branch is used by rs/archive-zip-raw-compression.)

 When export-subst is used, "zip" output recorded incorrect
 size of the file.

 Will merge to 'master' in the 2nd batch (Safe).


* jc/describe (2013-02-28) 1 commit
  (merged to 'next' on 2013-03-05 at 6b353f3)
 + describe: --match=<pattern> must limit the refs even when used with --all

 The "--match=<pattern>" option of "git describe", when used with
 "--all" to allow refs that are not annotated tags to be used as a
 base of description, did not restrict the output from the command
 to those that match the given pattern.

 We may want to have a looser matching that does not restrict to tags,
 but that can be done as a follow-up topic; this step is purely a bugfix.

 Will merge to 'master' in the 3rd batch (Safe).


* jk/mailsplit-maildir-muttsort (2013-03-02) 1 commit
  (merged to 'next' on 2013-03-03 at d5f7735)
 + mailsplit: sort maildir filenames more cleverly

 Will merge to 'master' in the 2nd batch (Safe).


* tr/line-log (2013-02-28) 5 commits
 . log -L: :pattern:file syntax to find by funcname
 . Implement line-history search (git log -L)
 . Export rewrite_parents() for 'log -L'
 . blame: introduce $ as "end of file" in -L syntax
 . Refactor parse_loc

 Expecting a reroll.
 $gmane/217278

 Kept outside 'pu' for now as it collides with nd/magic-pathspecs.


* jc/perl-cat-blob (2013-02-22) 1 commit
  (merged to 'next' on 2013-02-25 at 7c0079a)
 + Git.pm: fix cat_blob crashes on large files

 perl/Git.pm::cat_blob slurped everything in core only to write it
 out to a file descriptor, which was not a very smart thing to do.

 Will merge to 'master' in the 2nd batch (Safe).


* nd/doc-index-format (2013-02-23) 3 commits
  (merged to 'next' on 2013-02-26 at 4d3caea)
 + update-index: list supported idx versions and their features
 + read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
 + index-format.txt: mention of v4 is missing in some places

 Update the index format documentation to mention the v4 format.

 Will merge to 'master' in the 1st batch (Trivially Safe).


* ap/maint-diff-rename-avoid-overlap (2013-03-06) 3 commits
  (merged to 'next' on 2013-03-06 at 3bc8dda)
 + tests: make sure rename pretty print works
  (merged to 'next' on 2013-02-26 at 19d70bf)
 + diff: prevent pprint_rename from underrunning input
  (merged to 'next' on 2013-02-25 at c9bd6d3)
 + diff: Fix rename pretty-print when suffix and prefix overlap

 The logic used by "git diff -M --stat" to shorten the names of
 files before and after a rename did not work correctly when the
 common prefix and suffix between the two filenames overlapped.

 Will merge to 'master' in the 3rd batch (Safe).


* ap/maint-update-index-h-is-for-help (2013-02-23) 1 commit
  (merged to 'next' on 2013-02-25 at f5f767c)
 + update-index: allow "-h" to also display options

 Will merge to 'master' in the 2nd batch (Safe).


* jc/color-diff-doc (2013-02-22) 1 commit
  (merged to 'next' on 2013-02-25 at c37541c)
 + diff-options: unconfuse description of --color

 Will merge to 'master' in the 1st batch (Trivially Safe).


* nd/branch-error-cases (2013-02-23) 1 commit
  (merged to 'next' on 2013-02-25 at 1d0289f)
 + branch: segfault fixes and validation

 "git branch" had more cases where it did not bother to check
 nonsense command line parameters.

 Will merge to 'master' in the 2nd batch (Safe).


* rt/commit-cleanup-config (2013-02-23) 1 commit
  (merged to 'next' on 2013-02-25 at 8249b61)
 + t7502: perform commits using alternate editor in a subshell

 Fix tests that contaminated their environments and affected new
 tests introduced later in the sequence by containing their effects
 in their own subshells.

 Will merge to 'master' in the 2nd batch (Safe).


* wk/doc-pre-rebase (2013-02-24) 1 commit
  (merged to 'next' on 2013-02-25 at a6ec310)
 + Documentation/githooks: Explain pre-rebase parameters

 Will merge to 'master' in the 1st batch (Trivially Safe).


* da/downcase-u-in-usage (2013-02-24) 20 commits
  (merged to 'next' on 2013-02-26 at 977b67e)
 + contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string
 + contrib/examples/git-remote.perl: use a lowercase "usage:" string
 + tests: use a lowercase "usage:" string
 + git-svn: use a lowercase "usage:" string
 + Documentation/user-manual.txt: use a lowercase "usage:" string
 + templates/hooks--update.sample: use a lowercase "usage:" string
 + contrib/hooks/setgitperms.perl: use a lowercase "usage:" string
 + contrib/examples: use a lowercase "usage:" string
 + contrib/fast-import/import-zips.py: use spaces instead of tabs
 + contrib/fast-import/import-zips.py: fix broken error message
 + contrib/fast-import: use a lowercase "usage:" string
 + contrib/credential: use a lowercase "usage:" string
 + git-cvsimport: use a lowercase "usage:" string
 + git-cvsimport: use a lowercase "usage:" string
 + git-cvsexportcommit: use a lowercase "usage:" string
 + git-archimport: use a lowercase "usage:" string
 + git-merge-one-file: use a lowercase "usage:" string
 + git-relink: use a lowercase "usage:" string
 + git-svn: use a lowercase "usage:" string
 + git-sh-setup: use a lowercase "usage:" string

 Will merge to 'master' in the 1st batch (Trivially Safe).


* dm/ni-maxhost-may-be-missing (2013-02-25) 1 commit
  (merged to 'next' on 2013-02-26 at 93ec2c9)
 + git-compat-util.h: Provide missing netdb.h definitions

 Will merge to 'master' in the 1st batch (Trivially Safe).


* gp/avoid-explicit-mention-of-dot-git-refs (2013-02-24) 1 commit
  (merged to 'next' on 2013-02-26 at ec42d98)
 + Fix ".git/refs" stragglers

 Will merge to 'master' in the 1st batch (Trivially Safe).


* gp/describe-match-uses-glob-pattern (2013-02-24) 1 commit
  (merged to 'next' on 2013-02-26 at c9cc789)
 + describe: Document --match pattern format
 (this branch is used by gp/forbid-describe-all-match.)

 Will merge to 'master' in the 1st batch (Trivially Safe).


* jk/common-make-variables-export-safety (2013-02-25) 1 commit
  (merged to 'next' on 2013-03-05 at 084ae43)
 + Makefile: make mandir, htmldir and infodir absolute

 Make the three variables safer to be exported to submakes by
 ensuring that they are full paths so that they can be used as
 installation location.

 Even though I think this change is correct, please report
 immediately if you find any unintended side effect.

 Will merge to 'master' in the 4th batch (Risky).


* jk/suppress-clang-warning (2013-02-25) 1 commit
  (merged to 'next' on 2013-03-14 at f30489a)
 + fix clang -Wtautological-compare with unsigned enum

 Will merge to 'master' in the 3rd batch (Safe).


* mg/qnx6 (2013-02-25) 1 commit
 - QNX: newer QNX 6.x.x is not so crippled

 Still under discussion.
 Not ready for inclusion.


* mg/unsigned-time-t (2013-02-25) 2 commits
  (merged to 'next' on 2013-03-14 at 815f297)
 + Fix time offset calculation in case of unsigned time_t
 + date.c: fix unsigned time_t comparison

 A few workarounds for systems with unsigned time_t.

 Will merge to 'master' in the 3rd batch (Safe).


* rj/msvc-build (2013-02-25) 5 commits
  (merged to 'next' on 2013-02-26 at 7493068)
 + msvc: avoid collisions between "tags" and "TAGS"
 + msvc: test-svn-fe: Fix linker "unresolved external" error
 + msvc: Fix build by adding missing symbol defines
 + msvc: git-daemon: Fix linker "unresolved external" errors
 + msvc: Fix compilation errors caused by poll.h emulation

 Will merge to 'master' in the 1st batch (Trivially Safe).


* wk/user-manual-literal-format (2013-02-25) 1 commit
  (merged to 'next' on 2013-02-26 at d59ce38)
 + user-manual: Standardize backtick quoting

 Will merge to 'master' in the 1st batch (Trivially Safe).


* jk/utf-8-can-be-spelled-differently (2013-02-25) 1 commit
  (merged to 'next' on 2013-02-26 at c079525)
 + utf8: accept alternate spellings of UTF-8

 Will merge to 'master' in the 2nd batch (Safe).


* jk/pkt-line-cleanup (2013-02-24) 19 commits
  (merged to 'next' on 2013-02-25 at d83e970)
 + remote-curl: always parse incoming refs
 + remote-curl: move ref-parsing code up in file
 + remote-curl: pass buffer straight to get_remote_heads
 + teach get_remote_heads to read from a memory buffer
 + pkt-line: share buffer/descriptor reading implementation
 + pkt-line: provide a LARGE_PACKET_MAX static buffer
 + pkt-line: move LARGE_PACKET_MAX definition from sideband
 + pkt-line: teach packet_read_line to chomp newlines
 + pkt-line: provide a generic reading function with options
 + pkt-line: drop safe_write function
 + pkt-line: move a misplaced comment
 + write_or_die: raise SIGPIPE when we get EPIPE
 + upload-archive: use argv_array to store client arguments
 + upload-archive: do not copy repo name
 + send-pack: prefer prefixcmp over memcmp in receive_status
 + fetch-pack: fix out-of-bounds buffer offset in get_ack
 + upload-pack: remove packet debugging harness
 + upload-pack: do not add duplicate objects to shallow list
 + upload-pack: use get_sha1_hex to parse "shallow" lines

 Cleans up pkt-line API, implementation and its callers to make them
 more robust.  Even though I think this change is correct, please
 report immediately if you find any unintended side effect.

 Will merge to 'master' in the 3rd batch (Risky).


* ob/imap-send-ssl-verify (2013-02-20) 1 commit
  (merged to 'next' on 2013-02-25 at e897609)
 + imap-send: support Server Name Indication (RFC4366)

 Correctly connect to SSL/TLS sites that serve multiple hostnames on
 a single IP by including Server Name Indication in the client-hello.

 Will merge to 'master' in the 2nd batch (Safe).


* jc/format-patch (2013-02-21) 2 commits
 - format-patch: --inline-single
 - format-patch: rename "no_inline" field

 A new option to send a single patch to the standard output to be
 appended at the bottom of a message.  I personally have no need for
 this, but it was easy enough to cobble together.  Tests, docs and
 stripping out more MIMEy stuff are left as exercises to interested
 parties.

 Not ready for inclusion.


* tk/doc-filter-branch (2013-02-26) 2 commits
  (merged to 'next' on 2013-02-26 at bd4638b)
 + Documentation: filter-branch env-filter example
 + git-filter-branch.txt: clarify ident variables usage

 Will merge to 'master' in the 1st batch (Trivially Safe).


* bc/commit-complete-lines-given-via-m-option (2013-02-19) 4 commits
  (merged to 'next' on 2013-02-19 at cf622b7)
 + Documentation/git-commit.txt: rework the --cleanup section
 + git-commit: only append a newline to -m mesg if necessary
 + t7502: demonstrate breakage with a commit message with trailing newlines
 + t/t7502: compare entire commit message with what was expected

 'git commit -m "$str"' when $str was already terminated with a LF
 now avoids adding an extra LF to the message.

 Will merge to 'master' in the 2nd batch (Safe).


* da/difftool-fixes (2013-02-21) 4 commits
  (merged to 'next' on 2013-02-25 at 687db1f)
 + t7800: "defaults" is no longer a builtin tool name
 + t7800: modernize tests
 + t7800: update copyright notice
 + difftool: silence uninitialized variable warning

 Minor maintenance updates to difftool, and updates to its tests.

 Will merge to 'master' in the 2nd batch (Safe).


* nd/read-directory-recursive-optim (2013-02-17) 1 commit
  (merged to 'next' on 2013-02-17 at 36ba9f4)
 + read_directory: avoid invoking exclude machinery on tracked files

 "git status" has been optimized by taking advantage of the fact
 that paths that are already known to the index do not have to be
 checked against the .gitignore mechanism under some conditions.
 Even though I think this change is correct, please report
 immediately if you find any unintended side effect.

 Will merge to 'master' in the 2nd batch (Risky).


* mg/gpg-interface-using-status (2013-02-14) 5 commits
  (merged to 'next' on 2013-02-26 at 93f0e72)
 + pretty: make %GK output the signing key for signed commits
 + pretty: parse the gpg status lines rather than the output
 + gpg_interface: allow to request status return
 + log-tree: rely upon the check in the gpg_interface
 + gpg-interface: check good signature in a reliable way

 Call "gpg" using the right API when validating the signature on
 tags.

 Will merge to 'master' in the 2nd batch (Safe).


* jn/shell-disable-interactive (2013-03-09) 2 commits
  (merged to 'next' on 2013-03-14 at 3121f9f)
 + shell: new no-interactive-login command to print a custom message
 + shell doc: emphasize purpose and security model

 Will merge to 'master' in the 2nd batch (Trivially Safe).


* jc/fetch-raw-sha1 (2013-02-07) 4 commits
  (merged to 'next' on 2013-02-14 at ffa3c65)
 + fetch: fetch objects by their exact SHA-1 object names
 + upload-pack: optionally allow fetching from the tips of hidden refs
 + fetch: use struct ref to represent refs to be fetched
 + parse_fetch_refspec(): clarify the codeflow a bit

 Allows requests to fetch objects at any tip of refs (including
 hidden ones).  It seems that there may be use cases even outside
 Gerrit (e.g. $gmane/215701).

 Will merge to 'master' in the 2nd batch (Safe).


* mn/send-email-works-with-credential (2013-02-27) 6 commits
  (merged to 'next' on 2013-02-27 at ee7ae0e)
 + git-send-email: use git credential to obtain password
 + Git.pm: add interface for git credential command
 + Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
 + Git.pm: refactor command_close_bidi_pipe to use _cmd_close
 + Git.pm: fix example in command_close_bidi_pipe documentation
 + Git.pm: allow command_close_bidi_pipe to be called as method

 Hooks the credential system to send-email.

 Will merge to 'master' in the 2nd batch (Safe).


* nd/count-garbage (2013-02-15) 4 commits
  (merged to 'next' on 2013-02-17 at b2af923)
 + count-objects: report how much disk space taken by garbage files
 + count-objects: report garbage files in pack directory too
 + sha1_file: reorder code in prepare_packed_git_one()
 + git-count-objects.txt: describe each line in -v output

 Will merge to 'master' in the 2nd batch (Safe).


* tz/credential-authinfo (2013-02-25) 1 commit
  (merged to 'next' on 2013-02-27 at 7a261cb)
 + Add contrib/credentials/netrc with GPG support

 A new read-only credential helper (in contrib/) to interact with
 the .netrc/.authinfo files.  Hopefully mn/send-email-authinfo topic
 can rebuild on top of something like this.

 Will merge to 'master' in the 2nd batch (Safe).


* jl/submodule-deinit (2013-03-04) 1 commit
  (merged to 'next' on 2013-03-05 at 097164e)
 + submodule: add 'deinit' command

 There was no Porcelain way to say "I no longer am interested in
 this submodule", once you express your interest in a submodule with
 "submodule init".  "submodule deinit" is the way to do so.

 Will merge to 'master' in the 3rd batch (Safe).


* jc/remove-export-from-config-mak-in (2013-03-05) 3 commits
  (merged to 'next' on 2013-03-05 at abaa3cb)
 + Fix `make install` when configured with autoconf
  (merged to 'next' on 2013-02-12 at eb8af04)
 + Makefile: do not export mandir/htmldir/infodir
  (merged to 'next' on 2013-02-07 at 33f7d4f)
 + config.mak.in: remove unused definitions

 config.mak.in template had an "export" line to cause a few
 common makefile variables to be exported; if they need to be
 expoted for autoconf/configure users, they should also be exported
 for people who write config.mak the same way.  Move the "export" to
 the main Makefile.  Also, stop exporting mandir that used to be
 exported (only) when config.mak.autogen was used.  It would have
 broken installation of manpages (but not other documentation
 formats).

 Even though I think this change is correct, please report
 immediately if you find any unintended side effect.

 Will merge to 'master' in the 4th batch (Risky).


* jc/remove-treesame-parent-in-simplify-merges (2013-01-17) 1 commit
  (merged to 'next' on 2013-01-30 at b639b47)
 + simplify-merges: drop merge from irrelevant side branch

 The --simplify-merges logic did not cull irrelevant parents from a
 merge that is otherwise not interesting with respect to the paths
 we are following.

 This touches a fairly core part of the revision traversal
 infrastructure; even though I think this change is correct, please
 report immediately if you find any unintended side effect.

 Will merge to 'master' in the 2nd batch (Risky).


* jc/push-2.0-default-to-simple (2013-01-16) 14 commits
  (merged to 'next' on 2013-01-16 at 23f5df2)
 + t5570: do not assume the "matching" push is the default
 + t5551: do not assume the "matching" push is the default
 + t5550: do not assume the "matching" push is the default
  (merged to 'next' on 2013-01-09 at 74c3498)
 + doc: push.default is no longer "matching"
 + push: switch default from "matching" to "simple"
 + t9401: do not assume the "matching" push is the default
 + t9400: do not assume the "matching" push is the default
 + t7406: do not assume the "matching" push is the default
 + t5531: do not assume the "matching" push is the default
 + t5519: do not assume the "matching" push is the default
 + t5517: do not assume the "matching" push is the default
 + t5516: do not assume the "matching" push is the default
 + t5505: do not assume the "matching" push is the default
 + t5404: do not assume the "matching" push is the default

 Will cook in 'next' until Git 2.0.


* bc/append-signed-off-by (2013-02-23) 13 commits
  (merged to 'next' on 2013-02-25 at 32f7ac2)
 + git-commit: populate the edit buffer with 2 blank lines before s-o-b
 + Unify appending signoff in format-patch, commit and sequencer
 + format-patch: update append_signoff prototype
 + t4014: more tests about appending s-o-b lines
 + sequencer.c: teach append_signoff to avoid adding a duplicate newline
 + sequencer.c: teach append_signoff how to detect duplicate s-o-b
 + sequencer.c: always separate "(cherry picked from" from commit body
 + sequencer.c: require a conforming footer to be preceded by a blank line
 + sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
 + t/t3511: add some tests of 'cherry-pick -s' functionality
 + t/test-lib-functions.sh: allow to specify the tag name to test_commit
 + commit, cherry-pick -s: remove broken support for multiline rfc2822 fields
 + sequencer.c: rework search for start of footer to improve clarity

 Consolidates codepaths that inspect log-message-to-be and decide to
 add a new Signed-off-by line in various commands.  I think there is
 no negative behaviour change in this series, but please report any
 iffy behaviour change immediately if you notice one.

 Will merge to 'master' in the 3rd batch (Risky).

--------------------------------------------------
[Discarded]

* pc/subtree-add-before-fetch (2013-02-28) 1 commit
 . contrib/subtree: allow addition of remote branch with name not locally present

 I'll leave subtree updates to the area maintainer.


* gp/forbid-describe-all-match (2013-02-24) 1 commit
 . describe: make --all and --match=PATTERN mutually incompatible
 (this branch uses gp/describe-match-uses-glob-pattern.)

 jc/describe topic fixes the semantics of --match used with --all
 option.


* aw/setup-prefix-pathspec (2013-03-09) 2 commits
  (merged to 'next' on 2013-03-12 at 31a4a5e)
 + setup.c: check that the pathspec magic ends with ")"
 + setup.c: stop prefix_pathspec() from looping past the end of string

 "git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
 instead the parser kept reading beyond the end of the string.

 Replaced by lf/setup-prefix-pathspec.

^ permalink raw reply

* FW: Windows. Git, and Dedupe
From: Josh Rowe @ 2013-03-18 21:20 UTC (permalink / raw)
  To: git@vger.kernel.org

Windows probably isn’t the most popular platform for Git developers ☺, but here goes…

On Windows with an NTFS volume with Deduplication enabled, Git believes that deduplicated files are symlinks.  It then fails to be able to do anything with the file.  This can be repro-ed by creating an NTFS volume with dedup, creating some duplicate files, verifying that a few files are deduped, and trying to add and commit the files via git.

Jmr


^ permalink raw reply

* Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well
From: Jens Lehmann @ 2013-03-18 21:25 UTC (permalink / raw)
  To: Eric Cousineau
  Cc: Phil Hord, Junio C Hamano, Heiko Voigt, git@vger.kernel.org
In-Reply-To: <51416E9F.7000604@gmail.com>

Thanks, just a quick review before I find some time do take a
deeper look.

Am 14.03.2013 07:30, schrieb Eric Cousineau:
> From 59fb432e17a1aae9de26bbaaca7f09cc7f03b471 Mon Sep 17 00:00:00 2001
> From: Eric Cousineau <eacousineau@gmail.com>
> Date: Thu, 14 Mar 2013 01:19:53 -0500
> Subject: [PATCH] submodule-foreach: Added in --post-order=<command> per Jens
>  Lehmann's suggestion
> 
> Signed-off-by: Eric Cousineau <eacousineau@gmail.com>
> ---
> Made the scope of the patch only relate to --post-order.
> Would we want to rename this to just --post=<command> ?

Hmm, while having no strong preference on that, "post order"
looks more like the correct term describing what we do here.

> Anywho, here it is running in a test setup, where the structure is:
> a
> - b
> - - d
> - c
> 
> $ git submodule foreach --recursive --post-order 'echo Post $name' 'echo Pre $path'
> Entering 'b'
> Pre b
> Entering 'b/d'
> Pre d
> Entering 'b/d'
> Post d
> Entering 'b'
> Post b
> Entering 'c'
> Pre c
> Entering 'c'
> Post c

Looking good.

> An interesting note is that it fails with 'git submodule foreach --post-order', but not 'git submodule foreach --post-order=', since it simply interprets that as an empty command.
> If that is important, I could add in a check for $# when parsing the argument for --post-order=*.
> 
>  git-submodule.sh | 39 ++++++++++++++++++++++++++++++++++-----
>  1 file changed, 34 insertions(+), 5 deletions(-)
> 
> diff --git a/git-submodule.sh b/git-submodule.sh
> index 004c034..9b70bc2 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -10,7 +10,7 @@ USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <re
>     or: $dashless [--quiet] init [--] [<path>...]
>     or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
>     or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
> -   or: $dashless [--quiet] foreach [--recursive] <command>
> +   or: $dashless [--quiet] foreach [--recursive] [--post-order=<command>] <command>

Maybe drop the '=' from the description (see --reference for an example)?

>     or: $dashless [--quiet] sync [--recursive] [--] [<path>...]"
>  OPTIONS_SPEC=
>  . git-sh-setup
> @@ -434,6 +434,8 @@ Use -f if you really want to add it." >&2
>  cmd_foreach()
>  {
>      # parse $args after "submodule ... foreach".
> +    # Gratuitous (empty) local's to prevent recursive bleeding
> +    local recursive= post_order=

Wouldn't it be sufficient to add "post_order=" to the top of the
file where "recursive" is already initialized? Or am I missing
something here?

>      while test $# -ne 0
>      do
>          case "$1" in
> @@ -443,6 +445,15 @@ cmd_foreach()
>          --recursive)
>              recursive=1
>              ;;
> +        --post-order)
> +            test "$#" = "1" && usage
> +            post_order="$2"
> +            shift
> +            ;;
> +        --post-order=*)
> +            # Will skip empty commands
> +            post_order=${1#*=}
> +            ;;
>          -*)
>              usage
>              ;;
> @@ -453,7 +464,7 @@ cmd_foreach()
>          shift
>      done
> 
> -    toplevel=$(pwd)
> +    local toplevel=$(pwd)

Why do you have to add the "local" keyword here?

>      # dup stdin so that it can be restored when running the external
>      # command in the subshell (and a recursive call to this function)
> @@ -465,18 +476,36 @@ cmd_foreach()
>          die_if_unmatched "$mode"
>          if test -e "$sm_path"/.git
>          then
> -            say "$(eval_gettext "Entering '\$prefix\$sm_path'")"
> +            local name prefix path message epitaph

Same here?

> +            message="$(eval_gettext "Entering '\$prefix\$sm_path'")"
> +            epitaph="$(eval_gettext "Stopping at '\$sm_path'; script returned non-zero status.")"
>              name=$(module_name "$sm_path")
>              (
>                  prefix="$prefix$sm_path/"
>                  clear_local_git_env
>                  # we make $path available to scripts ...
>                  path=$sm_path
> +
> +                sm_eval() {
> +                    say "$message"
> +                    eval "$@" || die "$epitaph"
> +                }
> +
>                  cd "$sm_path" &&
> -                eval "$@" &&
> +                sm_eval "$@" &&
>                  if test -n "$recursive"
>                  then
> -                    cmd_foreach "--recursive" "$@"
> +                    if test -n "$post_order"
> +                    then
> +                        # Tried keeping flags as a variable, but was having difficulty

Maybe because you set the "post_order" variable to empty at the
beginning of this function? If I read that right moving that
initialization to the top of the file could get rid of the if
here?

> +                        cmd_foreach --recursive --post-order "$post_order" "$@"
> +                    else
> +                        cmd_foreach --recursive "$@"
> +                    fi
> +                fi &&
> +                if test -n "$post_order"
> +                then
> +                    sm_eval "$post_order"
>                  fi
>              ) <&3 3<&- ||
>              die "$(eval_gettext "Stopping at '\$sm_path'; script returned non-zero status.")"

^ permalink raw reply

* Re: [PATCH 4/8] dir.c: git-status --ignored: don't list empty directories as ignored
From: Eric Sunshine @ 2013-03-18 21:59 UTC (permalink / raw)
  To: Karsten Blees
  Cc: Git List, Junio C Hamano, Erik Faye-Lund, Ramkumar Ramachandra,
	Robert Zeh, Duy Nguyen, Antoine Pelisse, Adam Spiers
In-Reply-To: <51477901.9020804@gmail.com>

On Mon, Mar 18, 2013 at 4:28 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
> When checking if a directory is already listed as untracked (i.e. shouldn't
> be listed as ignored as well), don't assume that the dirctory has only

s/dirctory/directory/

> ignored files if it doesn't have untracked files, as the directory may be
> empty.

^ permalink raw reply

* Re: [PATCH 6/8] dir.c: unify is_excluded and is_path_excluded APIs
From: Eric Sunshine @ 2013-03-18 22:00 UTC (permalink / raw)
  To: Karsten Blees
  Cc: Git List, Junio C Hamano, Erik Faye-Lund, Ramkumar Ramachandra,
	Robert Zeh, Duy Nguyen, Antoine Pelisse, Adam Spiers
In-Reply-To: <5147790E.1090107@gmail.com>

On Mon, Mar 18, 2013 at 4:29 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
> Directories could also be excluded by exclude patterns specified on the
> command line or .git/info/exclude, so we cannot simply skip prep_exclude
> entirely if there's no .gitignore file name (dir_struct.exclude_per_dir).
> Move this check to just before acutally reading the file.

s/acutally/actually/

^ permalink raw reply

* Re: [PATCH 1/4] remote.c: simply a bit of code using git_config_string()
From: Eric Sunshine @ 2013-03-18 22:14 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Junio C Hamano, Jeff King
In-Reply-To: <1363612575-7340-2-git-send-email-artagnon@gmail.com>

On Mon, Mar 18, 2013 at 9:16 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> remote.c: simply a bit of code using git_config_string()

s/simply/simplify/

> A small segment where handle_config() parses the branch.remote
> configuration variable can be simplified using git_config_string().
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>

^ permalink raw reply

* Re: [PATCH 2/4] remote.c: introduce a way to have different remotes for fetch/ push
From: Eric Sunshine @ 2013-03-18 22:17 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Junio C Hamano, Jeff King
In-Reply-To: <1363612575-7340-3-git-send-email-artagnon@gmail.com>

On Mon, Mar 18, 2013 at 9:16 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> remote.c: introduce a way to have different remotes for fetch/ push

s/ push/push/

> Currently, do_push() in push.c calls remote_get(), which gets the
> configured remote for fetching and pushing.  Replace this call with a
> call to pushremote_get() instead, a new function that will return the
> remote configured specifically for pushing.  This function tries to
> work with the string pushremote_name, before falling back to the
> codepath of remote_get().  This patch has no visible impact, but
> serves to enable future patches to introduce configuration variables
> to set this variable.
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>

^ permalink raw reply

* Re: [PATCH 3/4] remote.c: introduce remote.pushdefault
From: Eric Sunshine @ 2013-03-18 22:19 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Junio C Hamano, Jeff King
In-Reply-To: <1363612575-7340-4-git-send-email-artagnon@gmail.com>

On Mon, Mar 18, 2013 at 9:16 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
>  branch.<name>.remote::
> -       When in branch <name>, it tells 'git fetch' and 'git push' which
> -       remote to fetch from/push to.  It defaults to `origin` if no remote is
> -       configured. `origin` is also used if you are not on any branch.
> +       When on branch <name>, it tells 'git fetch' and 'git push'
> +       which remote to fetch from/push to.  The remote to push to
> +       may be overriden with `remote.pushdefault` (for all branches).

s/overriden/overridden/

> +       If no remote is configured, or if you are not on any branch,
> +       it defaults to `origin` for fetching and `remote.pushdefault`
> +       for pushing.

^ permalink raw reply

* Re: [PATCH 4/4] remote.c: introduce branch.<name>.pushremote
From: Eric Sunshine @ 2013-03-18 22:23 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Junio C Hamano, Jeff King
In-Reply-To: <1363612575-7340-5-git-send-email-artagnon@gmail.com>

On Mon, Mar 18, 2013 at 9:16 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> -       If no remote is configured, or if you are not on any branch,
> -       it defaults to `origin` for fetching and `remote.pushdefault`
> -       for pushing.
> +       The remote to push to, for the current branch, may be further
> +       overriden by `branch.<name>.pushremote`.  If no remote is

s/overriden/overridden/

> +       configured, or if you are not on any branch, it defaults to
> +       `origin` for fetching and `remote.pushdefault` for pushing.
> +
>  remote.pushdefault::
>         The remote to push to by default.  Overrides
> -       `branch.<name>.remote` for all branches.
> +       `branch.<name>.remote` for all branches, and is overriden by

Ditto: s/overriden/overridden/

> +       `branch.<name>.pushremote` for specific branches.

^ permalink raw reply

* [PATCH 1/3] push test: use test_config when appropriate
From: Jonathan Nieder @ 2013-03-18 23:12 UTC (permalink / raw)
  To: Rob Hoelz; +Cc: git, Junio C Hamano, josh
In-Reply-To: <20130318231043.GD5062@elie.Belkin>

Configuration from test_config does not last beyond the end of the
current test assertion, making each test easier to think about in
isolation.

This changes the meaning of some of the tests.  For example, currently
"push with insteadOf" passes even if the line setting
"url.$TRASH.pushInsteadOf" is dropped because an url.$TRASH.insteadOf
setting leaks in from a previous test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t5516-fetch-push.sh | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index c31e5c1c..5b89c111 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -203,7 +203,7 @@ test_expect_success 'push with wildcard' '
 test_expect_success 'push with insteadOf' '
 	mk_empty &&
 	TRASH="$(pwd)/" &&
-	git config "url.$TRASH.insteadOf" trash/ &&
+	test_config "url.$TRASH.insteadOf" trash/ &&
 	git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
@@ -217,7 +217,7 @@ test_expect_success 'push with insteadOf' '
 test_expect_success 'push with pushInsteadOf' '
 	mk_empty &&
 	TRASH="$(pwd)/" &&
-	git config "url.$TRASH.pushInsteadOf" trash/ &&
+	test_config "url.$TRASH.pushInsteadOf" trash/ &&
 	git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
@@ -231,9 +231,9 @@ test_expect_success 'push with pushInsteadOf' '
 test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf should not rewrite)' '
 	mk_empty &&
 	TRASH="$(pwd)/" &&
-	git config "url.trash2/.pushInsteadOf" trash/ &&
-	git config remote.r.url trash/wrong &&
-	git config remote.r.pushurl "$TRASH/testrepo" &&
+	test_config "url.trash2/.pushInsteadOf" trash/ &&
+	test_config remote.r.url trash/wrong &&
+	test_config remote.r.pushurl "$TRASH/testrepo" &&
 	git push r refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
@@ -489,31 +489,24 @@ test_expect_success 'push with config remote.*.push = HEAD' '
 		git checkout local &&
 		git reset --hard $the_first_commit
 	) &&
-	git config remote.there.url testrepo &&
-	git config remote.there.push HEAD &&
-	git config branch.master.remote there &&
+	test_config remote.there.url testrepo &&
+	test_config remote.there.push HEAD &&
+	test_config branch.master.remote there &&
 	git push &&
 	check_push_result $the_commit heads/master &&
 	check_push_result $the_first_commit heads/local
 '
 
-# clean up the cruft left with the previous one
-git config --remove-section remote.there
-git config --remove-section branch.master
-
 test_expect_success 'push with config remote.*.pushurl' '
 
 	mk_test heads/master &&
 	git checkout master &&
-	git config remote.there.url test2repo &&
-	git config remote.there.pushurl testrepo &&
+	test_config remote.there.url test2repo &&
+	test_config remote.there.pushurl testrepo &&
 	git push there &&
 	check_push_result $the_commit heads/master
 '
 
-# clean up the cruft left with the previous one
-git config --remove-section remote.there
-
 test_expect_success 'push with dry-run' '
 
 	mk_test heads/master &&
-- 
1.8.2.rc3

^ permalink raw reply related

* [PATCH 2/3] push test: simplify check of push result
From: Jonathan Nieder @ 2013-03-18 23:13 UTC (permalink / raw)
  To: Rob Hoelz; +Cc: git, Junio C Hamano, josh
In-Reply-To: <20130318231043.GD5062@elie.Belkin>

This test checks each ref with code like the following:

	r=$(git show-ref -s --verify refs/$ref) &&
	test "z$r" = "z$the_first_commit"

Afterward it counts refs:

	test 1 = $(git for-each-ref refs/remotes/origin | wc -l)

Simpler to test the number and values of relevant refs in for-each-ref
output at the same time using test_cmp.  This makes the test more
readable and provides more helpful "./t5516-push-push.sh -v" output
when the test fails.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t5516-fetch-push.sh | 114 ++++++++++++++++++++++----------------------------
 1 file changed, 51 insertions(+), 63 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 5b89c111..2f1255d4 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -30,11 +30,10 @@ mk_test () {
 		cd testrepo &&
 		for ref in "$@"
 		do
-			r=$(git show-ref -s --verify refs/$ref) &&
-			test "z$r" = "z$the_first_commit" || {
-				echo "Oops, refs/$ref is wrong"
-				exit 1
-			}
+			echo "$the_first_commit" >expect &&
+			git show-ref -s --verify refs/$ref >actual &&
+			test_cmp expect actual ||
+			exit
 		done &&
 		git fsck --full
 	)
@@ -82,15 +81,13 @@ mk_child() {
 check_push_result () {
 	(
 		cd testrepo &&
-		it="$1" &&
-		shift
+		echo "$1" >expect &&
+		shift &&
 		for ref in "$@"
 		do
-			r=$(git show-ref -s --verify refs/$ref) &&
-			test "z$r" = "z$it" || {
-				echo "Oops, refs/$ref is wrong"
-				exit 1
-			}
+			git show-ref -s --verify refs/$ref >actual &&
+			test_cmp expect actual ||
+			exit
 		done &&
 		git fsck --full
 	)
@@ -118,10 +115,9 @@ test_expect_success 'fetch without wildcard' '
 		cd testrepo &&
 		git fetch .. refs/heads/master:refs/remotes/origin/master &&
 
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -133,10 +129,9 @@ test_expect_success 'fetch with wildcard' '
 		git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
 		git fetch up &&
 
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -150,10 +145,9 @@ test_expect_success 'fetch with insteadOf' '
 		git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
 		git fetch up &&
 
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -167,10 +161,9 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '
 		git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
 		git fetch up &&
 
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -180,10 +173,9 @@ test_expect_success 'push without wildcard' '
 	git push testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -193,10 +185,9 @@ test_expect_success 'push with wildcard' '
 	git push testrepo "refs/heads/*:refs/remotes/origin/*" &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -207,10 +198,9 @@ test_expect_success 'push with insteadOf' '
 	git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -221,10 +211,9 @@ test_expect_success 'push with pushInsteadOf' '
 	git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -237,10 +226,9 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf
 	git push r refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -827,9 +815,9 @@ test_expect_success 'fetch with branches' '
 	(
 		cd testrepo &&
 		git fetch branch1 &&
-		r=$(git show-ref -s --verify refs/heads/branch1) &&
-		test "z$r" = "z$the_commit" &&
-		test 1 = $(git for-each-ref refs/heads | wc -l)
+		echo "$the_commit commit	refs/heads/branch1" >expect &&
+		git for-each-ref refs/heads >actual &&
+		test_cmp expect actual
 	) &&
 	git checkout master
 '
@@ -840,9 +828,9 @@ test_expect_success 'fetch with branches containing #' '
 	(
 		cd testrepo &&
 		git fetch branch2 &&
-		r=$(git show-ref -s --verify refs/heads/branch2) &&
-		test "z$r" = "z$the_first_commit" &&
-		test 1 = $(git for-each-ref refs/heads | wc -l)
+		echo "$the_first_commit commit	refs/heads/branch2" >expect &&
+		git for-each-ref refs/heads >actual &&
+		test_cmp expect actual
 	) &&
 	git checkout master
 '
@@ -854,9 +842,9 @@ test_expect_success 'push with branches' '
 	git push branch1 &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/heads/master) &&
-		test "z$r" = "z$the_first_commit" &&
-		test 1 = $(git for-each-ref refs/heads | wc -l)
+		echo "$the_first_commit commit	refs/heads/master" >expect &&
+		git for-each-ref refs/heads >actual &&
+		test_cmp expect actual
 	)
 '
 
@@ -866,9 +854,9 @@ test_expect_success 'push with branches containing #' '
 	git push branch2 &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/heads/branch3) &&
-		test "z$r" = "z$the_first_commit" &&
-		test 1 = $(git for-each-ref refs/heads | wc -l)
+		echo "$the_first_commit commit	refs/heads/branch3" >expect &&
+		git for-each-ref refs/heads >actual &&
+		test_cmp expect actual
 	) &&
 	git checkout master
 '
@@ -951,9 +939,9 @@ test_expect_success 'push --porcelain' '
 	git push >.git/bar --porcelain  testrepo refs/heads/master:refs/remotes/origin/master &&
 	(
 		cd testrepo &&
-		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
-		test "z$r" = "z$the_commit" &&
-		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+		echo "$the_commit commit	refs/remotes/origin/master" >expect &&
+		git for-each-ref refs/remotes/origin >actual &&
+		test_cmp expect actual
 	) &&
 	test_cmp .git/foo .git/bar
 '
-- 
1.8.2.rc3

^ permalink raw reply related

* [PATCH 3/3] push test: rely on &&-chaining instead of 'if bad; then echo Oops; fi'
From: Jonathan Nieder @ 2013-03-18 23:14 UTC (permalink / raw)
  To: Rob Hoelz; +Cc: git, Junio C Hamano, josh
In-Reply-To: <20130318231043.GD5062@elie.Belkin>

When it is unclear which command from a test has failed, usual
practice these days is to debug by running the test again with "sh -x"
instead of relying on debugging 'echo' statements.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t5516-fetch-push.sh | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 2f1255d4..0695d570 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -22,10 +22,8 @@ mk_test () {
 	(
 		for ref in "$@"
 		do
-			git push testrepo $the_first_commit:refs/$ref || {
-				echo "Oops, push refs/$ref failure"
-				exit 1
-			}
+			git push testrepo $the_first_commit:refs/$ref ||
+			exit
 		done &&
 		cd testrepo &&
 		for ref in "$@"
@@ -328,13 +326,8 @@ test_expect_success 'push with weak ambiguity (2)' '
 test_expect_success 'push with ambiguity' '
 
 	mk_test heads/frotz tags/frotz &&
-	if git push testrepo master:frotz
-	then
-		echo "Oops, should have failed"
-		false
-	else
-		check_push_result $the_first_commit heads/frotz tags/frotz
-	fi
+	test_must_fail git push testrepo master:frotz &&
+	check_push_result $the_first_commit heads/frotz tags/frotz
 
 '
 
-- 
1.8.2.rc3

^ permalink raw reply related

* Re: [PATCH] push: Alias pushurl from push rewrites
From: Jonathan Nieder @ 2013-03-18 23:10 UTC (permalink / raw)
  To: Rob Hoelz; +Cc: git, Junio C Hamano, josh
In-Reply-To: <20130318220224.3b23a381@hoelz.ro>

Hi,

Rob Hoelz wrote:

> [url "git://github.com/"]
>     insteadOf = github:
> [url "git://github.com/myuser/"]
>     insteadOf = mygithub:
> [url "git@github.com:myuser/"]
>     pushInsteadOf = mygithub:
> [remote "origin"]
>     url     = github:organization/project
>     pushurl = mygithub:project
>
> With the above configuration, the following occurs:
>
> $ git push origin master
> fatal: remote error:
>   You can't push to git://github.com/myuser/project.git
>   Use git@github.com:myuser/project.git
>
> So you can see that pushurl is being followed (it's not attempting to
> push to git://github.com/organization/project), but insteadOf values are
> being used as opposed to pushInsteadOf values for expanding the pushurl
> alias.

At first glance it is not always obvious how overlapping settings like
these should interact.  Thanks for an instructive example that makes
the right behavior obvious.

Test nits:

[...]
> --- a/t/t5516-fetch-push.sh
> +++ b/t/t5516-fetch-push.sh
> @@ -244,6 +244,87 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf
>  	)
>  '
>  
> +test_expect_success 'push with pushInsteadOf and explicit pushurl (pushurl + pushInsteadOf does rewrite in this case)' '
> +	mk_empty &&
> +	rm -rf ro rw &&
> +	TRASH="$(pwd)/" &&
> +	mkdir ro &&
> +	mkdir rw &&
> +	git init --bare rw/testrepo &&
> +	git config "url.file://$TRASH/ro/.insteadOf" ro: &&
> +	git config "url.file://$TRASH/rw/.pushInsteadOf" rw: &&

The surrounding tests don't do this, but I wonder if it would make
sense to use test_config instead of 'git config' here.

That way, the test's settings wouldn't affect other tests, and in
particular if someone later decides to refactor the file by reordering
tests, she could be confident that that would not break anything.

In most of the surrounding tests it does not matter because 'git
config' is run in a subdirectory that is not reused later.  Patches
fixing the exceptions below.

> +	git config remote.r.url ro:wrong &&
> +	git config remote.r.pushurl rw:testrepo &&
> +	git push r refs/heads/master:refs/remotes/origin/master &&
> +	(
> +		cd rw/testrepo &&
> +		r=$(git show-ref -s --verify refs/remotes/origin/master) &&
> +		test "z$r" = "z$the_commit" &&
> +
> +		test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
> +	)

To produce more useful "./t5516-fetch-push.sh -v -i" output when the
comparison fails:

	echo "$the_commit commit refs/remotes/origin/master" >expect &&
	(
		cd rw/testrepo &&
		git for-each-ref refs/remotes/origin
	) >actual &&
	test_cmp expect actual

Hope that helps,

Jonathan Nieder (3):
  push test: use test_config where appropriate
  push test: simplify check of push result
  push test: rely on &&-chaining instead of 'if bad; then echo Oops; fi'

 t/t5516-fetch-push.sh | 156 +++++++++++++++++++++-----------------------------
 1 file changed, 65 insertions(+), 91 deletions(-)

^ permalink raw reply

* Re: [PATCH] read-cache: avoid memcpy in expand_name_field in index v4
From: Duy Nguyen @ 2013-03-19  1:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vboagoav9.fsf@alter.siamese.dyndns.org>

On Tue, Mar 19, 2013 at 12:50 AM, Junio C Hamano <gitster@pobox.com> wrote:
> While it is true that strbuf_remove(&sb, sb.len - trim, trim) is
> equivalent to strbuf_setlen(&sb, sb.len - trim), I wonder why we see
> any memcpy() in the first place.
>
> strbuf_remove(&sb, sb.len - trim, trim) is turned into
> strbuf_splice(&sb, sb.len - trim, trim, NULL, 0) and then in turn it
> does these two:
>
>         memmove(sb.buf + (sb.len - trim) + 0,
>                 sb.buf + sb.len, 0);
>         memcpy(sb.buf + (sb.len - trim), NULL, 0);
>
> both of which should be a no-op, no?

Apparently my memcpy does not bail out early when the third arg is
zero (glibc 2.11.2 on gentoo, x86). It cares more about memory
alignment. This is the beginning of memcpy:

mov    %edi,%eax
mov    0x4(%esp),%edi
mov    %esi,%edx
mov    0x8(%esp),%esi
mov    %edi,%ecx
xor    %esi,%ecx
and    $0x3,%ecx
mov    0xc(%esp),%ecx
cld
jne    75946 <memcpy+0x56>
cmp    $0x3,%ecx
jbe    75946 <memcpy+0x56>


> There also is this call that has the same "trim at the right end":
>
>     pretty.c:       strbuf_remove(sb, sb->len - trimlen, trimlen);
>
> It almost makes me suggest that it may be a better solution to make
> strbuf_remove() more intelligent about such a call pattern _if_
> these empty memmove/memcpy are so expensive, perhaps like the
> attached.  It could be that strbuf_splice() should be the one that
> ought to be more intelligent, but I'll leave it up to you to
> benchmark to find out where the best place to optimize is.

memcpy is not expensive per-se, but this is (again) webkit, where
expand_name_field (and memcpy) is called ~200k times. At that quantity
I still prefer fixing in the "hot" call site expand_name_field(), and
because strbuf_setlen is an inline function, we make no extra calls.

Making strbuf_remove/strbuf_splice more intelligent may be good (or
may make it harder to read), I don't know. But I think it could be a
separate topic.
-- 
Duy

^ permalink raw reply

* Re: [PATCH v4] submodule: add 'deinit' command
From: Junio C Hamano @ 2013-03-19  1:45 UTC (permalink / raw)
  To: Jens Lehmann
  Cc: Phil Hord, Git Mailing List, Heiko Voigt, Michael J Gruber,
	Marc Branchaud, W. Trevor King
In-Reply-To: <51477EFF.2010505@web.de>

Jens Lehmann <Jens.Lehmann@web.de> writes:

> Am 12.03.2013 17:22, schrieb Junio C Hamano:
>> Phil Hord <phil.hord@gmail.com> writes:
>> 
>>> I think this would be clearer if 'git deinit' said
>>>
>>>     rm 'submodule/*'
>>>
>>> or maybe
>>>
>>>     Removed workdir for 'submodule'
>>>
>>> Is it just me?
>> 
>> The latter may probably be better.  
>
> Hmm, it doesn't really remove the directory but only empties it
> (it recreates it a few lines after removing it together with its
> contents). So what about
>
>     Cleared directory 'submodule'

Sounds the cleanest among the suggested phrasing so far.

^ permalink raw reply

* Re: [PATCH] push: Alias pushurl from push rewrites
From: Junio C Hamano @ 2013-03-19  1:46 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Rob Hoelz, git, josh
In-Reply-To: <20130318231043.GD5062@elie.Belkin>

Jonathan Nieder <jrnieder@gmail.com> writes:

> Test nits:
> ...
> Hope that helps,
>
> Jonathan Nieder (3):
>   push test: use test_config where appropriate
>   push test: simplify check of push result
>   push test: rely on &&-chaining instead of 'if bad; then echo Oops; fi'

Are these supposed to be follow-up patches?  Preparatory steps that
Rob can reroll on top?  Something else?

^ permalink raw reply

* Re: 回复: git: how the pack-objects.c find the object's delta
From: Duy Nguyen @ 2013-03-19  1:53 UTC (permalink / raw)
  To: 方栋; +Cc: Git Mailing List
In-Reply-To: <tencent_334CD10A3AA16B201938BF85@qq.com>

On Mon, Mar 18, 2013 at 1:09 PM, 方栋 <fangdong@pipul.org> wrote:
> do you known the delta_data format?
> i want to know more details, thx

check out patch-delta.c:patch_delta(). I believe that function applies
a delta. You can figure out the format by reading how it applies.
-- 
Duy

^ permalink raw reply

* Re: [PATCH] push: Alias pushurl from push rewrites
From: Jonathan Nieder @ 2013-03-19  1:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Rob Hoelz, git, josh
In-Reply-To: <7v38vsma9o.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>> Test nits:
>> ...
>> Hope that helps,
>>
>> Jonathan Nieder (3):
>>   push test: use test_config where appropriate
>>   push test: simplify check of push result
>>   push test: rely on &&-chaining instead of 'if bad; then echo Oops; fi'
>
> Are these supposed to be follow-up patches?  Preparatory steps that
> Rob can reroll on top?  Something else?

Preparatory steps.

^ permalink raw reply

* Re: [PATCH v1 27/45] Convert run_add_interactive to use struct pathspec
From: Duy Nguyen @ 2013-03-19  1:58 UTC (permalink / raw)
  To: John Keeping; +Cc: git, Junio C Hamano
In-Reply-To: <20130318182602.GA2164@serenity.lan>

On Tue, Mar 19, 2013 at 1:26 AM, John Keeping <john@keeping.me.uk> wrote:
> On Fri, Mar 15, 2013 at 01:06:42PM +0700, Nguyễn Thái Ngọc Duy wrote:
>> This passes the pathspec, more or less unmodified, to
>> git-add--interactive. The command itself does not process pathspec. It
>> simply passes the pathspec to other builtin commands. So if all those
>> commands support pathspec, we're good.
>
> This breaks "git reset --keep" in a subdirectory for me.
>
> I ran "git reset --keep <branch>" in a subdirectory and got:
>
>     fatal: BUG: parse_pathspec cannot take no argument in this case
>
> Bisecting points to this commit.
>
> The simplest test case is:
>
>     ( cd t && ../bin-wrappers/git reset --keep HEAD )
>
> which works on master but not pu.

Beautiful. I got messed up with C operator precedence. This should fix
it. I'll check the rest of parse_pathspec calls later.

diff --git a/builtin/reset.c b/builtin/reset.c
index ab3917d..b665218 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -219,7 +219,7 @@ static void parse_args(struct pathspec *pathspec,
        *rev_ret = rev;
        parse_pathspec(pathspec, 0,
                       PATHSPEC_PREFER_FULL |
-                      patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0,
+                      (patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0),
                       prefix, argv);
 }

-- 
Duy

^ permalink raw reply related

* Re: building git ; need suggestion
From: David Aguilar @ 2013-03-19  2:11 UTC (permalink / raw)
  To: Joydeep Bakshi; +Cc: Magnus Bäck, Fredrik Gustafsson, git
In-Reply-To: <9E0367AC-617A-440B-925E-5796CF2E1ADF@infoservices.in>

On Mon, Mar 18, 2013 at 5:24 AM, Joydeep Bakshi
<joydeep.bakshi@infoservices.in> wrote:
> I'm closer to my requirement. I have found gitweb simply provide a GUI  for history check
> and code comparison. And the git itself is good enough to do the ACL stuff with hooks.
>
> I already have the following code to deploy the push into its work-tree

You should try gitolite.  It has very flexible rules,
and it's already been implemented for you ;-)

https://github.com/sitaramc/gitolite



> ===========================
> #!/bin/bash
>
> while read oldrev newrev ref
> do
>   branch=`echo $ref | cut -d/ -f3`
>
>   if [ "master" == "$branch" ]; then
>     git --work-tree=/path/under/root/dir/live-site/ checkout -f $branch
>     echo 'Changes pushed live.'
>   fi
>
>   if [ "dev" == "$branch" ]; then
>     git --work-tree=/path/under/root/dir/dev-site/ checkout -f $branch
>     echo 'Changes pushed to dev.'
>   fi
> done
> =========================
>
> This code can be extended for as many branches as you have.
>
> I now need a mechanism to restrict the user to it's own branch so that user can't push into
> any other branch in mistake.
>
> Say I have
>
> master branch -> only admin user can push here.
> dev branch -> only user dev1 , dev2  and master can push here.
> testing branch -> only user test1 and test2 can push here.
>
> I think this can also be done with pre-receive hook. Any suggestion on the hook design is
> welcome. Also this can be implemented on the above hook or in a separate hook.
> A separate hook is better due to maintainability and then I need to call multiple
> pre-receive hook. Please suggest.
>
> Thanks
>
>
>
> On 18-Mar-2013, at 11:14 AM, Joydeep Bakshi <joydeep.bakshi@infoservices.in> wrote:
>
>>
>> On 15-Mar-2013, at 6:44 PM, Magnus Bäck <baeck@google.com> wrote:
>>>>
>>>
>>> Right, but that's R/W permissions. Almost any piece of Git hosting
>>> software supports restriction of pushes. Discriminating *read* access
>>> between developers and maintenance people sounds like a disaster if it's
>>> the same organisation.
>>
>> Just restriction on push access is what required.
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
David

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox