Git development
 help / color / mirror / Atom feed
* Re: [PATCH 3/4] Teach transport about the gitfile mechanism
From: Nguyen Thai Ngoc Duy @ 2011-10-04 21:46 UTC (permalink / raw)
  To: Phil Hord; +Cc: git, Erik Faye-Lund
In-Reply-To: <CABURp0qkVcpNRyEg8gcNPjv2KbRbdHYk1XsqCjkp8Yrf7T_Lkw@mail.gmail.com>

On Wed, Oct 5, 2011 at 7:08 AM, Phil Hord <phil.hord@gmail.com> wrote:
> +static int is_gitfile(const char *url)
> +{
> +       struct stat st;
> +       char buf[9];
> +       int fd, len;
> +       if (stat(url, &st))
> +               return 0;
> +       if (!S_ISREG(st.st_mode))
> +               return 0;
> +       if (st.st_size < 10 || st.st_size > PATH_MAX)
> +               return 1;
> +
> +       fd = open(url, O_RDONLY);
> +       if (fd < 0)
> +               die_errno("Error opening '%s'", url);
> +       len = read_in_full(fd, buf, sizeof(buf));
> +       close(fd);
> +       if (len != sizeof(buf))
> +               die("Error reading %s", url);
> +       return !prefixcmp(buf, "gitdir: ");
> +}
> +

There's similar code in get_repo_path(), builtin/clone.c, added in
commit 9b0ebc7 (clone: allow to clone from .git file). Perhaps you can
reuse this function there and remove duplicate code.
-- 
Duy

^ permalink raw reply

* Re: [PATCH 0/9] i18n: add PO files to po/
From: Ævar Arnfjörð Bjarmason @ 2011-10-04 21:58 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Ramkumar Ramachandra, Peter Krefting,
	Marcin Cieślak, Sam Reed, Jan Engelhardt, Jan Krüger,
	Nguyễn Thái Ngọc
In-Reply-To: <20111003220659.GA19537@elie>

On Tue, Oct 4, 2011 at 00:06, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
>> It's been a long time coming, but here's an initial submission of PO
>> files to the po/ directory. This adds some initial and as of yet
>> unused translations.
>
> Neat.  I think it's good to figure out what we will do with these
> anyway, and we don't have to wait for the infrastructure to do that.

I think it's a bit too premature to try to plan this all ahead, why
not just take patches to po/ and see what the friction points are,
then address those as they arise?

The reason I'm submitting this is because:

 * Other parts of the i18n series depend on there being some PO files
   for tests etc.

 * I've had these sitting in my tree for way to long and there's no
   reason not to stick them in git.git for further improvement.

> So, basic questions:
>
>  1. which branch will be translated?

Translations are an end user product, so I think it makes sense to
just translate the master when it's near or in the RC phase when you
know your work will make it into the end release and be useful to
users.

>  2. who keeps track of incoming translations?

While we could set up some "i18n maintainer" infrastructure why not
just have people submit patches to the list like we do for every other
file in git?

The people maintaining each translation would be the authority on that
file so their patches should be fast-tracked once they're seen not te
be complete buffoons.

>  3. how can we avoid this making "git log -p" output unusable?

Well it's already going to be making "git log -p" output unusable for
most software projects that use git and any sort of pseudo-generated
files, so it sounds like having this in the core and raising an itch
to scratch might improve the git user experience for everyone with
e.g. an --exclude option to git log.

^ permalink raw reply

* Re: [PATCH 0/9] i18n: add PO files to po/
From: Nguyen Thai Ngoc Duy @ 2011-10-04 22:09 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Ævar Arnfjörð, git, Junio C Hamano,
	Ramkumar Ramachandra, Peter Krefting, Marcin Cieślak,
	Sam Reed, Jan Engelhardt, Jan Krüger
In-Reply-To: <20111003220659.GA19537@elie>

On Tue, Oct 4, 2011 at 9:06 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> 3. Maybe some hero will implement
>
>        git log -p --exclude=po/
>        # or
>        git log -p -- :(not)po/
>
> to complement "git log -p -- po/". ;-)

Meanwhile, how about keeping po in its own repository? Translations
usually lag behind anyway. This keeps main repo "clean". Junio can
declare string freeze 1-2 weeks before a new release, so that
translations can be updated, then he can make a tarball containing
both git.git and git-translations.git.
-- 
Duy

^ permalink raw reply

* Re: [PATCH 0/9] i18n: add PO files to po/
From: Junio C Hamano @ 2011-10-04 22:15 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Jonathan Nieder, git, Ramkumar Ramachandra, Peter Krefting,
	Marcin Cieślak, Sam Reed, Jan Engelhardt, Jan Krüger,
	Nguyễn Thái Ngọc
In-Reply-To: <CACBZZX5uz5cdoWebYOY-Omu0drnQasJB-12DMZyZ_NX17jzhmg@mail.gmail.com>

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> I think it's a bit too premature to try to plan this all ahead, why
> not just take patches to po/ and see what the friction points are,
> then address those as they arise?
> ...
>>  3. how can we avoid this making "git log -p" output unusable?

These two are somewhat mutually exclusive. I _suspect_ that Jonathan might
have been hinting me to eject everything under the current po/ directory,
and bind that part of the tree as a submodule from another repository,
which would give us "git log -p" cleanliness automatically. Taking more
patches to po/ would not help that process, even though it won't hinder
it.

^ permalink raw reply

* Re: [RFC/PATCH]: reverse bisect v 2.0
From: Christian Couder @ 2011-10-04 22:34 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Jeff King, Michal Vyskocil, git, Sverre Rabbelier, Johannes Sixt
In-Reply-To: <7vfwj8dbn0.fsf@alter.siamese.dyndns.org>

Hi,

On Tuesday 04 October 2011 17:22:59 Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
> > On Mon, Oct 03, 2011 at 10:00:25AM -0700, Junio C Hamano wrote:
> > 
> > And the --started-to would literally be implemented as flipping the
> > meaning of "git bisect yes" and "git bisect no", and nothing more. IOW,
> > it's just another way of spelling "git bisect --reverse".
> 
> Yes, if we wanted to also implement the flipping of the mapping between
> yes/no and good/bad, I do not have any problem with --used-to/--started-to
> pair of options.

If we decide to go with yes/no, an option like:

--yes-means=<it behaves like this>

seems to me easier to understand. Though I recognize that it doesn't tell that 
the behavior changed.

And before responding to this thread I wanted to have another look at the 
unfinished patch that Dscho sent a few years ago, but I did not have much time 
these past few days, and I could not find it anymore.

Thanks,
Christian.

^ permalink raw reply

* Re: [PATCH 1/4] enter_repo: do not modify input
From: Phil Hord @ 2011-10-04 22:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Erik Faye-Lund, phil.hord

From: Erik Faye-Lund <kusmabite@gmail.com>

entr_repo(..., 0) currently modifies the input to strip away
trailing slashes. This means that we some times need to copy the
input to keep the original.

Change it to unconditionally copy it into the used_path buffer so
we can safely use the input without having to copy it. Also store
a working copy in validated_path up-front before we start
resolving anything.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Phil Hord <hordp@cisco.com>

diff --git a/cache.h b/cache.h
index 9994a3c..7eeb8cf 100644
--- a/cache.h
+++ b/cache.h
@@ -734,7 +734,7 @@ int safe_create_leading_directories(char *path);
 int safe_create_leading_directories_const(const char *path);
 int mkdir_in_gitdir(const char *path);
 extern char *expand_user_path(const char *path);
-char *enter_repo(char *path, int strict);
+const char *enter_repo(const char *path, int strict);
 static inline int is_absolute_path(const char *path)
 {
     return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
diff --git a/daemon.c b/daemon.c
index 4c8346d..9253192 100644
--- a/daemon.c
+++ b/daemon.c
@@ -108,11 +108,11 @@ static void NORETURN daemon_die(const char *err,
va_list params)
     exit(1);
 }
 
-static char *path_ok(char *directory)
+static const char *path_ok(char *directory)
 {
     static char rpath[PATH_MAX];
     static char interp_path[PATH_MAX];
-    char *path;
+    const char *path;
     char *dir;
 
     dir = directory;
diff --git a/path.c b/path.c
index 6f3f5d5..f3d96aa 100644
--- a/path.c
+++ b/path.c
@@ -283,7 +283,7 @@ return_null:
  * links.  User relative paths are also returned as they are given,
  * except DWIM suffixing.
  */
-char *enter_repo(char *path, int strict)
+const char *enter_repo(const char *path, int strict)
 {
     static char used_path[PATH_MAX];
     static char validated_path[PATH_MAX];
@@ -297,14 +297,17 @@ char *enter_repo(char *path, int strict)
         };
         int len = strlen(path);
         int i;
-        while ((1 < len) && (path[len-1] == '/')) {
-            path[len-1] = 0;
+        while ((1 < len) && (path[len-1] == '/'))
             len--;
-        }
+
         if (PATH_MAX <= len)
             return NULL;
-        if (path[0] == '~') {
-            char *newpath = expand_user_path(path);
+        strncpy(used_path, path, len);
+        used_path[len] = 0;
+        strcpy(validated_path, used_path);
+
+        if (used_path[0] == '~') {
+            char *newpath = expand_user_path(used_path);
             if (!newpath || (PATH_MAX - 10 < strlen(newpath))) {
                 free(newpath);
                 return NULL;
@@ -316,24 +319,18 @@ char *enter_repo(char *path, int strict)
              * anyway.
              */
             strcpy(used_path, newpath); free(newpath);
-            strcpy(validated_path, path);
-            path = used_path;
         }
         else if (PATH_MAX - 10 < len)
             return NULL;
-        else {
-            path = strcpy(used_path, path);
-            strcpy(validated_path, path);
-        }
-        len = strlen(path);
+        len = strlen(used_path);
         for (i = 0; suffix[i]; i++) {
-            strcpy(path + len, suffix[i]);
-            if (!access(path, F_OK)) {
+            strcpy(used_path + len, suffix[i]);
+            if (!access(used_path, F_OK)) {
                 strcat(validated_path, suffix[i]);
                 break;
             }
         }
-        if (!suffix[i] || chdir(path))
+        if (!suffix[i] || chdir(used_path))
             return NULL;
         path = validated_path;
     }
-- 
1.7.7.503.g26392.dirty

 

^ permalink raw reply related

* Re: [PATCH 1/4] enter_repo: do not modify input
From: Phil Hord @ 2011-10-04 23:01 UTC (permalink / raw)
  To: Phil Hord; +Cc: Junio C Hamano, git, Erik Faye-Lund
In-Reply-To: <4E8B8DEA.1000606@cisco.com>

On Tue, Oct 4, 2011 at 6:51 PM, Phil Hord <hordp@cisco.com> wrote:
> From: Erik Faye-Lund <kusmabite@gmail.com>
>
> +++ b/daemon.c
> @@ -108,11 +108,11 @@ static void NORETURN daemon_die(const char *err,
> va_list params)
>     exit(1);

Blast!  Borked again.

I'll re-work on this and try again tomorrow.

P

^ permalink raw reply

* Re: [PATCH] git-difftool: allow skipping file by typing 'n' at prompt
From: Sitaram Chamarty @ 2011-10-04 23:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Phil Hord, Sitaram Chamarty, git
In-Reply-To: <7vty7oblpu.fsf@alter.siamese.dyndns.org>

On Wed, Oct 5, 2011 at 12:58 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Phil Hord <phil.hord@gmail.com> writes:
>
>> On Tue, Oct 4, 2011 at 11:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>>> I think I've seen this done as: "do this? [Y/n]" elsewhere.
>>>
>>> Not telling you what to do, but trying to feel what others may think.
>>
>> I think so, too.  The [y]/n syntax is not clear enough for me to
>> confidently know what the default value will be.
>
> One downside of "do this [Y,n,m,o,p,q]? " is that it limits us to
> lowercase responses, which means we cannot assign 'q' for quitting from
> the innermost nested context and assign 'Q' for quitting from the whole
> interactive loop (e.g. "git add -p").
>
>    "do this [y,n,m,o,p,q] (default=y)? "

Does this even make a difference in this case?  I was going to send
out a new patch using [Y/n] instead of my original [y]/n.  There's
only one loop in this thing, and till now people have been presumably
hitting Ctrl-C to get out of it.  I see no real need to make that more
elegant; all I set out to do is add one teeny weeny bit of
functionality to a prompt that -- other than giving you a chance to
hit that Ctrl-C -- was not actually doing anything useful at all.

>
> may have been a better choice in hindsight.
>
> No matter what we end up doing, let's try to be consistent.

The only other part of git where I have ever used a prompt is 'git add
-p'.  Consistency with *that* prompt, to me, would mean colors.  And
help text.  And I'm not sure what else, really, since I only used it
superficially.

Isn't that overkill for this case?

I'll wait a few hours for any further comments then send out a patch
that is the same as my original one except it uses [Y/n] instead of
[y]/n.

^ permalink raw reply

* Re: [PATCH 1/4] enter_repo: do not modify input
From: Phil Hord @ 2011-10-04 23:06 UTC (permalink / raw)
  To: Phil Hord; +Cc: Junio C Hamano, git, Erik Faye-Lund
In-Reply-To: <CABURp0qEQdjLsUxQkf3jSAHU80NOZEqm9iEksZKST_JfK590Qw@mail.gmail.com>

From: Erik Faye-Lund <kusmabite@gmail.com>

entr_repo(..., 0) currently modifies the input to strip away
trailing slashes. This means that we some times need to copy the
input to keep the original.

Change it to unconditionally copy it into the used_path buffer so
we can safely use the input without having to copy it. Also store
a working copy in validated_path up-front before we start
resolving anything.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Phil Hord <hordp@cisco.com>

diff --git a/cache.h b/cache.h
index 9994a3c..7eeb8cf 100644
--- a/cache.h
+++ b/cache.h
@@ -734,7 +734,7 @@ int safe_create_leading_directories(char *path);
 int safe_create_leading_directories_const(const char *path);
 int mkdir_in_gitdir(const char *path);
 extern char *expand_user_path(const char *path);
-char *enter_repo(char *path, int strict);
+const char *enter_repo(const char *path, int strict);
 static inline int is_absolute_path(const char *path)
 {
 	return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
diff --git a/daemon.c b/daemon.c
index 4c8346d..9253192 100644
--- a/daemon.c
+++ b/daemon.c
@@ -108,11 +108,11 @@ static void NORETURN daemon_die(const char *err, va_list params)
 	exit(1);
 }
 
-static char *path_ok(char *directory)
+static const char *path_ok(char *directory)
 {
 	static char rpath[PATH_MAX];
 	static char interp_path[PATH_MAX];
-	char *path;
+	const char *path;
 	char *dir;
 
 	dir = directory;
diff --git a/path.c b/path.c
index 6f3f5d5..f3d96aa 100644
--- a/path.c
+++ b/path.c
@@ -283,7 +283,7 @@ return_null:
  * links.  User relative paths are also returned as they are given,
  * except DWIM suffixing.
  */
-char *enter_repo(char *path, int strict)
+const char *enter_repo(const char *path, int strict)
 {
 	static char used_path[PATH_MAX];
 	static char validated_path[PATH_MAX];
@@ -297,14 +297,17 @@ char *enter_repo(char *path, int strict)
 		};
 		int len = strlen(path);
 		int i;
-		while ((1 < len) && (path[len-1] == '/')) {
-			path[len-1] = 0;
+		while ((1 < len) && (path[len-1] == '/'))
 			len--;
-		}
+
 		if (PATH_MAX <= len)
 			return NULL;
-		if (path[0] == '~') {
-			char *newpath = expand_user_path(path);
+		strncpy(used_path, path, len);
+		used_path[len] = 0;
+		strcpy(validated_path, used_path);
+
+		if (used_path[0] == '~') {
+			char *newpath = expand_user_path(used_path);
 			if (!newpath || (PATH_MAX - 10 < strlen(newpath))) {
 				free(newpath);
 				return NULL;
@@ -316,24 +319,18 @@ char *enter_repo(char *path, int strict)
 			 * anyway.
 			 */
 			strcpy(used_path, newpath); free(newpath);
-			strcpy(validated_path, path);
-			path = used_path;
 		}
 		else if (PATH_MAX - 10 < len)
 			return NULL;
-		else {
-			path = strcpy(used_path, path);
-			strcpy(validated_path, path);
-		}
-		len = strlen(path);
+		len = strlen(used_path);
 		for (i = 0; suffix[i]; i++) {
-			strcpy(path + len, suffix[i]);
-			if (!access(path, F_OK)) {
+			strcpy(used_path + len, suffix[i]);
+			if (!access(used_path, F_OK)) {
 				strcat(validated_path, suffix[i]);
 				break;
 			}
 		}
-		if (!suffix[i] || chdir(path))
+		if (!suffix[i] || chdir(used_path))
 			return NULL;
 		path = validated_path;
 	}
-- 
1.7.7.503.g26392.dirty

^ permalink raw reply related

* [PATCH] remote-curl: Fix warning after HTTP failure
From: Shawn O. Pearce @ 2011-10-04 23:20 UTC (permalink / raw)
  To: gitster; +Cc: git, Shawn O. Pearce

From: "Shawn O. Pearce" <spearce@spearce.org>

If the HTTP connection is broken in the middle of a fetch or clone
body, the client presented a useless error message due to part of
the upload-pack->remote-curl pkt-line protocol leaking out of the
helper as the helper's "fetch result":

  error: RPC failed; result=18, HTTP code = 200
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: unpack-objects failed
  warning: https unexpectedly said: '0000'

Instead when the HTTP RPC fails discard all remaining data from
upload-pack and report nothing to the transport helper. Errors
were already sent to stderr.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 remote-curl.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/remote-curl.c b/remote-curl.c
index 69831e9..d2bf832 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -573,7 +573,16 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
 
 	close(client.in);
 	client.in = -1;
-	strbuf_read(&rpc->result, client.out, 0);
+	if (!err) {
+	  strbuf_read(&rpc->result, client.out, 0);
+	} else {
+		char buf[4096];
+		for (;;) {
+			int n = read(client.out, buf, sizeof(buf));
+			if (n <= 0)
+			  break;
+		}
+	}
 
 	close(client.out);
 	client.out = -1;
-- 
1.7.6.4.dirty

^ permalink raw reply related

* Re: [RFC/PATCH]: reverse bisect v 2.0
From: Junio C Hamano @ 2011-10-04 23:27 UTC (permalink / raw)
  To: Christian Couder
  Cc: Jeff King, Michal Vyskocil, git, Sverre Rabbelier, Johannes Sixt
In-Reply-To: <201110050034.46334.chriscool@tuxfamily.org>

Christian Couder <chriscool@tuxfamily.org> writes:

> If we decide to go with yes/no, an option like:
>
> --yes-means=<it behaves like this>
>
> seems to me easier to understand. Though I recognize that it doesn't tell that 
> the behavior changed.

What problem are you trying to solve?

As I already said while discussing --has-property vs --used-to, I think
that --yes-means shares the exact same downside as --has-property.

The --used-to proposal was to make sure that people who are bisecting to
find fixes would not by mistake say

	git bisect start --used-to='work fine'

as it is very clear that bisecting in a history with something that used
to work fine is _not_ hunting for a fix.

When the users say

	git bisect start --yes-means='frotz is broken'

is it clear to them that they are supposed to define what used to be the
case (in which case "yes" is always mapped to "good")?  If you are trying
to allow them to say either old or new behaviour with --yes-means, how
does your "bisect" know if it needs to map "yes" to "good" (regression
hunting), or "yes" to "bad" (looking for a fix)?

^ permalink raw reply

* Re: [RFC/PATCH] git checkout $tree path
From: Junio C Hamano @ 2011-10-05  2:07 UTC (permalink / raw)
  To: Jay Soffian; +Cc: Jeff King, git
In-Reply-To: <CAG+J_Dy7gnDEK-9KAJT4M_wumS_QpzLNMVzAiOHCyEbFBU65=w@mail.gmail.com>

Jay Soffian <jaysoffian@gmail.com> writes:

> I think I'd expect the first behavior with:
>
> $ git checkout master -- dir/*

If we did not have to worry about "dir/.gitignore", this proposal does
have certain attractiveness.

^ permalink raw reply

* What's cooking in git.git (Oct 2011, #01; Tue, 4)
From: Junio C Hamano @ 2011-10-05  2:12 UTC (permalink / raw)
  To: git

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

Here are the repositories that have my integration branches:

With maint, master, next, pu, todo, html and man:

	url = git://repo.or.cz/alt-git.git
	url = https://code.google.com/p/git-core/

With only maint, master, html and man:

	url = git://git.sourceforge.jp/gitroot/git-core/git.git
	url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core

With all the topics and integration branches but not todo, html or man:

	url = https://github.com/gitster/git

Until kernel.org comes back to life, it might be a good idea to
tentatively have the following in your $HOME/.gitconfig:

    [url "http://code.google.com/p/git-core"]
	insteadOf = git://git.kernel.org/pub/scm/git/git.git

I am planning to kick some topics out of 'next' back to 'pu' to give them
a chance to be cleaned up. Not happened yet, but see below for ideas.

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

* cb/do-not-pretend-to-hijack-long-help (2011-10-03) 2 commits
 - fixup: leave uppercase H alone
 - use -h for synopsis and --help for manpage consistently

Will squash the top one into the original unless somebody objects.

* cp/git-web-browse-browsers (2011-10-03) 1 commit
 - git-web--browse: avoid the use of eval

Will merge to "next".

* il/archive-err-signal (2011-10-03) 1 commit
 - transport: do not allow to push over git:// protocol

Will merge to "next".

* nd/daemon-log-sock-errors (2011-10-03) 1 commit
 - daemon: log errors if we could not use some sockets

Will merge to "next".

* nd/document-err-packet (2011-10-03) 1 commit
 - pack-protocol: document "ERR" line

Will merge to "next".

* nd/git-daemon-error-msgs (2011-10-03) 1 commit
 - daemon: return "access denied" if a service is not allowed

Will merge to "next".

* jc/is-url-simplify (2011-10-03) 1 commit
 - url.c: simplify is_url()

Will merge to "next".

* jn/ident-from-etc-mailname (2011-10-03) 1 commit
 - ident: check /etc/mailname if email is unknown

Will merge to "next".

The warning might have to be squelched further, but that can be done as a
separate patch in-tree.

* jn/no-g-plus-s-on-bsd (2011-10-03) 1 commit
 - Makefile: do not set setgid bit on directories on GNU/kFreeBSD

Will merge to "next".

* js/log-show-children (2011-10-04) 1 commit
 - log --children

Will merge to "next".

* rs/name-rev-usage (2011-10-03) 1 commit
 - name-rev: split usage string

Will merge to "next".

* rs/test-ctype (2011-10-03) 2 commits
 - test-ctype: add test for is_pathspec_magic
 - test-ctype: macrofy

Will merge to "next".

* rs/pending (2011-10-03) 8 commits
 - commit: factor out clear_commit_marks_for_object_array
 - checkout: use leak_pending flag
 - bundle: use leak_pending flag
 - bisect: use leak_pending flag
 - revision: add leak_pending flag
 - checkout: use add_pending_{object,sha1} in orphan check
 - revision: factor out add_pending_sha1
 - checkout: check for "Previous HEAD" notice in t2020

* ph/transport-with-gitfile (2011-10-04) 4 commits
 - Add test showing git-fetch groks gitfiles
 - Teach transport about the gitfile mechanism
 - Learn to handle gitfiles in enter_repo
 - enter_repo: do not modify input

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

* hv/submodule-merge-search (2011-08-26) 5 commits
 - submodule: Search for merges only at end of recursive merge
 - allow multiple calls to submodule merge search for the same path
 - submodule: Demonstrate known breakage during recursive merge
 - push: Don't push a repository with unpushed submodules
  (merged to 'next' on 2011-08-24 at 398e764)
 + push: teach --recurse-submodules the on-demand option
 (this branch is tangled with fg/submodule-auto-push.)

The second from the bottom one needs to be replaced with a properly
written commit log message.

Will kick back to 'pu'.

* jc/signed-push (2011-09-12) 7 commits
 - push -s: support pre-receive-signature hook
 - push -s: receiving end
 - push -s: send signed push certificate
 - push -s: skeleton
 - Split GPG interface into its own helper library
 - rename "match_refs()" to "match_push_refs()"
 - send-pack: typofix error message
 (this branch uses jc/run-receive-hook-cleanup; is tangled with jc/signed-push-3.)

This was the v2 that updated notes tree on the receiving end.

* jc/signed-push-3 (2011-09-12) 4 commits
 . push -s: signed push
 - Split GPG interface into its own helper library
 - rename "match_refs()" to "match_push_refs()"
 - send-pack: typofix error message
 (this branch uses jc/run-receive-hook-cleanup; is tangled with jc/signed-push.)

This is the third edition, that moves the preparation of the notes tree to
the sending end.
I expect that both of these topics will be discarded.

* jk/add-i-hunk-filter (2011-07-27) 5 commits
  (merged to 'next' on 2011-08-11 at 8ff9a56)
 + add--interactive: add option to autosplit hunks
 + add--interactive: allow negatation of hunk filters
 + add--interactive: allow hunk filtering on command line
 + add--interactive: factor out regex error handling
 + add--interactive: refactor patch mode argument processing

Will discard.

* jh/receive-count-limit (2011-05-23) 10 commits
 - receive-pack: Allow server to refuse pushes with too many objects
 - pack-objects: Estimate pack size; abort early if pack size limit is exceeded
 - send-pack/receive-pack: Allow server to refuse pushing too large packs
 - pack-objects: Allow --max-pack-size to be used together with --stdout
 - send-pack/receive-pack: Allow server to refuse pushes with too many commits
 - pack-objects: Teach new option --max-commit-count, limiting #commits in pack
 - receive-pack: Prepare for addition of the new 'limit-*' family of capabilities
 - Tighten rules for matching server capabilities in server_supports()
 - send-pack: Attempt to retrieve remote status even if pack-objects fails
 - Update technical docs to reflect side-band-64k capability in receive-pack

Would need another round to separate per-pack and per-session limits.
Will discard.

* jk/generation-numbers (2011-09-11) 8 commits
 - metadata-cache.c: make two functions static
 - limit "contains" traversals based on commit generation
 - check commit generation cache validity against grafts
 - pretty: support %G to show the generation number of a commit
 - commit: add commit_generation function
 - add metadata-cache infrastructure
 - decorate: allow storing values instead of pointers
 - Merge branch 'jk/tag-contains-ab' (early part) into HEAD

The initial "tag --contains" de-pessimization without need for generation
numbers is already in.
Will discard.

* sr/transport-helper-fix-rfc (2011-07-19) 2 commits
 - t5800: point out that deleting branches does not work
 - t5800: document inability to push new branch with old content

Perhaps 281eee4 (revision: keep track of the end-user input from the
command line, 2011-08-25) in bk/ancestry-path would help.

* po/cygwin-backslash (2011-08-05) 2 commits
 - On Cygwin support both UNIX and DOS style path-names
 - git-compat-util: add generic find_last_dir_sep that respects is_dir_sep

Incomplete with respect to backslash processing in prefix_filename(), and
also loses the ability to escape glob specials.
Will discard.

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

* jc/grep-untracked-exclude (2011-10-04) 1 commit
 - Merge branch 'jc/maint-grep-untracked-exclude' into jc/grep-untracked-exclude
 (this branch uses bw/grep-no-index-no-exclude and jc/maint-grep-untracked-exclude.)

* jc/maint-grep-untracked-exclude (2011-10-04) 1 commit
 - grep: teach --untracked and --exclude-standard options
 (this branch is used by jc/grep-untracked-exclude; uses bw/grep-no-index-no-exclude.)

Will merge to "next".

* dm/tree-walk (2011-09-28) 2 commits
 - tree-walk: micro-optimization in tree_entry_interesting
 - tree-walk: drop unused parameter from match_dir_prefix

Will merge to "next".

* cs/perl-config-path-send-email (2011-09-30) 2 commits
 - use new Git::config_path() for aliasesfile
 - Add Git::config_path()

Will merge to "next".

* jc/checkout-from-tree-keep-local-changes (2011-09-30) 1 commit
 - checkout $tree $path: do not clobber local changes in $path not in $tree

Will merge to "next".

* jc/apply-blank-at-eof-fix (2011-09-26) 1 commit
 - apply --whitespace=error: correctly report new blank lines at end

Will merge to "next".

* nd/sparse-doc (2011-09-26) 1 commit
 - git-read-tree.txt: update sparse checkout examples

Will merge to "next".

* jp/get-ref-dir-unsorted (2011-09-30) 2 commits
 - refs: Use binary search to lookup refs faster
 - Don't sort ref_list too early

Will merge to "next".

* jc/parse-options-boolean (2011-09-28) 5 commits
 - apply: use OPT_NOOP_NOARG
 - revert: use OPT_NOOP_NOARG
 - parseopt: add OPT_NOOP_NOARG
 - archive.c: use OPT_BOOL()
 - parse-options: deprecate OPT_BOOLEAN

Will merge to "next".

* mh/maint-notes-merge-pathbuf-fix (2011-09-27) 1 commit
 - notes_merge_commit(): do not pass temporary buffer to other function

Will merge to "next".

* ph/push-to-delete-nothing (2011-09-30) 1 commit
 - receive-pack: don't pass non-existent refs to post-{receive,update} hooks

Will merge to "next".

* ps/gitweb-js-with-lineno (2011-09-27) 1 commit
 - gitweb: Fix links to lines in blobs when javascript-actions are enabled

Will merge to "next".

* zj/send-email-authen-sasl (2011-09-29) 1 commit
 - send-email: auth plain/login fix

Will merge to "next".

* jc/maint-diffstat-numstat-context (2011-09-22) 1 commit
  (merged to 'next' on 2011-09-26 at 12539ab)
 + diff: teach --stat/--numstat to honor -U$num

"diff" is allowed to match the common lines differently depending on how
many context lines it is showing, so running --(num)stat with 0 lines of
context internally gives a result that may be surprising to some people.

Will merge to "master" as the second wave.

* nd/maint-sparse-errors (2011-09-22) 2 commits
  (merged to 'next' on 2011-09-26 at cdcdec5)
 + Add explanation why we do not allow to sparse checkout to empty working tree
 + sparse checkout: show error messages when worktree shaping fails

Will merge to "master" as the third wave.

* rs/diff-cleanup-records-fix (2011-10-03) 2 commits
 - diff: resurrect XDF_NEED_MINIMAL with --minimal
  (merged to 'next' on 2011-09-27 at 3bd75d8)
 + Revert removal of multi-match discard heuristic in 27af01

Will merge to "next".

* di/fast-import-empty-tag-note-fix (2011-09-22) 2 commits
 - fast-import: don't allow to note on empty branch
 - fast-import: don't allow to tag empty branch

Will merge to "next".

* js/check-attr-cached (2011-09-22) 2 commits
  (merged to 'next' on 2011-09-27 at 74d7b66)
 + t0003: remove extra whitespaces
 + Teach '--cached' option to check-attr

Will merge to "master" as the first wave.

* bw/grep-no-index-no-exclude (2011-09-15) 2 commits
  (merged to 'next' on 2011-09-26 at 776f13b)
 + grep --no-index: don't use git standard exclusions
 + grep: do not use --index in the short usage output
 (this branch is used by jc/grep-untracked-exclude and jc/maint-grep-untracked-exclude.)

Will merge to "master" as the third wave.

* jc/want-commit (2011-09-15) 1 commit
  (merged to 'next' on 2011-09-26 at 5841512)
 + Allow git merge ":/<pattern>"

Will merge to "master" as the first wave.

* jc/ls-remote-short-help (2011-09-16) 1 commit
  (merged to 'next' on 2011-09-26 at e24a27a)
 + ls-remote: a lone "-h" is asking for help

Will merge to "master" as the first wave.

* jc/maint-bundle-too-quiet (2011-09-19) 1 commit
  (merged to 'next' on 2011-09-26 at ba140d4)
 + Teach progress eye-candy to fetch_refs_from_bundle()

Will merge to "master" as the first wave.

* jk/filter-branch-require-clean-work-tree (2011-09-15) 1 commit
  (merged to 'next' on 2011-09-26 at 206a74a)
 + filter-branch: use require_clean_work_tree

Will merge to "master" as the first wave.

* jn/gitweb-highlite-sanitise (2011-09-16) 1 commit
  (merged to 'next' on 2011-09-26 at c79390a)
 + gitweb: Strip non-printable characters from syntax highlighter output

Will merge to "master" as the first wave.

* mh/check-ref-format-3 (2011-09-16) 22 commits
 - add_ref(): verify that the refname is formatted correctly
 - resolve_ref(): expand documentation
 - resolve_ref(): also treat a too-long SHA1 as invalid
 - resolve_ref(): emit warnings for improperly-formatted references
 - resolve_ref(): verify that the input refname has the right format
 - remote: avoid passing NULL to read_ref()
 - remote: use xstrdup() instead of strdup()
 - resolve_ref(): do not follow incorrectly-formatted symbolic refs
 - resolve_ref(): extract a function get_packed_ref()
 - resolve_ref(): turn buffer into a proper string as soon as possible
 - resolve_ref(): only follow a symlink that contains a valid, normalized refname
 - resolve_ref(): use prefixcmp()
 - resolve_ref(): explicitly fail if a symlink is not readable
 - Change check_refname_format() to reject unnormalized refnames
 - Inline function refname_format_print()
 - Make collapse_slashes() allocate memory for its result
 - Do not allow ".lock" at the end of any refname component
 - Refactor check_refname_format()
 - Change check_ref_format() to take a flags argument
 - Change bad_ref_char() to return a boolean value
 - git check-ref-format: add options --allow-onelevel and --refspec-pattern
 - t1402: add some more tests

Will merge to "next".

* cn/eradicate-working-copy (2011-09-21) 1 commit
  (merged to 'next' on 2011-09-26 at 2683d36)
 + Remove 'working copy' from the documentation and C code

Will merge to "master" as the first wave.

* js/bisect-no-checkout (2011-09-21) 1 commit
  (merged to 'next' on 2011-09-21 at e94ad3e)
 + bisect: fix exiting when checkout failed in bisect_start()

Will merge to "master" as the third wave.

* mg/maint-doc-sparse-checkout (2011-09-21) 3 commits
  (merged to 'next' on 2011-09-21 at f316dec)
 + git-read-tree.txt: correct sparse-checkout and skip-worktree description
 + git-read-tree.txt: language and typography fixes
 + unpack-trees: print "Aborting" to stderr

Will merge to "master" as the first wave.

* ms/patch-id-with-overlong-line (2011-09-22) 1 commit
  (merged to 'next' on 2011-09-26 at a33d0b2)
 + patch-id.c: use strbuf instead of a fixed buffer

Will merge to "master" as the first wave.

* sn/doc-update-index-assume-unchanged (2011-09-21) 1 commit
  (merged to 'next' on 2011-09-21 at 325e796)
 + Documentation/git-update-index: refer to 'ls-files'

Will merge to "master" as the first wave.

* jc/request-pull-show-head-4 (2011-09-21) 7 commits
 - request-pull: use the branch description
 - request-pull: state what commit to expect
 - request-pull: modernize style
 - branch: teach --edit-description option
 - format-patch: use branch description in cover letter
 - branch: add read_branch_desc() helper function
 - Merge branch 'bk/ancestry-path' into jc/branch-desc
 (this branch uses bk/ancestry-path.)

Will merge to "next".

* jm/mergetool-pathspec (2011-09-26) 2 commits
  (merged to 'next' on 2011-09-26 at f699566)
 + mergetool: no longer need to save standard input
 + mergetool: Use args as pathspec to unmerged files

Will merge to "master" as the second wave.

* nd/maint-autofix-tag-in-head (2011-09-18) 4 commits
  (merged to 'next' on 2011-09-27 at dc8e2e3)
 + Accept tags in HEAD or MERGE_HEAD
 + merge: remove global variable head[]
 + merge: use return value of resolve_ref() to determine if HEAD is invalid
 + merge: keep stash[] a local variable

Will merge to "master" as the third wave.

* jk/maint-fetch-submodule-check-fix (2011-09-12) 1 commit
  (merged to 'next' on 2011-09-12 at 3c73b8c)
 + fetch: avoid quadratic loop checking for updated submodules
 (this branch is used by jk/argv-array.)

Will merge to "master" as the first wave.

* bc/attr-ignore-case (2011-09-14) 5 commits
  (merged to 'next' on 2011-09-26 at 1e0814c)
 + attr: read core.attributesfile from git_default_core_config
 + attr.c: respect core.ignorecase when matching attribute patterns
 + builtin/mv.c: plug miniscule memory leak
 + cleanup: use internal memory allocation wrapper functions everywhere
 + attr.c: avoid inappropriate access to strbuf "buf" member

Will merge to "master" as the second wave.

* jc/maint-fsck-fwrite-size-check (2011-09-11) 1 commit
  (merged to 'next' on 2011-09-16 at 2258f11)
 + fsck: do not abort upon finding an empty blob

Will merge to "master" as the first wave.

* jk/argv-array (2011-09-14) 7 commits
  (merged to 'next' on 2011-09-16 at 90feab4)
 + run_hook: use argv_array API
 + checkout: use argv_array API
 + bisect: use argv_array API
 + quote: provide sq_dequote_to_argv_array
 + refactor argv_array into generic code
 + quote.h: fix bogus comment
 + add sha1_array API docs
 (this branch uses jk/maint-fetch-submodule-check-fix.)

This has a slight interaction with the "pending_sha1 without having to
read the object" work on rs/pending, but otherwise OK.

Will merge to "master" as the first wave.

* js/cred-macos-x-keychain-2 (2011-09-14) 1 commit
  (merged to 'next' on 2011-09-26 at 4f289a4)
 + contrib: add a pair of credential helpers for Mac OS X's keychain
 (this branch uses jk/http-auth-keyring.)

Will kick back to 'pu' together with 'jk/http-auth-keyring'.

* rj/maint-t9159-svn-rev-notation (2011-09-21) 1 commit
  (merged to 'next' on 2011-09-26 at 525a567)
 + t9159-*.sh: skip for mergeinfo test for svn <= 1.4

Will merge to "master" as the first wave.

* tr/doc-note-rewrite (2011-09-13) 1 commit
  (merged to 'next' on 2011-09-16 at 5fe813a)
 + Documentation: basic configuration of notes.rewriteRef

Will merge to "master" as the first wave.

* jk/default-attr (2011-09-12) 1 commit
 - attr: map builtin userdiff drivers to well-known extensions

Will discard, expecting a fresh re-roll.

* hl/iso8601-more-zone-formats (2011-09-12) 1 commit
  (merged to 'next' on 2011-09-12 at 270f5c7)
 + date.c: Support iso8601 timezone formats

Will merge to "master" as the first wave.

* jc/run-receive-hook-cleanup (2011-09-12) 1 commit
  (merged to 'next' on 2011-09-12 at 68dd431)
 + refactor run_receive_hook()
 (this branch is used by jc/signed-push and jc/signed-push-3.)

Just to make it easier to run a hook that reads from its standard input.
Will merge to "master" as the first wave.

* jk/for-each-ref (2011-09-08) 5 commits
  (merged to 'next' on 2011-09-14 at 36ed515)
 + for-each-ref: add split message parts to %(contents:*).
 + for-each-ref: handle multiline subjects like --pretty
 + for-each-ref: refactor subject and body placeholder parsing
 + t6300: add more body-parsing tests
 + t7004: factor out gpg setup

Will merge to "master" as the first wave.

* wh/normalize-alt-odb-path (2011-09-07) 1 commit
  (merged to 'next' on 2011-09-14 at 96f722b)
 + sha1_file: normalize alt_odb path before comparing and storing

Will merge to "master" as the first wave.

* fk/use-kwset-pickaxe-grep-f (2011-09-11) 2 commits
  (merged to 'next' on 2011-09-14 at 436d858)
 + obstack.c: Fix some sparse warnings
 + sparse: Fix an "Using plain integer as NULL pointer" warning

Will merge to "master" as the first wave.

* jc/make-static (2011-09-14) 4 commits
  (merged to 'next' on 2011-09-14 at c5943ff)
 + exec_cmd.c: prepare_git_cmd() is sometimes used
 + environment.c: have_git_dir() has users on Cygwin
  (merged to 'next' on 2011-09-11 at 2acb0af)
 + vcs-svn: remove unused functions and make some static
 + make-static: master

Will discard (or at least kick it back to 'pu').

* rj/quietly-create-dep-dir (2011-09-11) 1 commit
  (merged to 'next' on 2011-09-12 at 93d1c6b)
 + Makefile: Make dependency directory creation less noisy

Will merge to "master" as the first wave.

* mz/remote-rename (2011-09-11) 4 commits
  (merged to 'next' on 2011-09-26 at 5e64f68)
 + remote: only update remote-tracking branch if updating refspec
 + remote rename: warn when refspec was not updated
 + remote: "rename o foo" should not rename ref "origin/bar"
 + remote: write correct fetch spec when renaming remote 'remote'

Will merge to "master" as the second wave.

* cb/common-prefix-unification (2011-09-12) 3 commits
  (merged to 'next' on 2011-09-14 at 24f571f)
 + rename pathspec_prefix() to common_prefix() and move to dir.[ch]
 + consolidate pathspec_prefix and common_prefix
 + remove prefix argument from pathspec_prefix

Will merge to "master" as the second wave.

* cb/send-email-help (2011-09-12) 1 commit
  (merged to 'next' on 2011-09-14 at ae71999)
 + send-email: add option -h

Will merge to "master" as the first wave.

* jc/fetch-pack-fsck-objects (2011-09-04) 3 commits
  (merged to 'next' on 2011-09-12 at a031347)
 + test: fetch/receive with fsckobjects
 + transfer.fsckobjects: unify fetch/receive.fsckobjects
 + fetch.fsckobjects: verify downloaded objects

We had an option to verify the sent objects before accepting a push but
lacked the corresponding option when fetching. In the light of the recent
k.org incident, a change like this would be a good addition.

Will merge to "master" as the first wave.

* jc/fetch-verify (2011-09-01) 3 commits
  (merged to 'next' on 2011-09-12 at 3f491ab)
 + fetch: verify we have everything we need before updating our ref
 + rev-list --verify-object
 + list-objects: pass callback data to show_objects()
 (this branch uses jc/traverse-commit-list; is tangled with jc/receive-verify.)

During a fetch, we verify that the pack stream is self consistent,
but did not verify that the refs that are updated are consistent with
objects contained in the packstream, and this adds such a check.

Will merge to "master" as the first wave.

* jc/receive-verify (2011-09-09) 6 commits
  (merged to 'next' on 2011-09-12 at 856de78)
 + receive-pack: check connectivity before concluding "git push"
 + check_everything_connected(): libify
 + check_everything_connected(): refactor to use an iterator
 + fetch: verify we have everything we need before updating our ref
 + rev-list --verify-object
 + list-objects: pass callback data to show_objects()
 (this branch uses jc/traverse-commit-list; is tangled with jc/fetch-verify.)

While accepting a push, we verify that the pack stream is self consistent,
but did not verify that the refs the push updates are consistent with
objects contained in the packstream, and this adds such a check.

Will merge to "master" as the third wave.

* jn/maint-http-error-message (2011-09-06) 2 commits
  (merged to 'next' on 2011-09-12 at a843f03)
 + http: avoid empty error messages for some curl errors
 + http: remove extra newline in error message

Will merge to "master" as the second wave.

* bk/ancestry-path (2011-09-15) 4 commits
  (merged to 'next' on 2011-09-15 at aa64d04)
 + t6019: avoid refname collision on case-insensitive systems
  (merged to 'next' on 2011-09-02 at d05ba5d)
 + revision: do not include sibling history in --ancestry-path output
 + revision: keep track of the end-user input from the command line
 + rev-list: Demonstrate breakage with --ancestry-path --all
 (this branch is used by jc/request-pull-show-head-4.)

Will merge to "master" as the first wave.

* mg/branch-list (2011-09-13) 7 commits
  (merged to 'next' on 2011-09-14 at 6610a2e)
 + t3200: clean up checks for file existence
  (merged to 'next' on 2011-09-11 at 20a9cdb)
 + branch: -v does not automatically imply --list
  (merged to 'next' on 2011-09-02 at b818eae)
 + branch: allow pattern arguments
 + branch: introduce --list option
 + git-branch: introduce missing long forms for the options
 + git-tag: introduce long forms for the options
 + t6040: test branch -vv

Will merge to "master" as the first wave.

* mm/rebase-i-exec-edit (2011-08-26) 2 commits
  (merged to 'next' on 2011-09-02 at e75b1b9)
 + rebase -i: notice and warn if "exec $cmd" modifies the index or the working tree
 + rebase -i: clean error message for --continue after failed exec

Will merge to "master" as the first wave.

* mm/mediawiki-as-a-remote (2011-09-28) 6 commits
  (merged to 'next' on 2011-09-28 at a1c9ae5)
 + git-remote-mediawiki: allow a domain to be set for authentication
  (merged to 'next' on 2011-09-27 at 7ce8254)
 + git-remote-mediawiki: obey advice.pushNonFastForward
 + git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts
 + git-remote-mediawiki: trivial fixes
  (merged to 'next' on 2011-09-12 at 163c6a5)
 + git-remote-mediawiki: allow push to set MediaWiki metadata
 + Add a remote helper to interact with mediawiki (fetch & push)

Will merge to "master" as the first wave.

* bc/unstash-clean-crufts (2011-08-27) 4 commits
  (merged to 'next' on 2011-09-02 at 7bfd66f)
 + git-stash: remove untracked/ignored directories when stashed
 + t/t3905: add missing '&&' linkage
 + git-stash.sh: fix typo in error message
 + t/t3905: use the name 'actual' for test output, swap arguments to test_cmp

Will merge to "master" as the first wave.

* gb/am-hg-patch (2011-08-29) 1 commit
  (merged to 'next' on 2011-09-02 at 3edfe4c)
 + am: preliminary support for hg patches

Will merge to "master" as the first wave.

* jc/diff-index-unpack (2011-08-29) 3 commits
  (merged to 'next' on 2011-09-02 at 4206bd9)
 + diff-index: pass pathspec down to unpack-trees machinery
 + unpack-trees: allow pruning with pathspec
 + traverse_trees(): allow pruning with pathspec

Will merge to "master" as the first wave.

* nm/grep-object-sha1-lock (2011-08-30) 1 commit
  (merged to 'next' on 2011-09-02 at 336f57d)
 + grep: Fix race condition in delta_base_cache

Will merge to "master" as the first wave.

* tr/mergetool-valgrind (2011-08-30) 1 commit
  (merged to 'next' on 2011-09-02 at f5f2c61)
 + Symlink mergetools scriptlets into valgrind wrappers

Will merge to "master" as the first wave.

* fg/submodule-auto-push (2011-09-11) 2 commits
  (merged to 'next' on 2011-09-11 at 3fc86f7)
 + submodule.c: make two functions static
  (merged to 'next' on 2011-08-24 at 398e764)
 + push: teach --recurse-submodules the on-demand option
 (this branch is tangled with hv/submodule-merge-search.)

What the topic aims to achieve may make sense, but the implementation
looked somewhat suboptimal.

Will kick back to "pu" at least tentatively.

* jc/traverse-commit-list (2011-08-22) 3 commits
  (merged to 'next' on 2011-08-24 at df50dd7)
 + revision.c: update show_object_with_name() without using malloc()
 + revision.c: add show_object_with_name() helper function
 + rev-list: fix finish_object() call
 (this branch is used by jc/fetch-verify and jc/receive-verify.)

Will merge to "master" as the first wave.

* fk/make-auto-header-dependencies (2011-08-18) 1 commit
  (merged to 'next' on 2011-08-24 at 3da2c25)
 + Makefile: Use computed header dependencies if the compiler supports it
 (this branch is used by da/make-auto-header-dependencies.)

Will merge to "master" as the first wave.

* da/make-auto-header-dependencies (2011-08-30) 1 commit
  (merged to 'next' on 2011-09-02 at e04a4af)
 + Makefile: Improve compiler header dependency check
 (this branch uses fk/make-auto-header-dependencies.)

Will merge to "master" as the first wave.

* mh/iterate-refs (2011-09-11) 7 commits
  (merged to 'next' on 2011-09-27 at c289699)
 + refs.c: make create_cached_refs() static
 + Retain caches of submodule refs
 + Store the submodule name in struct cached_refs
 + Allocate cached_refs objects dynamically
 + Change the signature of read_packed_refs()
 + Access reference caches only through new function get_cached_refs()
 + Extract a function clear_cached_refs()

Will merge to "master" as the second wave.

* hv/submodule-update-none (2011-08-11) 2 commits
  (merged to 'next' on 2011-08-24 at 5302fc1)
 + add update 'none' flag to disable update of submodule by default
 + submodule: move update configuration variable further up

Will merge to "master" as the second wave.

* jc/lookup-object-hash (2011-08-11) 6 commits
  (merged to 'next' on 2011-08-24 at 5825411)
 + object hash: replace linear probing with 4-way cuckoo hashing
 + object hash: we know the table size is a power of two
 + object hash: next_size() helper for readability
 + pack-objects --count-only
 + object.c: remove duplicated code for object hashing
 + object.c: code movement for readability

I do not think there is anything fundamentally wrong with this series, but
the risk of breakage far outweighs observed performance gain in one
particular workload. Will keep it in 'next' at least for one cycle.

Will kick back to 'pu'.

* fg/submodule-git-file-git-dir (2011-08-22) 2 commits
  (merged to 'next' on 2011-08-23 at 762194e)
 + Move git-dir for submodules
 + rev-parse: add option --resolve-git-dir <path>

Will merge to "master" as the second wave.

* jk/http-auth-keyring (2011-09-28) 22 commits
  (merged to 'next' on 2011-09-28 at 65ce6c2)
 + credential-cache: don't cache items without context
  (merged to 'next' on 2011-09-16 at b4195eb)
 + check_expirations: don't copy over same element
 + t0300: add missing EOF terminator for <<
  (merged to 'next' on 2011-09-14 at 589c7c9)
 + credential-store: use a better storage format
 + t0300: make alternate username tests more robust
 + t0300: make askpass tests a little more robust
 + credential-cache: fix expiration calculation corner cases
 + docs: minor tweaks to credentials API
  (merged to 'next' on 2011-09-11 at 491ce6a)
 + credentials: make credential_fill_gently() static
  (merged to 'next' on 2011-08-03 at b06e80e)
 + credentials: add "getpass" helper
 + credentials: add "store" helper
 + credentials: add "cache" helper
 + docs: end-user documentation for the credential subsystem
 + http: use hostname in credential description
 + allow the user to configure credential helpers
 + look for credentials in config before prompting
 + http: use credential API to get passwords
 + introduce credentials API
 + http: retry authentication failures for all http requests
 + remote-curl: don't retry auth failures with dumb protocol
 + improve httpd auth tests
 + url: decode buffers that are not NUL-terminated
 (this branch is tangled with js/cred-macos-x-keychain-2.)

Will kick back to 'pu'.

* rr/revert-cherry-pick-continue (2011-09-11) 19 commits
  (merged to 'next' on 2011-09-11 at 7d78054)
 + builtin/revert.c: make commit_list_append() static
  (merged to 'next' on 2011-08-24 at 712c115)
 + revert: Propagate errors upwards from do_pick_commit
 + revert: Introduce --continue to continue the operation
 + revert: Don't implicitly stomp pending sequencer operation
 + revert: Remove sequencer state when no commits are pending
 + reset: Make reset remove the sequencer state
 + revert: Introduce --reset to remove sequencer state
 + revert: Make pick_commits functionally act on a commit list
 + revert: Save command-line options for continuing operation
 + revert: Save data for continuing after conflict resolution
 + revert: Don't create invalid replay_opts in parse_args
 + revert: Separate cmdline parsing from functional code
 + revert: Introduce struct to keep command-line options
 + revert: Eliminate global "commit" variable
 + revert: Rename no_replay to record_origin
 + revert: Don't check lone argument in get_encoding
 + revert: Simplify and inline add_message_to_msg
 + config: Introduce functions to write non-standard file
 + advice: Introduce error_resolve_conflict

Will merge to "master" as the first wave.

Note that generalized sequencer still needs a bit more thought (see the
summary by Ram at $gmane/179613).

^ permalink raw reply

* A note from the maintainer
From: Junio C Hamano @ 2011-10-05  2:22 UTC (permalink / raw)
  To: git

Welcome to git development community.

This message is written by the maintainer and talks about how Git
project is managed, and how you can work with it.

* Mailing list and the community

The development is primarily done on the Git mailing list. Help
requests, feature proposals, bug reports and patches should be sent to
the list address <git@vger.kernel.org>.  You don't have to be
subscribed to send messages.  The convention on the list is to keep
everybody involved on Cc:, so it is unnecessary to ask "Please Cc: me,
I am not subscribed".

Before sending patches, please read Documentation/SubmittingPatches
and Documentation/CodingGuidelines to familiarize yourself with the
project convention.

If you sent a patch and you did not hear any response from anybody for
several days, it could be that your patch was totally uninteresting,
but it also is possible that it was simply lost in the noise.  Please
do not hesitate to send a reminder message in such a case.  Messages
getting lost in the noise is a sign that people involved don't have
enough mental/time bandwidth to process them right at the moment, and
it often helps to wait until the list traffic becomes calmer before
sending such a reminder.

The list archive is available at a few public sites as well:

        http://news.gmane.org/gmane.comp.version-control.git/
        http://marc.theaimsgroup.com/?l=git
        http://www.spinics.net/lists/git/

and some people seem to prefer to read it over NNTP:

        nntp://news.gmane.org/gmane.comp.version-control.git

When you point at a message in a mailing list archive, using
gmane is often the easiest to follow by readers, like this:

        http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217

as it also allows people who subscribe to the mailing list as gmane
newsgroup to "jump to" the article.

Some members of the development community can sometimes also be found
on the #git IRC channel on Freenode.  Its log is available at:

        http://colabti.org/irclogger/irclogger_log/git

* Reporting bugs

When you think git does not behave as you expect, please do not stop your
bug report with just "git does not work".  "I tried to do X but it did not
work" is not much better, neither is "I tried to do X and git did Y, which
is broken".  It often is that what you expect is _not_ what other people
expect, and chances are that what you expect is very different from what
people who have worked on git have expected (otherwise, the behavior
would have been changed to match that expectation long time ago).

Please remember to always state

 - what you wanted to do;

 - what you did (the version of git and the command sequence to reproduce
   the behavior);

 - what you saw happen;

 - what you expected to see; and

 - how the last two are different.

See http://www.chiark.greenend.org.uk/~sgtatham/bugs.html for further
hints.

* Repositories, branches and documentation.

My public git.git repository is at:

        git://git.kernel.org/pub/scm/git/git.git/
	git://repo.or.cz/alt-git.git
	https://github.com/git/git
	https://code.google.com/p/git-core/

Impatient people might have better luck with the latter two (there are a
few other mirrors I push into at sourceforge and github as well).

Their gitweb interfaces are found at:

        http://git.kernel.org/?p=git/git.git
        http://repo.or.cz/w/alt-git.git

There are three branches in git.git repository that are not about the
source tree of git: "html", "man", and "todo".

The "html" and "man" are preformatted documentation from the tip of
the "master" branch; the tip of "html" is visible at:

        http://www.kernel.org/pub/software/scm/git/docs/
	http://git-core.googlecode.com/git-history/html/git.html

The above URL is the top-level documentation page, and it may have
links to documentation of older releases.

The "todo" branch was originally meant to contain a TODO list for me,
but is mostly used to keep some helper scripts I use to maintain git.
For example, the script that was used to maintain the two documentation
branches are found there as dodoc.sh, which may be a good demonstration
of how to use a post-update hook to automate a task after pushing into a
repository.

There are four branches in git.git repository that track the source tree
of git: "master", "maint", "next", and "pu".

The "master" branch is meant to contain what are very well tested and
ready to be used in a production setting.  Every now and then, a "feature
release" is cut from the tip of this branch and they typically are named
with three dotted decimal digits.  The last such release was 1.7.7 done on
Sept 30, 2011. You can expect that the tip of the "master" branch is always
more stable than any of the released versions.

Whenever a feature release is made, "maint" branch is forked off from
"master" at that point.  Obvious, safe and urgent fixes after a feature
release are applied to this branch and maintenance releases are cut from
it.  The maintenance releases are named with four dotted decimal, named
after the feature release they are updates to; the last such release was
1.7.6.4.  New features never go to this branch.  This branch is also
merged into "master" to propagate the fixes forward.

A new development does not usually happen on "master". When you send a
series of patches, after review on the mailing list, a separate topic
branch is forked from the tip of "master" and your patches are queued
there, and kept out of "master" while people test it out.  The quality of
topic branches are judged primarily by the mailing list discussions.

Topic branches that are in good shape are merged to the "next" branch. In
general, the "next" branch always contains the tip of "master".  It might
not be quite rock-solid production ready, but is expected to work more or
less without major breakage. The "next" branch is where new and exciting
things take place. A topic that is in "next" is expected to be polished to
perfection before it is merged to "master" (that's why "master" can be
expected to stay more stable than any released version).

The "pu" (proposed updates) branch bundles all the remaining topic
branches. The topics on the branch are not complete, well tested, nor well
documented and need further work. When a topic that was in "pu" proves to
be in testable shape, it is merged to "next".

You can run "git log --first-parent master..pu" to see what topics are
currently in flight.  Sometimes, an idea that looked promising turns out
to be not so good and the topic can be dropped from "pu" in such a case.

The two branches "master" and "maint" are never rewound, and "next"
usually will not be either.  After a feature release is made from
"master", however, "next" will be rebuilt from the tip of "master"
using the topics that didn't make the cut in the feature release.

Note that being in "next" is not a guarantee to appear in the next
release, nor even in any future release.  There were cases that topics
needed reverting a few commits in them before graduating to "master",
or a topic that already was in "next" was reverted from "next" because
fatal flaws were found in it after it was merged.


* Other people's trees, trusted lieutenants and credits.

Documentation/SubmittingPatches outlines to whom your proposed changes
should be sent.  As described in contrib/README, I would delegate fixes
and enhancements in contrib/ area to the primary contributors of them.

Although the following are included in git.git repository, they have their
own authoritative repository and maintainers:

 - git-gui/ comes from git-gui project, maintained by Pat Thoyts:

        git://repo.or.cz/git-gui.git

 - gitk-git/ comes from Paul Mackerras's gitk project:

        git://git.kernel.org/pub/scm/gitk/gitk.git

I would like to thank everybody who helped to raise git into the current
shape.  Especially I would like to thank the git list regulars whose help
I have relied on and expect to continue relying on heavily:

 - Linus Torvalds, Shawn Pearce, Johannes Schindelin, Nicolas Pitre,
   René Scharfe, Jeff King, Jonathan Nieder, Johan Herland, Johannes
   Sixt, Sverre Rabbelier, Michael J Gruber, Nguyễn Thái Ngọc Duy,
   Ævar Arnfjörð Bjarmason and Thomas Rast on general design and
   implementation issues and reviews on the mailing list.

 - Shawn and Nicolas Pitre on pack issues.

 - Martin Langhoff, Frank Lichtenheld and Ævar Arnfjörð Bjarmason on
   cvsserver and cvsimport.

 - Paul Mackerras on gitk.

 - Eric Wong, David D. Kilzer and Sam Vilain on git-svn.

 - Simon Hausmann and Pete Wyckoff on git-p4.

 - Jakub Narebski, John Hawley, Petr Baudis, Luben Tuikov, Giuseppe Bilotta on
   gitweb.

 - J. Bruce Fields, Jonathan Nieder, Michael J Gruber and Thomas Rast on
   documentation (and countless others for proofreading and fixing).

 - Alexandre Julliard on Emacs integration.

 - David Aguilar and Charles Bailey for taking good care of git-mergetool
   (and Theodore Ts'o for creating it in the first place) and git-difftool.

 - Johannes Schindelin, Johannes Sixt, Erik Faye-Lund and others for their
   effort to move things forward on the Windows front.

 - People on non-Linux platforms for keeping their eyes on portability;
   especially, Randal Schwartz, Theodore Ts'o, Jason Riedy, Thomas Glanzmann,
   Brandon Casey, Jeff King, Alex Riesen and countless others.

* This document

The latest copy of this document is found in git.git repository,
on 'todo' branch, as MaintNotes.

^ permalink raw reply

* Re: [PATCH 0/9] i18n: add PO files to po/
From: Jonathan Nieder @ 2011-10-05  3:16 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ævar Arnfjörð Bjarmason, git, Ramkumar Ramachandra,
	Peter Krefting, Marcin Cieślak, Sam Reed, Jan Engelhardt,
	Jan Krüger, Nguyễn Thái Ngọc
In-Reply-To: <7vaa9gbdyc.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:

> I _suspect_ that Jonathan might
> have been hinting me to eject everything under the current po/ directory,
> and bind that part of the tree as a submodule from another repository,
> which would give us "git log -p" cleanliness automatically.

Hinting, in the sense that I didn't think of it at all, but I like the
idea very much.  Thanks!

^ permalink raw reply

* [RFC/PATCH] Add multiple workdir support to branch/checkout
From: Jay Soffian @ 2011-10-05  3:43 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian

When using 'git new-workdir', there is no safety mechanism to prevent the
same branch from being checked out twice, nor to prevent a checked out
branch from being deleted.

By teaching 'checkout' to record the workdir path using
'branch.<name>.checkout' when switching branches, we can easily check if a
branch is already checked out in another workdir before switching to that
branch. Similarly, we can now add a check before deleting a branch.

Allow 'checkout -f' to force the checkout and issue a warning
instead of an error.

Guard this behavior behind 'core.recordCheckouts', which we will
teach 'git new-workdir' to set in a followup commit.

Note: when switching away from a branch, we set 'branch.<name>.checkout'
to the empty string, instead of deleting it entirely, since git_config()
otherwise leaves behind an empty section which it does not re-use.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
 builtin/branch.c   |   10 ++++++++++
 builtin/checkout.c |   39 +++++++++++++++++++++++++++++++++++++++
 remote.c           |    4 ++++
 remote.h           |    1 +
 4 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index f49596f826..6ce1a5b133 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -182,6 +182,16 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
 			ret = 1;
 			continue;
 		}
+		if (kinds == REF_LOCAL_BRANCH) {
+			struct branch *branch = branch_get(bname.buf);
+			if (branch->work_tree && strlen(branch->work_tree)) {
+				error(_("Cannot delete the branch '%s' "
+					"which is currently checked out in '%s'"),
+				      bname.buf, branch->work_tree);
+				ret = 1;
+				continue;
+			}
+		}
 
 		free(name);
 
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 5e356a6c61..26259a41a7 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -33,6 +33,7 @@ struct checkout_opts {
 	int force_detach;
 	int writeout_stage;
 	int writeout_error;
+	int record_checkouts;
 
 	/* not set by parse_options */
 	int branch_exists;
@@ -709,12 +710,35 @@ static void orphaned_commit_warning(struct commit *commit)
 	for_each_ref(clear_commit_marks_from_one_ref, NULL);
 }
 
+static void record_checkout(const char *name, const char *work_tree)
+{
+	struct strbuf key = STRBUF_INIT;
+	strbuf_addf(&key, "branch.%s.checkout", name);
+	git_config_set(key.buf, work_tree);
+	strbuf_release(&key);
+}
+
+static void check_if_checked_out(struct checkout_opts *opts, const char *name)
+{
+	struct branch *branch = branch_get(name);
+	if (branch->work_tree && strlen(branch->work_tree) &&
+	    strcmp(branch->work_tree, get_git_work_tree())) {
+		if (opts->force)
+			warning(_("branch '%s' is currently checked out"
+				  " in '%s'"), name, branch->work_tree);
+		else
+			die(_("branch '%s' is currently checked out"
+			      " in '%s'"), name, branch->work_tree);
+	}
+}
+
 static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
 {
 	int ret = 0;
 	struct branch_info old;
 	unsigned char rev[20];
 	int flag;
+
 	memset(&old, 0, sizeof(old));
 	old.path = xstrdup(resolve_ref("HEAD", rev, 0, &flag));
 	old.commit = lookup_commit_reference_gently(rev, 1);
@@ -734,6 +758,9 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
 		parse_commit(new->commit);
 	}
 
+	if (opts->record_checkouts)
+		check_if_checked_out(opts, new->name);
+
 	ret = merge_working_tree(opts, &old, new);
 	if (ret)
 		return ret;
@@ -743,6 +770,14 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
 
 	update_refs_for_switch(opts, &old, new);
 
+	if (opts->record_checkouts) {
+		const char *work_tree = get_git_work_tree();
+		struct branch *branch = branch_get(old.name);
+		if (branch->work_tree && !strcmp(branch->work_tree, work_tree))
+			record_checkout(old.name, "");
+		record_checkout(new->name, work_tree);
+	}
+
 	ret = post_checkout_hook(old.commit, new->commit, 1);
 	free((char *)old.path);
 	return ret || opts->writeout_error;
@@ -756,6 +791,10 @@ static int git_checkout_config(const char *var, const char *value, void *cb)
 		return 0;
 	}
 
+	if (!strcmp(var, "core.recordcheckouts")) {
+		struct checkout_opts *opts = cb;
+		opts->record_checkouts = git_config_bool(var, value);
+	}
 	if (!prefixcmp(var, "submodule."))
 		return parse_submodule_config_option(var, value);
 
diff --git a/remote.c b/remote.c
index b8ecfa5d95..2bc063dae8 100644
--- a/remote.c
+++ b/remote.c
@@ -364,6 +364,10 @@ static int handle_config(const char *key, const char *value, void *cb)
 			if (!value)
 				return config_error_nonbool(key);
 			add_merge(branch, xstrdup(value));
+		} else if (!strcmp(subkey, ".checkout")) {
+			if (!value)
+				return config_error_nonbool(key);
+			branch->work_tree = xstrdup(value);
 		}
 		return 0;
 	}
diff --git a/remote.h b/remote.h
index 9a30a9dba6..4103ec7e31 100644
--- a/remote.h
+++ b/remote.h
@@ -126,6 +126,7 @@ int remote_find_tracking(struct remote *remote, struct refspec *refspec);
 struct branch {
 	const char *name;
 	const char *refname;
+	const char *work_tree;
 
 	const char *remote_name;
 	struct remote *remote;
-- 
1.7.7.4.g39e02c

^ permalink raw reply related

* Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
From: Jay Soffian @ 2011-10-05  3:48 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian
In-Reply-To: <1317786204-57335-1-git-send-email-jaysoffian@gmail.com>

On Tue, Oct 4, 2011 at 11:43 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> When using 'git new-workdir', there is no safety mechanism to prevent the
> same branch from being checked out twice, nor to prevent a checked out
> branch from being deleted.
>
> By teaching 'checkout' to record the workdir path using
> 'branch.<name>.checkout' when switching branches, we can easily check if a
> branch is already checked out in another workdir before switching to that
> branch. Similarly, we can now add a check before deleting a branch.
>
> Allow 'checkout -f' to force the checkout and issue a warning
> instead of an error.
>
> Guard this behavior behind 'core.recordCheckouts', which we will
> teach 'git new-workdir' to set in a followup commit.

Well, depending upon what folks think of this RFC, anyway.

> Note: when switching away from a branch, we set 'branch.<name>.checkout'
> to the empty string, instead of deleting it entirely, since git_config()
> otherwise leaves behind an empty section which it does not re-use.

Maybe this is a bug in git_config()? It seems like if it's removed the
last item from a section, it should remove the whole section OR it
should re-use an empty section.

j.

^ permalink raw reply

* Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
From: Nguyen Thai Ngoc Duy @ 2011-10-05  4:02 UTC (permalink / raw)
  To: Jay Soffian; +Cc: git
In-Reply-To: <1317786204-57335-1-git-send-email-jaysoffian@gmail.com>

On Wed, Oct 5, 2011 at 2:43 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> When using 'git new-workdir', there is no safety mechanism to prevent the
> same branch from being checked out twice, nor to prevent a checked out
> branch from being deleted.
>
> By teaching 'checkout' to record the workdir path using
> 'branch.<name>.checkout' when switching branches, we can easily check if a
> branch is already checked out in another workdir before switching to that
> branch. Similarly, we can now add a check before deleting a branch.
>
> Allow 'checkout -f' to force the checkout and issue a warning
> instead of an error.
>
> Guard this behavior behind 'core.recordCheckouts', which we will
> teach 'git new-workdir' to set in a followup commit.

I've wanted to to something like this, but you beat me to it ;)

Could you please consider a more generic approach? What I have in mind
is a mechanism to "lock" a branch, so that only commands that have the
key can update it.

So instead of branch.<name>.checkout, I would have something like
branch.<name>.locked = <key>, where <key> is just a string. Only
commands that provide the matching <key> are allowed to update the
branch. In checkout case, <key> could be "checkout: worktree".

This approach addresses more cases than just multiple workdir. We
could relax restrictions on pushing to a non-bare repository: we only
disallow pushing to locked branches. We can also use this to prevent
users from checking out another branch (by locking HEAD) while in the
middle of interactive rebase/bisect/...
-- 
Duy

^ permalink raw reply

* Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
From: Junio C Hamano @ 2011-10-05  4:07 UTC (permalink / raw)
  To: Jay Soffian; +Cc: git
In-Reply-To: <1317786204-57335-1-git-send-email-jaysoffian@gmail.com>

Jay Soffian <jaysoffian@gmail.com> writes:

> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 5e356a6c61..26259a41a7 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -709,12 +710,35 @@ static void orphaned_commit_warning(struct commit *commit)
>  	for_each_ref(clear_commit_marks_from_one_ref, NULL);
>  }
>  
> +static void record_checkout(const char *name, const char *work_tree)
> +{
> +	struct strbuf key = STRBUF_INIT;
> +	strbuf_addf(&key, "branch.%s.checkout", name);
> +	git_config_set(key.buf, work_tree);
> +	strbuf_release(&key);
> +}
> +
> +static void check_if_checked_out(struct checkout_opts *opts, const char *name)
> +{
> +	struct branch *branch = branch_get(name);
> +	if (branch->work_tree && strlen(branch->work_tree) &&
> +	    strcmp(branch->work_tree, get_git_work_tree())) {
> +		if (opts->force)
> +			warning(_("branch '%s' is currently checked out"
> +				  " in '%s'"), name, branch->work_tree);
> +		else
> +			die(_("branch '%s' is currently checked out"
> +			      " in '%s'"), name, branch->work_tree);
> +	}
> +}
> +
>  static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
>  {
>  	int ret = 0;
>  	struct branch_info old;
>  	unsigned char rev[20];
>  	int flag;
> +
>  	memset(&old, 0, sizeof(old));
>  	old.path = xstrdup(resolve_ref("HEAD", rev, 0, &flag));
>  	old.commit = lookup_commit_reference_gently(rev, 1);
> @@ -734,6 +758,9 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
>  		parse_commit(new->commit);
>  	}
>  
> +	if (opts->record_checkouts)
> +		check_if_checked_out(opts, new->name);

The close brace we can see in the context closes "if (!new->name) {", so
this codepath is very well prepared to be called with new->name == NULL.

Is check_if_checked_out() prepared to be called with name == NULL and do
the right thing?

> @@ -743,6 +770,14 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
>  
>  	update_refs_for_switch(opts, &old, new);
>  
> +	if (opts->record_checkouts) {
> +		const char *work_tree = get_git_work_tree();
> +		struct branch *branch = branch_get(old.name);
> +		if (branch->work_tree && !strcmp(branch->work_tree, work_tree))
> +			record_checkout(old.name, "");
> +		record_checkout(new->name, work_tree);
> +	}
> +

Likewise for new->name, but also old.name which is only set when old.path
is set and begins with "refs/heads/" and otherwise NULL.

^ permalink raw reply

* Re: [PATCH 0/9] i18n: add PO files to po/
From: Ramkumar Ramachandra @ 2011-10-05  4:09 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ævar Arnfjörð, Jonathan Nieder, git,
	Peter Krefting, Marcin Cieślak, Sam Reed, Jan Engelhardt,
	Jan Krüger, Nguyễn Thái Ngọc
In-Reply-To: <7vaa9gbdyc.fsf@alter.siamese.dyndns.org>

Hi,

Junio C Hamano writes:
> [...]
> have been hinting me to eject everything under the current po/ directory,
> and bind that part of the tree as a submodule from another repository,
> [...]

Desirable side effect: more people will start working on improving
git-submodule :)

-- Ram

^ permalink raw reply

* Re: Git Bug report
From: Johannes Sixt @ 2011-10-05  6:11 UTC (permalink / raw)
  To: Federico Lucifredi; +Cc: git
In-Reply-To: <1317763443.17036.15.camel@skyplex>

Am 10/4/2011 23:24, schrieb Federico Lucifredi:
> Hello Git list,
>  Found a minor bug in git today - the error message reported is not
> correct when trying to access a repo that is not accessible
> permission-wise:
> 
>> federico@skyplex:/etc$ git log
>> fatal: Not a git repository (or any of the parent directories): .git
> 
> with correct access permissions, everything works as expected.

And the correct error message is...?

>> drwx------   8 root root      4096 2011-10-03 16:53 .git

Assuming that you expected something like this:

fatal: .git: permission denied

it is hard to argue that a directory that happens to be named .git, but
was sealed by its owner should be assumed to be a git repository, albeit
one that we do not have access to. "Not a git repository" is an equally
justifyable error message, IMHO.

-- Hannes

^ permalink raw reply

* [PATCH] fix push --quiet: add 'quiet' capability to receive-pack
From: Clemens Buchacher @ 2011-10-05  6:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vaa9xyxpf.fsf@alter.siamese.dyndns.org>

Hi Junio,

Since 1.7.7 is out now, maybe you would like to pick this up again.

Cheers,
Clemens

On Wed, Sep 21, 2011 at 10:04:28PM -0700, Junio C Hamano wrote:
> 
> * cb/maint-quiet-push (2011-09-05) 4 commits
>  . t5541: avoid TAP test miscounting
>  . push: old receive-pack does not understand --quiet
>  . fix push --quiet via http
>  . tests for push --quiet
> 
> Dropped for rerolling after 1.7.7 cycle.

This is the re-rolled version based on current master, without the
backwards incompatible receive-pack --quiet option.

I squashed the tests in and added your unpack(void) fixup.

I have not added Michael's "t5541: avoid TAP test miscounting"
since I cannot reproduce the error:

 http://mid.gmane.org/e4e82f1267da3edfc600361de0041f618c31e30c.1315232475.git.git@drmicha.warpmail.net

And there is also this related patch "server_supports(): parse
feature list more carefully", which looked good to me:

 http://mid.gmane.org/7vmxejy9od.fsf@alter.siamese.dyndns.org

Does it need more work?

Clemens

--o<--
Currently, git push --quiet produces some non-error output, e.g.:

 $ git push --quiet
 Unpacking objects: 100% (3/3), done.

This fixes a bug reported for the fedora git package:

 https://bugzilla.redhat.com/show_bug.cgi?id=725593

Commit 90a6c7d4 (propagate --quiet to send-pack/receive-pack)
introduced the --quiet option to receive-pack and made send-pack
pass that option. Older versions of receive-pack do not recognize
the option, however, and terminate immediately. The commit was
therefore reverted.

This change instead adds a 'quiet' capability to receive-pack,
which is a backwards compatible.

In addition, this fixes push --quiet via http: A verbosity of 0
means quiet for remote helpers.

Reported-by: Jesse Keating <jkeating@redhat.com>
Reported-by: Tobias Ulmer <tobiasu@tmux.org>
Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
 builtin/receive-pack.c   |   14 ++++++++++++--
 builtin/send-pack.c      |   13 ++++++++++---
 remote-curl.c            |    4 +++-
 t/t5523-push-upstream.sh |    7 +++++++
 t/t5541-http-push.sh     |    8 ++++++++
 5 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ae164da..4419323 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -31,6 +31,7 @@ static int transfer_unpack_limit = -1;
 static int unpack_limit = 100;
 static int report_status;
 static int use_sideband;
+static int quiet;
 static int prefer_ofs_delta = 1;
 static int auto_update_server_info;
 static int auto_gc = 1;
@@ -114,7 +115,7 @@ static int show_ref(const char *path, const unsigned char *sha1, int flag, void
 	else
 		packet_write(1, "%s %s%c%s%s\n",
 			     sha1_to_hex(sha1), path, 0,
-			     " report-status delete-refs side-band-64k",
+			     " report-status delete-refs side-band-64k quiet",
 			     prefer_ofs_delta ? " ofs-delta" : "");
 	sent_capabilities = 1;
 	return 0;
@@ -636,6 +637,8 @@ static struct command *read_head_info(void)
 				report_status = 1;
 			if (strstr(refname + reflen + 1, "side-band-64k"))
 				use_sideband = LARGE_PACKET_MAX;
+			if (strstr(refname + reflen + 1, "quiet"))
+				quiet = 1;
 		}
 		cmd = xcalloc(1, sizeof(struct command) + len - 80);
 		hashcpy(cmd->old_sha1, old_sha1);
@@ -684,8 +687,10 @@ static const char *unpack(void)
 
 	if (ntohl(hdr.hdr_entries) < unpack_limit) {
 		int code, i = 0;
-		const char *unpacker[4];
+		const char *unpacker[5];
 		unpacker[i++] = "unpack-objects";
+		if (quiet)
+			unpacker[i++] = "-q";
 		if (receive_fsck_objects)
 			unpacker[i++] = "--strict";
 		unpacker[i++] = hdr_arg;
@@ -799,6 +804,11 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
 		const char *arg = *argv++;
 
 		if (*arg == '-') {
+			if (!strcmp(arg, "--quiet")) {
+				quiet = 1;
+				continue;
+			}
+
 			if (!strcmp(arg, "--advertise-refs")) {
 				advertise_refs = 1;
 				continue;
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index c1f6ddd..a8d6b4c 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -263,6 +263,8 @@ int send_pack(struct send_pack_args *args,
 		args->use_ofs_delta = 1;
 	if (server_supports("side-band-64k"))
 		use_sideband = 1;
+	if (!server_supports("quiet"))
+		args->quiet = 0;
 
 	if (!remote_refs) {
 		fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
@@ -301,11 +303,12 @@ int send_pack(struct send_pack_args *args,
 			char *old_hex = sha1_to_hex(ref->old_sha1);
 			char *new_hex = sha1_to_hex(ref->new_sha1);
 
-			if (!cmds_sent && (status_report || use_sideband)) {
-				packet_buf_write(&req_buf, "%s %s %s%c%s%s",
+			if (!cmds_sent && (status_report || use_sideband || args->quiet)) {
+				packet_buf_write(&req_buf, "%s %s %s%c%s%s%s",
 					old_hex, new_hex, ref->name, 0,
 					status_report ? " report-status" : "",
-					use_sideband ? " side-band-64k" : "");
+					use_sideband ? " side-band-64k" : "",
+					args->quiet ? " quiet" : "");
 			}
 			else
 				packet_buf_write(&req_buf, "%s %s %s",
@@ -439,6 +442,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
 				args.force_update = 1;
 				continue;
 			}
+			if (!strcmp(arg, "--quiet")) {
+				args.quiet = 1;
+				continue;
+			}
 			if (!strcmp(arg, "--verbose")) {
 				args.verbose = 1;
 				continue;
diff --git a/remote-curl.c b/remote-curl.c
index b8cf45a..2341106 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -762,7 +762,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
 		argv[argc++] = "--thin";
 	if (options.dry_run)
 		argv[argc++] = "--dry-run";
-	if (options.verbosity > 1)
+	if (options.verbosity == 0)
+		argv[argc++] = "--quiet";
+	else if (options.verbosity > 1)
 		argv[argc++] = "--verbose";
 	argv[argc++] = url;
 	for (i = 0; i < nr_spec; i++)
diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh
index c229fe6..9ee52cf 100755
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
@@ -108,4 +108,11 @@ test_expect_failure TTY 'push --no-progress suppresses progress' '
 	! grep "Writing objects" err
 '
 
+test_expect_success TTY 'quiet push' '
+	ensure_fresh_upstream &&
+
+	test_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&
+	test_cmp /dev/null output
+'
+
 test_done
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index a73c826..e756a08 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -5,6 +5,7 @@
 
 test_description='test smart pushing over http via http-backend'
 . ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
 
 if test -n "$NO_CURL"; then
 	skip_all='skipping test, git built without http support'
@@ -154,5 +155,12 @@ test_expect_success 'push (chunked)' '
 	 test $HEAD = $(git rev-parse --verify HEAD))
 '
 
+test_expect_success TTY 'quiet push' '
+	cd "$ROOT_PATH"/test_repo_clone &&
+	test_commit quiet &&
+	test_terminal git push --quiet --no-progress 2>&1 | tee output &&
+	test_cmp /dev/null output
+'
+
 stop_httpd
 test_done
-- 
1.7.6.1


^ permalink raw reply related

* Re: [PATCH] use -h for synopsis and --help for manpage consistently
From: Clemens Buchacher @ 2011-10-05  6:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vhb3penqw.fsf@alter.siamese.dyndns.org>

On Mon, Oct 03, 2011 at 03:03:51PM -0700, Junio C Hamano wrote:
> >  
> > -my @opts = ( 'help|h|H', 'version|V',
> > +my @opts = ( 'h', 'version|V',
> 
> I am a bit skeptical about the removal of 'H' here (also in git-svn).

I see. I'm ok with your fixup.

Clemens

^ permalink raw reply

* Re: What's cooking in git.git (Oct 2011, #01; Tue, 4)
From: Johannes Sixt @ 2011-10-05  6:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vvcs49ofl.fsf@alter.siamese.dyndns.org>

Am 10/5/2011 4:12, schrieb Junio C Hamano:
> * il/archive-err-signal (2011-10-03) 1 commit
>  - transport: do not allow to push over git:// protocol

Kindly fix up the commit message (delete the cruft) before you merge to next.

Thanks,
-- Hannes

^ permalink raw reply

* [PATCH WIP 0/3] git log --exclude
From: Nguyễn Thái Ngọc Duy @ 2011-10-05  7:18 UTC (permalink / raw)
  To: git; +Cc: Jonathan Nieder, Nguyễn Thái Ngọc Duy

This series adds --exclude that uses .gitignore mechanism remove
commits whose changes that are _entirely_ excluded. The main patch is
2/3 where it teaches diff_tree_* about struct exclude_list.

Because it uses .gitignore mechanism, beware that these patterns do
not behave exactly like pathspecs (patterns without slashes match
every directory, for example)

I tried these commands

  time git log --stat >/dev/null
  time git log --stat --exclude=Documentation >/dev/null

The former took 37 secs, the latter 40 secs. Not bad, but there is
definitely room for improvement. skip_excludes() should be able to
point out whether an entire directory is excluded and skip the whole
directory (as opposed to descending in and checking files one by one
now, in fear of negative patterns). These kinds of optimizations
benefit sparse checkout too.

I think I made a mistake somewhere because the above command seems to
remove more commits than it should... Regardless,
"git log --exclude=po" on gnome-shell looks sooo clean.

Nguyễn Thái Ngọc Duy (3):
  diff-no-index: rename read_directory to avoid conflict from dir.h
  tree-diff: teach it to understand exclude patterns
  log: add --exclude option

 diff-no-index.c |    6 ++--
 diff.h          |   11 ++++++++++
 revision.c      |    7 ++++-
 revision.h      |    2 +
 tree-diff.c     |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 5 files changed, 75 insertions(+), 9 deletions(-)

-- 
1.7.3.1.256.g2539c.dirty

^ 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