Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Junio C Hamano
Jeff King writes: > Eek, yeah, that's obviously wrong. Thanks for catching it. Fixing that > clears up all of the test failures outside of t5002. > > And if you move patch 5 ("special case paths that end with a slash") > into position 2, it cleans up the mid-series failures of t5002, making > the

Re: git subtree oddity

2013-03-28 Thread Junio C Hamano
Jeremy Rosen writes: >> I am starting to regret that I caved in and started carrying a >> copy of it in contrib/. It probably is a good idea to drop it >> from my tree and let it mature and eventually flourish outside. > > that's a shame... it solves a real problem, is simple to use, and > reall

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Rob Hoelz writes: > Honestly, if my workflow here is stupid and not "Git-like" and someone > has a better suggestion, I would happy to let my patch go. Using two > remotes is an option, but to me, using this triangular setup is just > easier. I think you are conflating two unrelated things. Pu

Re: Git and GSoC 2013

2013-03-28 Thread Junio C Hamano
Christian Couder writes: > On Thu, Mar 28, 2013 at 5:45 PM, Junio C Hamano wrote: > >> What I gathered from the discussion so far is that everybody agrees >> that our mentoring has been suboptimal in various ways (not enough >> encouragement to engage with the community early, working in the >>

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Rob Hoelz
On Thu, 28 Mar 2013 12:25:07 -0700 Jonathan Nieder wrote: > Josh Triplett wrote: > > > Related to this, as a path forward, I do think it makes sense to > > have a setting usable as an insteadOf that only applies to pushurl, > > even though pushInsteadOf won't end up serving that purpose. That >

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Fri, Mar 29, 2013 at 08:25:00AM +0700, Nguyen Thai Ngoc Duy wrote: > On Fri, Mar 29, 2013 at 4:47 AM, Jeff King wrote: > > +static int fnmatch_icase_mem(const char *pattern, int patternlen, > > +const char *string, int stringlen, > > +int

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 4:47 AM, Jeff King wrote: > +static int fnmatch_icase_mem(const char *pattern, int patternlen, > +const char *string, int stringlen, > +int flags) > +{ > + int match_status; > + struct strbuf pat_buf = STRB

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Duy Nguyen
On Fri, Mar 29, 2013 at 5:49 AM, Jeff King wrote: > My match_pathspec fix breaks at least t1011. Haven't looked closely at the series, but I suspect you need this http://article.gmane.org/gmane.comp.version-control.git/219008 -- Duy -- To unsubscribe from this list: send the line "unsubscribe g

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: > >> On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: >> >> > From: Junio C Hamano >> > >> > The function takes two counted strings ( and >> > ) as parameters, together with prefix (the >> > length of the

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: > On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: > > > From: Junio C Hamano > > > > The function takes two counted strings ( and > > ) as parameters, together with prefix (the > > length of the prefix in pattern that is to b

Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: > From: Junio C Hamano > > The function takes two counted strings ( and > ) as parameters, together with prefix (the > length of the prefix in pattern that is to be matched literally > without globbing against the basename) and EXC_* fla

Re: [PATCH v4 3/5] merge/pull: verify GPG signatures of commits being merged

2013-03-28 Thread Junio C Hamano
Sebastian Götte writes: > When --verify-signatures is specified on the command-line of git-merge > or git-pull, check whether the commits being merged have good gpg > signatures and abort the merge in case they do not. This allows e.g. > auto-deployment from untrusted repo hosts. > > Signed-off-b

Re: [PATCH v4 2/5] commit.c/GPG signature verification: Also look at the first GPG status line

2013-03-28 Thread Junio C Hamano
Sebastian Götte writes: > Signed-off-by: Sebastian Götte > --- > commit.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/commit.c b/commit.c > index 1aeb17a..533727c 100644 > --- a/commit.c > +++ b/commit.c > @@ -1027,8 +1027,8 @@ static struct { > char re

Re: [PATCH v3] checkout: avoid unnecessary match_pathspec calls

2013-03-28 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh > index 56090d2..5e01d58 100755 > --- a/t/t2022-checkout-paths.sh > +++ b/t/t2022-checkout-paths.sh > @@ -39,4 +39,25 @@ test_expect_success 'checking out paths out of a tree does > not clobber unre

Re: [PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters

2013-03-28 Thread Junio C Hamano
Jeff King writes: > This function takes two counted strings: a pair > and a pair. But we end up feeding the result to > fnmatch, which expects NUL-terminated strings. > > We can fix this by calling the fnmatch_icase_mem function, which > handles re-allocating into a NUL-terminated string if nec

Re: [PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:21:08PM -0400, Eric Sunshine wrote: > On Thu, Mar 28, 2013 at 5:50 PM, Jeff King wrote: > > A pattern "subdir" should match any path "subdir", whether it is a > > directory or a non-diretory. A pattern "subdir/" insists that a > > s/diretory/directory/ [1] I think I

Re: [PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Eric Sunshine
On Thu, Mar 28, 2013 at 5:50 PM, Jeff King wrote: > A pattern "subdir" should match any path "subdir", whether it is a > directory or a non-diretory. A pattern "subdir/" insists that a s/diretory/directory/ [1] > path "subdir" must be a directory for it to match. [1]: http://article.gmane.org

[PATCH 6/6] t: check that a pattern without trailing slash matches a directory

2013-03-28 Thread Jeff King
Prior to v1.8.1.1, with: git init echo content >foo && mkdir subdir && echo content >subdir/bar && echo "subdir export-ignore" >.gitattributes git add . && git commit -m one && git archive HEAD | tar tf - the resulting archive would contain only "foo" and ".gitattributes", not sub

[PATCH 5/6] attr.c::path_matches(): special case paths that end with a slash

2013-03-28 Thread Jeff King
From: Junio C Hamano The function is given a string that ends with a slash to signal that the path is a directory to make sure that a pattern that ends with a slash (i.e. MUSTBEDIR) can tell directories and non-directories apart. However, the pattern itself (pat->pattern and pat->patternlen) tha

[PATCH 4/6] dir.c::match_pathname(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
This function takes two counted strings: a pair and a pair. But we end up feeding the result to fnmatch, which expects NUL-terminated strings. We can fix this by calling the fnmatch_icase_mem function, which handles re-allocating into a NUL-terminated string if necessary. While we're at it, we

[PATCH 3/6] dir.c::match_pathname(): adjust patternlen when shifting pattern

2013-03-28 Thread Jeff King
If we receive a pattern that starts with "/", we shift it forward to avoid looking at the "/" part. Since the prefix and patternlen parameters are counts of what is in the pattern, we must decrement them as we increment the pointer. We remembered to handle prefix, but not patternlen. This didn't c

[PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters

2013-03-28 Thread Jeff King
From: Junio C Hamano The function takes two counted strings ( and ) as parameters, together with prefix (the length of the prefix in pattern that is to be matched literally without globbing against the basename) and EXC_* flags that tells it how to match the pattern against the basename. However

[PATCH 1/6] attr.c::path_matches(): the basename is part of the pathname

2013-03-28 Thread Jeff King
From: Junio C Hamano The function takes two strings (pathname and basename) as if they are independent strings, but in reality, the latter is always pointing into a substring in the former. Clarify this relationship by expressing the latter as an offset into the former. Signed-off-by: Junio C H

[PATCH v2 0/6] attribute regression fix for maint-1.8.1 and upward

2013-03-28 Thread Jeff King
On Tue, Mar 26, 2013 at 11:39:27AM -0700, Junio C Hamano wrote: > So here is an attempt to fix the unintended regression, on top of > 9db9eecfe5c2 (attr: avoid calling find_basename() twice per path, > 2013-01-16). It consists of four patches. Here's my update to the series. I think this should

Re: What's cooking in git.git (Mar 2013, #07; Tue, 26)

2013-03-28 Thread Junio C Hamano
John Keeping writes: > On Wed, Mar 27, 2013 at 03:15:44PM -0700, Junio C Hamano wrote: >> John Keeping writes: >> >> > On Wed, Mar 27, 2013 at 02:47:25PM -0700, Junio C Hamano wrote: >> >> > * jk/difftool-dir-diff-edit-fix (2013-03-14) 3 commits >> >> > (merged to 'next' on 2013-03-19 at e680

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 10:16, schrieb Ramkumar Ramachandra: > Jens Lehmann wrote: >> Unless you acknowledge that submodules are a different repo, you'll >> always run into problems. I believe future enhancements will make >> this less tedious, but in the end they will stay separate repos >> (which is the wh

Re: Git and GSoC 2013

2013-03-28 Thread Christian Couder
On Thu, Mar 28, 2013 at 5:45 PM, Junio C Hamano wrote: > Christian Couder writes: > >> On Wed, Mar 27, 2013 at 7:52 PM, Jonathan Nieder wrote: >>> Jeff King wrote: >>> There was a big thread about a month ago on whether Git should do Google Summer of Code this year[1]. >> >> I think we

Re: [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic

2013-03-28 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Running perlcritic with gentle severity reports six problems. The > following lists the line numbers on which the problems occur, along > with a description of the problem. This patch fixes them all, Thanks. > after > carefully considering the consequences. Hm

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 12:48, schrieb Ramkumar Ramachandra: > Okay, here's a first draft of the new design. The new mediator object > should look like: > > name = git > ref = v1.7.8 > > The name is looked up in refs/modules/, which in turn looks like: > > [submodule "git"] > origin =

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 12:11:55PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > One problem is that the content body sent along with the error is not > > necessarily appropriate for showing to the user (e.g., if it is HTML, it > > is probably not a good idea to show it on the terminal)

Re: Composing git repositories

2013-03-28 Thread Jens Lehmann
Am 28.03.2013 11:01, schrieb Ramkumar Ramachandra: > Jonathan Nieder wrote: >> Do you mean that you wish you could ignore subrepository boundaries >> and use commands like >> >> git clone --recurse-submodules http://git.zx2c4.com/cgit >> cd cgit >> vi git/cache.h >>

Re: [PATCH 3/4] attr.c::path_matches(): special case paths that end with a slash

2013-03-28 Thread Jeff King
On Tue, Mar 26, 2013 at 03:05:58PM -0400, Jeff King wrote: > On Tue, Mar 26, 2013 at 11:39:30AM -0700, Junio C Hamano wrote: > > > A similar adjustment for match_pathname() might be needed, but I > > didn't look into it. > [...] > We do seem to use strncmp_icase through the rest of the function,

Re: git subtree oddity

2013-03-28 Thread Thomas Taranowski
Oh, this is odd. I can get the behavior I want by adding the '-f' flag to the remote add. So: git remote add -f upstream git://gnuradio.org/gnuradio According to the remote add help, the -f is only doing a fetch, which I was doing as a manual step after the remote add. Another interesting artif

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jonathan Nieder
Jeff King wrote: > When we can make the code more readable _and_ help the compiler, I think > it is a no-brainer. Yep. :) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordom

Re: git subtree oddity

2013-03-28 Thread Thomas Taranowski
I agree that subtree solves some specific use cases I would like to support. In particular, I was hoping to use the subtree command in lieu of using the subtree merge strategy to manage and overlay changes to upstream projects, as well as other local components. At any rate, it looks like the pro

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Jonathan Nieder
Josh Triplett wrote: > Related to this, as a path forward, I do think it makes sense to have a > setting usable as an insteadOf that only applies to pushurl, even though > pushInsteadOf won't end up serving that purpose. That way, > pushInsteadOf covers the "map read-only repo url to pushable rep

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Junio C Hamano
Jeff King writes: > One problem is that the content body sent along with the error is not > necessarily appropriate for showing to the user (e.g., if it is HTML, it > is probably not a good idea to show it on the terminal). So I think we > would want to only show it when the server has indicated

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 11:50:08AM -0700, Junio C Hamano wrote: > Josh Triplett writes: > (on url.$base.pushInsteadOf) > >> If a remote has an explicit pushurl, git will ignore this setting for > >> that remote. > > That really meant what I just said above: git will prefer an explicit > > pushurl

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:48:43PM +, Ramsay Jones wrote: > > I'm OK with this, if it's the direction we want to go. But I thought the > > discussion kind of ended as "we do not care about these warnings on > > ancient versions of gcc; those people should use -Wno-error=uninitialized". > > Hm

Re: [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic

2013-03-28 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > Junio: In future, please tell me explicitly that you're expecting a > re-roll with an updated commit message. It wasn't obvious to me at > all. When there are questions in response to a patch, there are two possibilities: * temporary brainfart --- sorry for the

Re: [PATCH 1/2] fast-import: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:20:29PM +, Ramsay Jones wrote: > Jeff King wrote: > > On Tue, Mar 26, 2013 at 07:09:44PM +, Ramsay Jones wrote: > > > >> Commit cbfd5e1c ("drop some obsolete "x = x" compiler warning hacks", > >> 21-03-2013) removed a gcc hack that suppressed an "might be used >

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Ramsay Jones
Jeff King wrote: > On Tue, Mar 26, 2013 at 07:20:11PM +, Ramsay Jones wrote: > >> After commit cbfd5e1c ("drop some obsolete "x = x" compiler warning >> hacks", 21-03-2013) removed a gcc specific hack, older versions of >> gcc now issue an "'contents' might be used uninitialized" warning. >> I

Re: [PATCH 1/2] fast-import: Fix an gcc -Wuninitialized warning

2013-03-28 Thread Ramsay Jones
Jeff King wrote: > On Tue, Mar 26, 2013 at 07:09:44PM +, Ramsay Jones wrote: > >> Commit cbfd5e1c ("drop some obsolete "x = x" compiler warning hacks", >> 21-03-2013) removed a gcc hack that suppressed an "might be used >> uninitialized" warning issued by older versions of gcc. >> >> However,

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett writes: (on url.$base.pushInsteadOf) >> If a remote has an explicit pushurl, git will ignore this setting for >> that remote. > That really meant what I just said above: git will prefer an explicit > pushurl over the pushInsteadOf rewrite of url. Very correct. > It says nothing ab

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 11:41:20AM -0700, Jonathan Nieder wrote: > Jeff King wrote: > > > One problem is that the content body sent along with the error is not > > necessarily appropriate for showing to the user (e.g., if it is HTML, it > > is probably not a good idea to show it on the terminal).

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jonathan Nieder
Jeff King wrote: > One problem is that the content body sent along with the error is not > necessarily appropriate for showing to the user (e.g., if it is HTML, it > is probably not a good idea to show it on the terminal). So I think we > would want to only show it when the server has indicated vi

Re: More detailed error message for 403 forbidden.

2013-03-28 Thread Jeff King
On Wed, Mar 27, 2013 at 12:29:57PM +0900, Yi, EungJun wrote: > Currently, if user tried to access a git repository via HTTP and it > fails because the user's permission is not enough to access the > repository, git client tells that http request failed and the error > was 403 forbidden. The situa

Re: Composing git repositories

2013-03-28 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > Do you realize how difficult this is to implement? We'll need to > patch all the git commands to essentially do what we'd get for free if > the submodule were a tree object instead of a commit object (although > I'm not saying that's the Right thing to do). What are

Re: Git and GSoC 2013

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 09:45:02AM -0700, Junio C Hamano wrote: > It is preferrable if the decision were accompanied with a concrete > plan for us to prepare our mentoring capability better (if we want > to participate in future GSoC, that is), but I think it is a > separate issue, and I suspect t

Re: [PATCH v4 0/6] Support triangular workflows

2013-03-28 Thread Junio C Hamano
Jeff King writes: > Sometimes it's annoyingly verbose to break down a compound function. But > I think in this case, you can make your tests more robust by just > checking the affirmative that the ref is still where we expect it to be, > like: > > check_push_result up_repo $the_first_commit hea

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: > >> Is there a simple way to verify an object name more strictly and convert >> it to an SHA1? I can only think of solutions that require two commands, >> like >> >> git cat-file -e $ARG && git rev-parse

[PATCH v10 5/5] Speed up log -L... -M

2013-03-28 Thread Thomas Rast
So far log -L only used the implicit diff filtering by pathspec. If the user specifies -M, we cannot do that, and so we simply handed the whole diff queue (which is approximately 'git show --raw') to diffcore_std(). Unfortunately this is very slow. We can optimize a lot if we throw out files tha

[PATCH v10 2/5] Export rewrite_parents() for 'log -L'

2013-03-28 Thread Thomas Rast
From: Bo Yang The function rewrite_one is used to rewrite a single parent of the current commit, and is used by rewrite_parents to rewrite all the parents. Decouple the dependence between them by making rewrite_one a callback function that is passed to rewrite_parents. Then export rewrite_parent

[PATCH v10 4/5] log -L: :pattern:file syntax to find by funcname

2013-03-28 Thread Thomas Rast
This new syntax finds a funcname matching /pattern/, and then takes from there up to (but not including) the next funcname. So you can say git log -L:main:main.c and it will dig up the main() function and show its line-log, provided there are no other funcnames matching 'main'. Signed-off-by:

[PATCH v10 0/5] git log -L

2013-03-28 Thread Thomas Rast
From: Thomas Rast This adds a bunch of fixes and failing tests for invalid -L arguments; as Antoine discovered, some variations would segfault v9. I also changed the beginning of parse_range_funcname (in patch 4/5), which now also lets you backslash-escape a : in a funcname regex. The old versi

[PATCH v10 1/5] Refactor parse_loc

2013-03-28 Thread Thomas Rast
From: Bo Yang We want to use the same style of -L n,m argument for 'git log -L' as for git-blame. Refactor the argument parsing of the range arguments from builtin/blame.c to the (new) file that will hold the 'git log -L' logic. To accommodate different data structures in blame and log -L, the

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread Junio C Hamano
John Koleszar writes: >> Facepalm. The intent here is to invert the grep, to make sure that the /ns/ >> does not appear in the output. No idea why I wrote it that way. Will fix. OK, "! grep /ns/ exp" would do. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the bod

Re: Git and GSoC 2013

2013-03-28 Thread Junio C Hamano
Christian Couder writes: > On Wed, Mar 27, 2013 at 7:52 PM, Jonathan Nieder wrote: >> Jeff King wrote: >> >>> There was a big thread about a month ago on whether Git should do Google >>> Summer of Code this year[1]. > > I think we should do it. > > It looks strange to me to say that students are

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 09:10:59AM -0700, Junio C Hamano wrote: > Josh Triplett writes: > > > OK, I take it back. I *can* imagine configurations that this change > > would break, since it does change intentional and documented behavior, > > but I don't have any such configuration. The only such

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 04:52:15PM +0100, Michael Haggerty wrote: > On 03/28/2013 04:38 PM, Jeff King wrote: > > On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: > > > >> Is there a simple way to verify an object name more strictly and convert > >> it to an SHA1? I can only thin

Re: git subtree oddity

2013-03-28 Thread Jeremy Rosen
> > I am starting to regret that I caved in and started carrying a copy > of it in contrib/. It probably is a good idea to drop it from my > tree and let it mature and eventually flourish outside. > that's a shame... it solves a real problem, is simple to use, and really powerfull. but unfor

Re: more git weirdness (git rebase, merge conflicts

2013-03-28 Thread Magnus Bäck
On Wednesday, March 27, 2013 at 14:51 EDT, "J.V." wrote: > I have a local/development branch tracked to origin/development. I > made no changes to local/dev and did a git pull with rebase, I did > not expect any conflicts. > > I got a conflict and was thrown onto another branch. I attempt

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread Josh Triplett
On Wed, Mar 27, 2013 at 11:02:28PM -0700, Junio C Hamano wrote: > John Koleszar writes: > > > Filter the list of refs returned via the dumb HTTP protocol according > > to the active namespace, consistent with other clients of the > > upload-pack service. > > > > Signed-off-by: John Koleszar > >

Re: which files will have conflicts between two branches?

2013-03-28 Thread Magnus Bäck
On Wednesday, March 27, 2013 at 17:48 EDT, "J.V." wrote: > I have two local branches (tracked to remote) that are in sync (did > a git pull on both branches from their corresponding remote). > > Is this the best way to merge? > > I would be merging local/branch1 => local/branch2 (test this

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett writes: > OK, I take it back. I *can* imagine configurations that this change > would break, since it does change intentional and documented behavior, > but I don't have any such configuration. The only such configuration I > can imagine involves directly counting on the non-rewri

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 08:37:58AM -0700, Junio C Hamano wrote: > Josh Triplett writes: > > > On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: > > ... > >> The test that checked that pushInsteadOf + pushurl shouldn't work as I > >> expect was actually broken; I have removed it, updated

Re: git subtree oddity

2013-03-28 Thread Junio C Hamano
Stephen Smith writes: > I built v1.8.2 last evening and found that the subtree command > isn't supported. What version of git are you using? And where did > you get it? We have been carrying a copy of it in contrib/ but I have to say that it is in a sorry state. After the original author stopp

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Wed, Mar 27, 2013 at 04:18:19PM -0700, Jonathan Nieder wrote: > Josh Triplett wrote: > > > I have a .gitconfig in my git-managed home > > directory which sets pushInsteadOf so that I can clone via git:// and > > immediately have working push. I work with a number of syste

Re: [PATCH] git help config: s/insn/instruction/

2013-03-28 Thread Junio C Hamano
Matthias Krüger writes: > On 03/28/2013 06:59 AM, Junio C Hamano wrote: >> Matthias Krüger writes: >> >>> "insn" appears to be an in-code abbreviation and should not appear in >>> manual/help pages. >>> --- >> Thanks; sign-off? > Oops, sorry. > > Signed-off-by: Matthias Krüger > > (Is this suf

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread John Koleszar
On Thu, Mar 28, 2013 at 8:52 AM, John Koleszar wrote: > On Thu, Mar 28, 2013 at 7:43 AM, Junio C Hamano wrote: >> >> John Koleszar writes: >> >> > diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh >> > index b5d7fbc..5a19d61 100755 >> > --- a/t/t5561-http-backend.sh >> > +++ b/t/t55

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Jonathan Nieder writes: > Josh Triplett wrote: > >> I have a .gitconfig in my git-managed home >> directory which sets pushInsteadOf so that I can clone via git:// and >> immediately have working push. I work with a number of systems that >> don't have inbound access to eac

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Michael Haggerty
On 03/28/2013 04:38 PM, Jeff King wrote: > On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: > >> Is there a simple way to verify an object name more strictly and convert >> it to an SHA1? I can only think of solutions that require two commands, >> like >> >> git cat-file -e $

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett writes: > On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: > ... >> The test that checked that pushInsteadOf + pushurl shouldn't work as I >> expect was actually broken; I have removed it, updated the >> documentation, and sent a new patch to the list. > > There's an argum

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 04:34:19PM +0100, Michael Haggerty wrote: > Is there a simple way to verify an object name more strictly and convert > it to an SHA1? I can only think of solutions that require two commands, > like > > git cat-file -e $ARG && git rev-parse --verify $ARG Is the rev-pa

Re: [PATCH v4 0/6] Support triangular workflows

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 06:56:36PM +0530, Ramkumar Ramachandra wrote: > Jeff King (1): > t5516 (fetch-push): drop implicit arguments from helper functions > > Ramkumar Ramachandra (5): > remote.c: simplify a bit of code using git_config_string() > t5516 (fetch-push): update test description

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Michael Haggerty
On 03/28/2013 02:48 PM, Junio C Hamano wrote: > I think it has always been about "is this well formed and we can turn it > into a raw 20-byte object name?" and never about"does it exist?" That's surprising. The man page says --verify The parameter given must be usable as a single, va

Re: [PATCH] gitk: Move hard-coded colors to .gitk

2013-03-28 Thread Ramkumar Ramachandra
Gauthier Östervall wrote: > Screenshot of my current coloring setup using this patch, based on > zenburn: > http://s11.postimg.org/hozbtsfj7/gitk_zenburn.png > And the .gitk used to that end: > https://gist.github.com/fleutot/5253281 This is a really cool color theme. Would we consider shipping s

Re: Git and GSoC 2013

2013-03-28 Thread Ramkumar Ramachandra
Jeff King wrote: > There was a big thread about a month ago on whether Git should do Google > Summer of Code this year[1]. Take only one or two students and get the entire community involved in learning from the GSoC experience, so we can do a bigger one next year. -- To unsubscribe from this list

Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate

2013-03-28 Thread Junio C Hamano
Junio C Hamano writes: > Ramkumar Ramachandra writes: > >> Configuration from test_config does not last beyond the end of the >> current test assertion, making each test easier to think about in >> isolation. >> >> Signed-off-by: Ramkumar Ramachandra >> --- >> Removed first hunk, as per Junio'

Re: [PATCH v4 0/6] Support triangular workflows

2013-03-28 Thread Junio C Hamano
Ramkumar Ramachandra writes: > The changes in this round are: > > 1. Peff submitted a patch to squash into [3/6]. Since his patch >essentially reverts mine, I've blamed him for the change. > > 2. Peff suggested a code movement in [5/6] to make things flow more >naturally. > > 3. Jonathan

Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate

2013-03-28 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Thanks, but doesn't yd/use-test-config-unconfig topic already > address this? Just saw it. 9d6aa64 is identical to my patch, but misses the fourth hunk. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 28, 2013 at 02:04:27PM +0100, Michael Haggerty wrote: > >> $ git rev-parse --verify >> >> $ echo $? >> 0 >> >> [...] >> >> I believe that "git rev-parse --verify" is meant to verify t

Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate

2013-03-28 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Configuration from test_config does not last beyond the end of the > current test assertion, making each test easier to think about in > isolation. > > Signed-off-by: Ramkumar Ramachandra > --- > Removed first hunk, as per Junio's comment. Thanks, but doesn't yd/

Re: [PATCH] http-backend: respect GIT_NAMESPACE with dumb clients

2013-03-28 Thread Junio C Hamano
John Koleszar writes: > diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh > index b5d7fbc..5a19d61 100755 > --- a/t/t5561-http-backend.sh > +++ b/t/t5561-http-backend.sh > @@ -134,6 +134,10 @@ POST /smart/repo.git/git-receive-pack HTTP/1.1 200 - > ### > GET /smart/repo.git/info/re

Re: [PATCH] use refnames instead of "left"/"right" in dirdiffs

2013-03-28 Thread John Keeping
On Thu, Mar 28, 2013 at 02:19:44PM +, John Keeping wrote: > On Thu, Mar 28, 2013 at 01:46:16PM +0100, Christoph Anton Mitterer wrote: > > On Wed, 2013-03-27 at 23:07 +, John Keeping wrote: > > > That's not going to work well on Windows, is it? > > > > Uhm Winwhat? No seriously... doesn't d

Re: [PATCH] use refnames instead of "left"/"right" in dirdiffs

2013-03-28 Thread John Keeping
On Thu, Mar 28, 2013 at 01:46:16PM +0100, Christoph Anton Mitterer wrote: > On Wed, 2013-03-27 at 23:07 +, John Keeping wrote: > > That's not going to work well on Windows, is it? > > Uhm Winwhat? No seriously... doesn't dir-diff fail ther anway? The mkdir > right now also uses mkpath with "/"

Re: Bug in "git rev-parse --verify"

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 02:04:27PM +0100, Michael Haggerty wrote: > $ git rev-parse --verify > > $ echo $? > 0 > > [...] > > I believe that "git rev-parse --verify" is meant to verify that the > argument is an actual

Re: propagating repo corruption across clone

2013-03-28 Thread Jeff Mitchell
On Wed, Mar 27, 2013 at 2:51 PM, Rich Fromm wrote: > Nevertheless, I will try to contact Jeff and point him at this. My initial > reading of his blog posts definitely gave me the impression that this was a > --mirror vs. not issue, but it really sounds like his main problem was using > --local.

Re: [PATCH v2] Avoid loading commits twice in log with diffs

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 09:19:34AM +0100, Thomas Rast wrote: > However, fixing the commits is easy at least at the band-aid level. > They are triggered by log_tree_diff() invoking diff_tree_sha1() on > commits, which duly loads the specified object to dereference it to a > tree. Since log_tree_di

Re: propagating repo corruption across clone

2013-03-28 Thread Jeff Mitchell
On Tue, Mar 26, 2013 at 11:47 PM, Junio C Hamano wrote: > The difference between --mirror and no --mirror is a red herring. > You may want to ask Jeff Mitchell to remove the mention of it; it > only adds to the confusion without helping users. If you made > byte-for-byte copy of corrupt repositor

Re: git subtree oddity

2013-03-28 Thread Stephen Smith
I built v1.8.2 last evening and found that the subtree command isn't supported. What version of git are you using? And where did you get it? SPS Sent from my iPhone On Mar 27, 2013, at 8:12 PM, Thomas Taranowski wrote: > I'd like to have the following configuration: > > /myproject.git > |__/

[PATCH 5/6] remote.c: introduce remote.pushdefault

2013-03-28 Thread Ramkumar Ramachandra
This new configuration variable defines the default remote to push to, and overrides `branch..remote` for all branches. It is useful in the typical triangular-workflow setup, where the remote you're fetching from is different from the remote you're pushing to. Signed-off-by: Ramkumar Ramachandra

[PATCH 6/6] remote.c: introduce branch..pushremote

2013-03-28 Thread Ramkumar Ramachandra
This new configuration variable overrides `remote.pushdefault` and `branch..remote` for pushes. When you pull from one place (e.g. your upstream) and push to another place (e.g. your own publishing repository), you would want to set `remote.pushdefault` to specify the remote to push to for all bra

[PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-28 Thread Ramkumar Ramachandra
Currently, do_push() in push.c calls remote_get(), which gets the configured remote for fetching and pushing. Replace this call with a call to pushremote_get() instead, a new function that will return the remote configured specifically for pushing. This function tries to work with the string push

[PATCH 2/6] t5516 (fetch-push): update test description

2013-03-28 Thread Ramkumar Ramachandra
The file was originally created in bcdb34f (Test wildcard push/fetch, 2007-06-08), and only contained tests that exercised wildcard functionality at the time. In subsequent commits, many other tests unrelated to wildcards were added but the test description was never updated. Fix this. Helped-by

[PATCH 3/6] t5516 (fetch-push): drop implicit arguments from helper functions

2013-03-28 Thread Ramkumar Ramachandra
From: Jeff King Many of the tests in t5516 look like: mk_empty && git push testrepo ... && check_push_result $commit heads/master It's reasonably easy to see what is being tested, with the exception that "testrepo" is a magic global name (it is implicitly used in the helpers, but we have

[PATCH 1/6] remote.c: simplify a bit of code using git_config_string()

2013-03-28 Thread Ramkumar Ramachandra
A small segment where handle_config() parses the branch.remote configuration variable can be simplified using git_config_string(). Signed-off-by: Ramkumar Ramachandra --- remote.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/remote.c b/remote.c index 174e48e..02e6c4c

[PATCH v4 0/6] Support triangular workflows

2013-03-28 Thread Ramkumar Ramachandra
Hi, The changes in this round are: 1. Peff submitted a patch to squash into [3/6]. Since his patch essentially reverts mine, I've blamed him for the change. 2. Peff suggested a code movement in [5/6] to make things flow more naturally. 3. Jonathan suggested a better test description in [

Bug in "git rev-parse --verify"

2013-03-28 Thread Michael Haggerty
On Junio's master, "git rev-parse --verify" accepts *any* 40-digit hexadecimal number. For example, pass it 40 "1" characters, and it accepts the argument: $ git rev-parse --verify $ echo $? 0 Obviously, my repo do

Re: [PATCH 3/6] t5516 (fetch-push): introduce mk_test_with_name()

2013-03-28 Thread Ramkumar Ramachandra
Jeff King wrote: > Subject: [PATCH] t5516: drop implicit arguments from helper functions Thanks a lot for this! I just had to s/ $repo_name/ "$repo_name"/ to fix the quoting. Will post a re-roll soon. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to m

  1   2   >