Re: [PATCH 02/15] t5510: prepare test refs more straightforwardly

2013-10-23 Thread Michael Haggerty
On 10/23/2013 08:36 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> "git fetch" was being used with contrived refspecs to create tags and >> remote-tracking branches in test repositories in preparation for the >> actual tests. This is obscure and also makes one wonder whether this >> i

Re: RFE: support change-id generation natively

2013-10-23 Thread Johannes Sixt
Am 10/24/2013 7:25, schrieb Duy Nguyen: > On Thu, Oct 24, 2013 at 11:11 AM, Nasser Grainawi > wrote: It is not clear to me how you envision to make it work. >>> >>> I don't have the source code. >> >> Now you do: >> https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/reso

Re: RFE: support change-id generation natively

2013-10-23 Thread Duy Nguyen
On Thu, Oct 24, 2013 at 11:11 AM, Nasser Grainawi wrote: >>> It is not clear to me how you envision to make it work. >> >> I don't have the source code. > > Now you do: > https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks/com

Re: RFE: support change-id generation natively

2013-10-23 Thread Nasser Grainawi
On Oct 23, 2013, at 8:07 PM, Duy Nguyen wrote: > On Wed, Oct 23, 2013 at 11:00 PM, Junio C Hamano wrote: >> Duy Nguyen writes: >> >>> On Wed, Oct 23, 2013 at 2:50 AM, Junio C Hamano wrote: It would be just the matter of updating commit_tree_extended() in commit.c to: - de

Re: git grep: search whole tree by default?

2013-10-23 Thread Jeff King
On Wed, Oct 23, 2013 at 10:43:36PM +0200, Matthieu Moy wrote: > That may be an option. In the case of "git add -u", it was a bit more > complicated, since a badly used "git add" somehow looses data (not very > serious, you may only loos the index). So, saying after the fact "oh, by > the way, I me

Re: git grep: search whole tree by default?

2013-10-23 Thread David Aguilar
On Wed, Oct 23, 2013 at 12:31 PM, Junio C Hamano wrote: > Jed Brown writes: > >> Junio C Hamano writes: >> >>> Jed Brown writes: >>> Junio C Hamano writes: > I suspect that it would be too late for 2.0 we want to do sometime > early next year, though. How would you manag

Re: RFE: support change-id generation natively

2013-10-23 Thread Duy Nguyen
On Wed, Oct 23, 2013 at 11:00 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Oct 23, 2013 at 2:50 AM, Junio C Hamano wrote: >>> It would be just the matter of updating commit_tree_extended() in >>> commit.c to: >>> >>> - detect the need to add a new Change-Id: trailer; >>> >>> - c

[PATCH v2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Nguyễn Thái Ngọc Duy
The old code does not do boundary check so any paths longer than PATH_MAX can cause buffer overflow. Replace it with strbuf to handle paths of arbitrary length. The OS may reject if the path is too long though. But in that case we report the cause (e.g. name too long) and usually move on to checki

Re: [PATCH 2/2] entry.c: convert write_entry to use strbuf

2013-10-23 Thread Duy Nguyen
On Thu, Oct 24, 2013 at 12:52 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> The strcpy call in open_output_fd() implies that the output buffer >> must be at least 25 chars long. > > Hmph, where does that 25 come from? > > [snipped] Much better. Thanks. -- Duy -- To unsubscribe f

Re: [PATCH v2 00/14] Officially start moving to the term 'staging area'

2013-10-23 Thread Karsten Blees
Am 19.10.2013 16:08, schrieb Philip Oakley: > From: "Karsten Blees" >> Am 15.10.2013 00:29, schrieb Felipe Contreras: >>> tl;dr: everyone except Junio C Hamano and Drew Northup agrees; we >>> should move >>> away from the name "the index". >>> >>> It has been discussed many times in the past that

Re: [PATCH v2 2/2] Update documentation for http.continue option

2013-10-23 Thread brian m. carlson
On Tue, Oct 22, 2013 at 08:21:48PM -0700, Shawn Pearce wrote: > From my perspective, it is OK to defaulting to use 100-continue if the > server supports Negotiate. If the user is stuck behind a broken proxy > and can't authenticate, they can't authenticate. They can either set > the variable to fal

Re: [PATCH v2 2/2] Update documentation for http.continue option

2013-10-23 Thread brian m. carlson
On Wed, Oct 23, 2013 at 08:47:57AM -0700, Junio C Hamano wrote: > Jonathan Nieder writes: > > > Wouldn't a natural fix be to *always* use "Expect: 100-continue" when > > and only when the probe_rpc() revealed a server supporting > > GSS-Negotiate authentication? > > A stupid question. Is GSS-Neg

What's cooking in git.git (Oct 2013, #05; Wed, 23)

2013-10-23 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. You can find the changes described here in the integration branches of the repositories listed at http://git-blame.blogspot.com/p/git-publi

Re: Working patterns

2013-10-23 Thread Junio C Hamano
wor...@alum.mit.edu (Dale R. Worley) writes: > It seems to me that the two sets of Git commands should be invokable > under the same circumstances, that there is a design specification as > to how Git can be invoked, and both implementations should match that. As far as I know, the design for any

Re: git grep: search whole tree by default?

2013-10-23 Thread Matthieu Moy
Jed Brown writes: > Junio C Hamano writes: > >> Jed Brown writes: >> >>> Junio C Hamano writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. >>> >>> How would you manage transition from the current behavior? Warning >>> people to explic

Working patterns

2013-10-23 Thread Dale R. Worley
> The pattern I use is to have this: > > /repository/.git > with core.worktree = /working > /working/... > > then > > cd /repository > git add /working/x/y > git ... The point I'm trying to make is that it appears that all of the Git command

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Jed Brown writes: > Junio C Hamano writes: > >> Jed Brown writes: >> >>> Junio C Hamano writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. >>> >>> How would you manage transition from the current behavior? Warning >>> people to explic

Rebasing merge commit fails during --preserve-merges when ancestor merge is deleted

2013-10-23 Thread John Feminella
I have this situation and an accompanying sample repository reproducing the issue: https://gist.github.com/fj/7124501/raw/8d37058c1452379d0ae58bd87b0b9e0380bd80b2/gistfile1.txt * I would like to rebase and delete a spurious ancestor merge commit (bbd8966 in the example). * When I do that, howeve

Re: git grep: search whole tree by default?

2013-10-23 Thread Jed Brown
Junio C Hamano writes: > Jed Brown writes: > >> Junio C Hamano writes: >>> I suspect that it would be too late for 2.0 we want to do sometime >>> early next year, though. >> >> How would you manage transition from the current behavior? Warning >> people to explicitly use "." or ":/" during som

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Jed Brown writes: > Junio C Hamano writes: >> I suspect that it would be too late for 2.0 we want to do sometime >> early next year, though. > > How would you manage transition from the current behavior? Warning > people to explicitly use "." or ":/" during some interim period sounds > worse th

Re: [PATCH 08/15] ref_remove_duplicates(): improve documentation comment

2013-10-23 Thread Junio C Hamano
Michael Haggerty writes: > Signed-off-by: Michael Haggerty Up to this point the patches all look very sensible (modulo minor nits I sent separately). Will come back to the rest of the topics later. Thanks. > --- > remote.h | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > >

Re: [PATCH 05/15] get_ref_map(): rename local variables

2013-10-23 Thread Junio C Hamano
Michael Haggerty writes: > Rename "refs" -> "refspecs" and "ref_count" -> "refspec_count" to > reduce confusion, because they describe an array of "struct refspec", > as opposed to the "struct ref" objects that are also used in this > function. Good. In general, we'd prefer to name an array of

Re: [PATCH 04/15] api-remote.txt: correct section "struct refspect"

2013-10-23 Thread Junio C Hamano
Michael Haggerty writes: >> Subject: Re: [PATCH 04/15] api-remote.txt: correct section "struct refspect" refspect??? > * Replace reference to function parse_ref_spec() with references to > functions parse_fetch_refspec() and parse_push_refspec(). > > * Correct description of src and dst: they

Re: [PATCH 02/15] t5510: prepare test refs more straightforwardly

2013-10-23 Thread Junio C Hamano
Michael Haggerty writes: > "git fetch" was being used with contrived refspecs to create tags and > remote-tracking branches in test repositories in preparation for the > actual tests. This is obscure and also makes one wonder whether this > is indeed just preparation or whether some side-effect

Re: git grep: search whole tree by default?

2013-10-23 Thread Jed Brown
Junio C Hamano writes: > I suspect that it would be too late for 2.0 we want to do sometime > early next year, though. How would you manage transition from the current behavior? Warning people to explicitly use "." or ":/" during some interim period sounds worse than just switching the default b

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Jeff King
On Wed, Oct 23, 2013 at 11:09:27AM -0700, Junio C Hamano wrote: > > This is not something you introduced, but while we are here, you may > > want to use ce->namelen, which would be a little faster than treating it > > as a string (especially for strbuf, as it can then know up front how big > > the

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Junio C Hamano
Jeff King writes: > On Wed, Oct 23, 2013 at 07:55:06PM +0700, Nguyen Thai Ngoc Duy wrote: > ... >> -memcpy(path, state->base_dir, len); >> -strcpy(path + len, ce->name); >> -len += ce_namelen(ce); >> +strbuf_reset(&path_buf); >> +strbuf_addf(&path_buf, "%.*s%s", state->base_di

Re: [PATCH 2/2] entry.c: convert write_entry to use strbuf

2013-10-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The strcpy call in open_output_fd() implies that the output buffer > must be at least 25 chars long. Hmph, where does that 25 come from? > And it's true. The only caller that > can trigger that code is checkout-index, which has the buffer of > PATH_MAX chars (and

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Jeff King
On Wed, Oct 23, 2013 at 07:34:18PM +0200, Erik Faye-Lund wrote: > >> - memcpy(path, state->base_dir, len); > >> - strcpy(path + len, ce->name); > >> - len += ce_namelen(ce); > >> + strbuf_reset(&path_buf); > >> + strbuf_addf(&path_buf, "%.*s%s", state->base_dir_len, > >> state

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Erik Faye-Lund
On Wed, Oct 23, 2013 at 7:29 PM, Jeff King wrote: > On Wed, Oct 23, 2013 at 07:55:06PM +0700, Nguyen Thai Ngoc Duy wrote: > >> The old code does not do boundary check so any paths longer than >> PATH_MAX can cause buffer overflow. Replace it with strbuf to handle >> paths of arbitrary length. > >

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Jeff King
On Wed, Oct 23, 2013 at 07:55:06PM +0700, Nguyen Thai Ngoc Duy wrote: > The old code does not do boundary check so any paths longer than > PATH_MAX can cause buffer overflow. Replace it with strbuf to handle > paths of arbitrary length. I think this is a reasonable solution. If we have such a lon

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Matthieu Moy writes: > In summary: changing is painful. The case of "git add" was really bad, > since the same command had different behavior depending on the options > given, so it was clearly worth the pain. In the case of "git grep", the > current behavior is not _that_ bad, so nobody bothered

Re: [PATCH 00/15] Change semantics of "fetch --tags"

2013-10-23 Thread Junio C Hamano
Michael Haggerty writes: > This is my proposed fix for the "local tag killer" problem that I > reported recently [1]. > > There are three main things changed by this patch series: > ... Haven't looked at any of the 1-15 messages, but the basic design to demote "--tags" from being an explicit "re

Re: git grep: search whole tree by default?

2013-10-23 Thread Matthieu Moy
Piotr Krukowiecki writes: > I think there were discussion about how there are several git commands > which do not search in whole tree by default and that it's going to be > changed. I think "add" is one of such commands. Is 'grep' left > unchanged? In summary: changing is painful. The case of "

Re: [PATCH] Clear fd after closing to avoid double-close error

2013-10-23 Thread Junio C Hamano
Jens Lindström writes: > On Tue, Oct 22, 2013 at 8:42 PM, Junio C Hamano wrote: >> Duy Nguyen writes: > >>> Life would have been simpler if fd[1] was _always_ closed by >>> send_pack(), like in c20181e (start_command(), if .in/.out > 0, closes >>> file descriptors, not the callers - 2008-02-21)

Re: RFE: support change-id generation natively

2013-10-23 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Oct 23, 2013 at 2:50 AM, Junio C Hamano wrote: >> It would be just the matter of updating commit_tree_extended() in >> commit.c to: >> >> - detect the need to add a new Change-Id: trailer; >> >> - call hash_sha1_file() on the commit object buffer (assuming that >>

[PATCH 13/15] builtin/remote.c: reorder function definitions

2013-10-23 Thread Michael Haggerty
Reorder function definitions to remove the need for forward declarations. Signed-off-by: Michael Haggerty --- builtin/remote.c | 159 +++ 1 file changed, 78 insertions(+), 81 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index

[PATCH 05/15] get_ref_map(): rename local variables

2013-10-23 Thread Michael Haggerty
Rename "refs" -> "refspecs" and "ref_count" -> "refspec_count" to reduce confusion, because they describe an array of "struct refspec", as opposed to the "struct ref" objects that are also used in this function. Signed-off-by: Michael Haggerty --- builtin/fetch.c | 12 ++-- 1 file change

[PATCH 09/15] builtin/fetch.c: reorder function definitions

2013-10-23 Thread Michael Haggerty
Reorder function definitions to avoid the need for a forward declaration of function find_non_local_tags(). Signed-off-by: Michael Haggerty --- builtin/fetch.c | 198 +++- 1 file changed, 97 insertions(+), 101 deletions(-) diff --git a/builtin

[PATCH 10/15] fetch --tags: fetch tags *in addition to* other stuff

2013-10-23 Thread Michael Haggerty
Previously, fetch's "--tags" option was considered equivalent to specifying the refspec "refs/tags/*:refs/tags/*" on the command line; in particular, it caused the remote..refspec configuration to be ignored. But it is not very useful to fetch tags without also fetching other references, whereas i

[PATCH 15/15] fetch, remote: properly convey --no-prune options to subprocesses

2013-10-23 Thread Michael Haggerty
If --no-prune is passed to one of the following commands: git fetch --all git fetch --multiple git fetch --recurse-submodules git remote update then it must also be passed to the "fetch" subprocesses that those commands use to do their work. Otherwise there might be a fetch.prune

[PATCH 11/15] fetch --prune: prune only based on explicit refspecs

2013-10-23 Thread Michael Haggerty
The old behavior of "fetch --prune" was to prune whatever was being fetched. In particular, "fetch --prune --tags" caused tags not only to be fetched, but also to be pruned. This is inappropriate because there is only one tags namespace that is shared among the local repository and all remotes.

[PATCH 00/15] Change semantics of "fetch --tags"

2013-10-23 Thread Michael Haggerty
This is my proposed fix for the "local tag killer" problem that I reported recently [1]. There are three main things changed by this patch series: 1. "git fetch --tags" causes tags to be fetched *in addition to* any other refspecs that are configured for the remote, rather than *instead of*

[PATCH 03/15] t5510: check that "git fetch --prune --tags" does not prune branches

2013-10-23 Thread Michael Haggerty
"git fetch --prune --tags" is currently interpreted as follows: * "--tags" is equivalent to specifying a refspec "refs/tags/*:refs/tags/*", and supersedes any default refspecs configured via remote.$REMOTE.fetch. * "--prune" only operates on the refspecs being fetched. Therefore, "git fetch

[PATCH 04/15] api-remote.txt: correct section "struct refspect"

2013-10-23 Thread Michael Haggerty
* Replace reference to function parse_ref_spec() with references to functions parse_fetch_refspec() and parse_push_refspec(). * Correct description of src and dst: they *do* include the '*' characters. Signed-off-by: Michael Haggerty --- Documentation/technical/api-remote.txt | 20 +

[PATCH 07/15] ref_remove_duplicates(): simplify function

2013-10-23 Thread Michael Haggerty
* Use a dedicated variable, ref, for referring to the current item rather than using the ref_map pointer for this purpose. * Use a (struct ref **) as iteration variable to avoid having to keep track of prev and next in addition to the pointer to the current item. Signed-off-by: Michael Hagg

Guten Tag ,

2013-10-23 Thread Mr.Gabriel Brock
Guten Tag , Ich bin Mr. Gabriel Brock Leiter Rechnungswesen Revision der Credit Suisse Bank North West London, hier in England. Ich schreibe Ihnen aus meinem Büro , die von einer großen immensen Nutzen für beide von uns sein wird. In meiner Abteilung , ein Filialleiter (Greater London region) ,

Re: Re* [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 5:44 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >>> def c_style_unescape(string): >>> if string[0] == string[-1] == '"': >>> return string.decode('string-escape')[1:-1] >>> return string >>> >>> It's in git-remote-bzr.py. >> >> Yeah, that's certa

[PATCH 12/15] query_refspecs(): move some constants out of the loop

2013-10-23 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- remote.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remote.c b/remote.c index 5ade07f..ff5b62a 100644 --- a/remote.c +++ b/remote.c @@ -829,6 +829,8 @@ static int query_refspecs(struct refspec *refs, int ref_count, struct refspec *

[PATCH 14/15] builtin/remote.c:update(): use struct argv_array

2013-10-23 Thread Michael Haggerty
Use struct argv_array for calling the "git fetch" subprocesses. Signed-off-by: Michael Haggerty --- builtin/remote.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index ecedd96..bffe2f9 100644 --- a/bui

[PATCH 02/15] t5510: prepare test refs more straightforwardly

2013-10-23 Thread Michael Haggerty
"git fetch" was being used with contrived refspecs to create tags and remote-tracking branches in test repositories in preparation for the actual tests. This is obscure and also makes one wonder whether this is indeed just preparation or whether some side-effect of "git fetch" is being tested. So

[PATCH 06/15] ref_remove_duplicates(): avoid redundant bisection

2013-10-23 Thread Michael Haggerty
The old code called string_list_lookup(), and if that failed called string_list_insert(), thus doing the bisection search through the string list twice in the latter code path. Instead, just call string_list_insert() right away. If an entry for that peer reference name already existed, then its u

[PATCH 08/15] ref_remove_duplicates(): improve documentation comment

2013-10-23 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- remote.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/remote.h b/remote.h index 131130a..40293c0 100644 --- a/remote.h +++ b/remote.h @@ -149,7 +149,14 @@ int resolve_remote_symref(struct ref *ref, struct ref *list); int ref_new

[PATCH 01/15] t5510: use the correct tag name in test

2013-10-23 Thread Michael Haggerty
Fix an apparent copy-paste error: A few lines earlier, a tag "refs/tags/sometag" is created. Check for the (non-)existence of that tag, not "somebranch", which is otherwise never mentioned in the script. Signed-off-by: Michael Haggerty --- t/t5510-fetch.sh | 2 +- 1 file changed, 1 insertion(+)

Re: [PATCH v2 2/2] Update documentation for http.continue option

2013-10-23 Thread Junio C Hamano
Jonathan Nieder writes: > Wouldn't a natural fix be to *always* use "Expect: 100-continue" when > and only when the probe_rpc() revealed a server supporting > GSS-Negotiate authentication? A stupid question. Is GSS-Negotiate the only special case? -- To unsubscribe from this list: send the line

Re* [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-23 Thread Junio C Hamano
Antoine Pelisse writes: >> def c_style_unescape(string): >> if string[0] == string[-1] == '"': >> return string.decode('string-escape')[1:-1] >> return string >> >> It's in git-remote-bzr.py. > > Yeah, that's certainly better, > > Thanks, OK, so an amended one will look like this

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 3:04 PM, Duy Nguyen wrote: > On Wed, Oct 23, 2013 at 7:58 PM, Antoine Pelisse wrote: >>> diff --git a/entry.c b/entry.c >>> index acc892f..d955af5 100644 >>> --- a/entry.c >>> +++ b/entry.c >>> @@ -237,16 +237,18 @@ static int check_path(const char *path, int len, >>> str

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Duy Nguyen
On Wed, Oct 23, 2013 at 7:58 PM, Antoine Pelisse wrote: >> diff --git a/entry.c b/entry.c >> index acc892f..d955af5 100644 >> --- a/entry.c >> +++ b/entry.c >> @@ -237,16 +237,18 @@ static int check_path(const char *path, int len, >> struct stat *st, int skiplen) >> int checkout_entry(struct cac

Re: [PATCH v2] Clear fd after closing to avoid double-close error

2013-10-23 Thread Duy Nguyen
On Tue, Oct 22, 2013 at 8:36 PM, Jens Lindström wrote: > From: Jens Lindstrom > > In send_pack(), clear the fd passed to pack_objects() by setting > it to -1, since pack_objects() closes the fd (via a call to > run_command()). Likewise, in get_pack(), clear the fd passed to > run_command(). > >

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 2:55 PM, Nguyễn Thái Ngọc Duy wrote: > The old code does not do boundary check so any paths longer than > PATH_MAX can cause buffer overflow. Replace it with strbuf to handle > paths of arbitrary length. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > To get this topic go

Re: [msysGit] [PATCH] Prevent buffer overflows when path is too big

2013-10-23 Thread Duy Nguyen
On Tue, Oct 22, 2013 at 2:02 AM, Johannes Sixt wrote: >> (or maybe at higher level to skip checking out those paths). > > More like this, yeah. The good thing is we do not stop checking out if one entry fails. But due to the lack of worktree entries, one may accidentally remove files in new commi

[PATCH 2/2] entry.c: convert write_entry to use strbuf

2013-10-23 Thread Nguyễn Thái Ngọc Duy
The strcpy call in open_output_fd() implies that the output buffer must be at least 25 chars long. And it's true. The only caller that can trigger that code is checkout-index, which has the buffer of PATH_MAX chars (and any systems that have PATH_MAX shorter than 25 chars are just insane). But in

[PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Nguyễn Thái Ngọc Duy
The old code does not do boundary check so any paths longer than PATH_MAX can cause buffer overflow. Replace it with strbuf to handle paths of arbitrary length. Signed-off-by: Nguyễn Thái Ngọc Duy --- To get this topic going again. These two patches kill PATH_MAX in entry.c and builtin/checkout

Re: Finding the repository

2013-10-23 Thread Duy Nguyen
On Wed, Oct 23, 2013 at 2:52 PM, Perry Hutchison wrote: > At least in version 1.7.0.4, it seems git does not like being run > from outside the repository, even if the file(s) being operated > on are inside the repository, unless it is given a pointer to the > repository via the --git-dir= option o

Re: [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 2:45 AM, Felipe Contreras wrote: > On Tue, Oct 22, 2013 at 3:49 PM, Antoine Pelisse wrote: > >> It is true that I have expected "valid output" from git-fast-export. >> And I don't have in mind any easy solution to detect that the output >> is broken, yet still accepted as

Finding the repository

2013-10-23 Thread Perry Hutchison
At least in version 1.7.0.4, it seems git does not like being run from outside the repository, even if the file(s) being operated on are inside the repository, unless it is given a pointer to the repository via the --git-dir= option or the GIT_DIR enironment variable. For example, suppose /foo/bar

git grep: search whole tree by default?

2013-10-23 Thread Piotr Krukowiecki
Hi, it would be nice if grep searched not only in current directory and subdirectories, but in whole tree. I know I can use ":/" as a pathspec, but since most git commands work tree, I got used to this and forgot that grep is different. It's easy to make a mistake and believe that your code does

Re: [PATCH] Clear fd after closing to avoid double-close error

2013-10-23 Thread Jens Lindström
On Tue, Oct 22, 2013 at 8:42 PM, Junio C Hamano wrote: > Duy Nguyen writes: >> Life would have been simpler if fd[1] was _always_ closed by >> send_pack(), like in c20181e (start_command(), if .in/.out > 0, closes >> file descriptors, not the callers - 2008-02-21). > > Yeah, that was also my fir