[PATCH 14/13] wildmatch: fix tests that fail on Windows due to path mangling

2012-11-04 Thread Johannes Sixt
Patterns beginning with a slash are converted to Windows paths before test-wildmatch gets to see them. Use a different first character. This does change the meaning of the test because the slash is special. But: - The first pair of changed lines the test is about '*' matching an empty string, wh

[PATCH as/check-ignore] t0007: fix tests on Windows

2012-11-04 Thread Johannes Sixt
The value of $global_excludes is sometimes part of the output that is tested for. Since git on Windows only sees DOS style paths, we have to ensure that the "expected" values are constructed in the same manner. To account for this, use $(pwd) to set the value of global_excludes. Additionally, add

[PATCH] git p4: RCS expansion should not span newlines

2012-11-04 Thread Pete Wyckoff
This bug was introduced in cb585a9 (git-p4: keyword flattening fixes, 2011-10-16). The newline character is indeed special, and $File$ expansions should not try to match across multiple lines. Based-on-patch-by: Chris Goard Signed-off-by: Pete Wyckoff --- cgo...@gmail.com wrote on Mon, 16 Jul

Re: checkout-index: unable to create file foo (File exists)

2012-11-04 Thread Pete Wyckoff
br...@interlinx.bc.ca wrote on Thu, 01 Nov 2012 16:25 -0400: > When we use git on a network filesystem, occasionally and sporadically > we will see the following from a git checkout command: > > error: git checkout-index: unable to create file foo (File exists) > > Through a very basic grepping a

[PATCH v2 1/5] push: return reject reasons via a mask

2012-11-04 Thread Chris Rorvick
Pass all rejection reasons back from transport_push(). The logic is simpler and more flexible with regard to providing useful feedback. Signed-off-by: Chris Rorvick --- builtin/push.c | 13 - transport.c| 17 - transport.h|9 + 3 files changed

[PATCH v2 2/5] push: add advice for rejected tag reference

2012-11-04 Thread Chris Rorvick
Advising the user to fetch and merge only makes sense if the rejected reference is a branch. If none of the rejections were for branches, tell the user they need to force the update(s). Signed-off-by: Chris Rorvick --- builtin/push.c | 16 ++-- cache.h|1 + remote.c

[PATCH v2 0/5] push: update remote tags only with force

2012-11-04 Thread Chris Rorvick
Patch series to prevent push from updating remote tags w/o forcing them. Split out original patch to ease review. Chris Rorvick (5): push: return reject reasons via a mask push: add advice for rejected tag reference push: flag updates push: flag updates that require force push: update re

[PATCH v2 3/5] push: flag updates

2012-11-04 Thread Chris Rorvick
If the reference exists on the remote and the the update is not a delete, then mark as an update. This is in preparation for handling tags and branches differently when pushing. Signed-off-by: Chris Rorvick --- cache.h |1 + remote.c | 19 --- 2 files changed, 13 insertio

[PATCH v2 5/5] push: update remote tags only with force

2012-11-04 Thread Chris Rorvick
References are allowed to update from one commit-ish to another if the former is a ancestor of the latter. This behavior is oriented to branches which are expected to move with commits. Tag references are expected to be static in a repository, though, thus an update to a tag (lightweight and anno

[PATCH v2 4/5] push: flag updates that require force

2012-11-04 Thread Chris Rorvick
Add a flag for indicating an update to a reference requires force. Currently the nonfastforward flag of a ref is used for this when generating status the status message. A separate flag insulates the status logic from the details of set_ref_status_for_push(). Signed-off-by: Chris Rorvick --- ca

[PATCH] Clarify how content states are to be built as the fast-import stream is interpreted.

2012-11-04 Thread Eric S. Raymond
--- Documentation/git-fast-import.txt |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 6603a7a..959e4d3 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt

[PATCH 0/5] Use string_lists when processing notes

2012-11-04 Thread Michael Haggerty
This simplifies the code. Also, sort lines all at once (O(N lg N)) rather than insertion sorting as lines are processed (O(N^2)) and fix the handling of empty values in GIT_NOTES_DISPLAY_REF and GIT_NOTES_REWRITE_REF. Michael Haggerty (5): string_list: add a function string_list_remove_empty_it

[PATCH 1/5] string_list: add a function string_list_remove_empty_items()

2012-11-04 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- Documentation/technical/api-string-list.txt | 9 - string-list.c | 9 + string-list.h | 7 +++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/technica

[PATCH 2/5] Initialize sort_uniq_list using named constant

2012-11-04 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.c b/notes.c index bc454e1..8652f8f 100644 --- a/notes.c +++ b/notes.c @@ -901,7 +901,7 @@ static int string_list_join_lines_helper(struct string_list_item *item, int combine_no

[PATCH 3/5] combine_notes_cat_sort_uniq(): sort and dedup lines all at once

2012-11-04 Thread Michael Haggerty
Instead of reading lines one by one and insertion-sorting them into a string_list, read all of the lines, sort them, then remove duplicates. Aside from being less code, this reduces the complexity from O(N^2) to O(N lg N) in the total number of lines. Signed-off-by: Michael Haggerty --- notes.c

[PATCH 4/5] notes: fix handling of colon-separated values

2012-11-04 Thread Michael Haggerty
The substrings output by strbuf_split() include the ':' delimiters. When processing GIT_NOTES_DISPLAY_REF and GIT_NOTES_REWRITE_REF, strip off the delimiter character *before* checking whether the substring is empty rather than after, so that empty strings within the list are also skipped. Signed-

[PATCH 5/5] string_list_add_refs_from_colon_sep(): use string_list_split()

2012-11-04 Thread Michael Haggerty
It makes for simpler code than strbuf_split(). Signed-off-by: Michael Haggerty --- notes.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/notes.c b/notes.c index 63b2a09..b823701 100644 --- a/notes.c +++ b/notes.c @@ -943,23 +943,18 @@ void string_list

Re: Wrap commit messages on `git commit -m`

2012-11-04 Thread Tay Ray Chuan
On Thu, Nov 1, 2012 at 11:29 AM, Lars Gullik Bjønnes wrote: > Ramkumar Ramachandra writes: > > | Hi, >> > | Some of my colleagues are lazy to fire up an editor and write proper > | commit messages- they often write one-liners using `git commit -m`. > | However, that line turns out to be longer th

Re: [PATCH 1/4] strbuf_split_buf(): use ALLOC_GROW()

2012-11-04 Thread Jeff King
On Sun, Nov 04, 2012 at 07:46:51AM +0100, Michael Haggerty wrote: > Use ALLOC_GROW() rather than inline code to manage memory in > strbuf_split_buf(). Rename "pos" to "nr" because it better describes > the use of the variable and it better conforms to the "ALLOC_GROW" > idiom. I suspect this was

Re: [PATCH 0/4] Simplify and document strbuf_split() functions

2012-11-04 Thread Jeff King
On Sun, Nov 04, 2012 at 07:46:50AM +0100, Michael Haggerty wrote: > The strbuf_split() family of functions was completely undocumented. > Add documentation and also simplify the definition of > strbuf_split_buf(). Thanks. Looks good overall, even with the comments I raised for patch 1 (I think it

Re: [PATCH 5/5] string_list_add_refs_from_colon_sep(): use string_list_split()

2012-11-04 Thread Jeff King
On Sun, Nov 04, 2012 at 08:07:10AM +0100, Michael Haggerty wrote: > It makes for simpler code than strbuf_split(). Agreed. I wonder how useful the strbuf_split functions really are. Callers might care about splitting content in a strbuf, but in general, getting a list of strbufs out is just a ha

Re: What's cooking in git.git (Oct 2012, #09; Mon, 29)

2012-11-04 Thread Jeff King
On Fri, Nov 02, 2012 at 09:33:14PM +, Ramsay Jones wrote: > >> I wonder if Ramsay has an older perl that does not do this special > >> hackery right. I'll see if I can dig up where it first appeared. > > Hmm, sorry for not specifying this upfront, but this failure is on Linux. ;-) Ah, that's

Re: [msysGit] Re: Git for Windows and line endings

2012-11-04 Thread Raja R Harinath
Hi, Chris B writes: [snip] > - Windows has been able to cope with UNIX line endings a long time; no > developer is using a default Notepad to open files with high > expectations. Any Windows development tool and editor worth anything > I've used is able to handle both just fine. > - VIM also hand

Re: [PATCH] Add rm to submodule command.

2012-11-04 Thread Jeff King
On Fri, Nov 02, 2012 at 10:26:11AM -0700, Alex Linden Levy wrote: > This change removes the config entries in .gitmodules and adds it. > --- Signoff? > git-submodule.sh | 62 > +++- > 1 file changed, 61 insertions(+), 1 deletion(-) No docume

Re: [PATCH] gitweb.perl: fix %highlight_ext

2012-11-04 Thread Jeff King
On Fri, Nov 02, 2012 at 02:18:09PM -0700, rh wrote: > > I think the patch itself looks OK, but: > > > > 1. It isn't formatted to apply with git-am. Please use > > git-format-patch. > > git format-patch command wouldn't work for me. I can see that you > don't need more stuff to do but not

Re: [PATCH] gitweb.perl: fix %highlight_ext mappings

2012-11-04 Thread Jeff King
On Fri, Nov 02, 2012 at 02:12:26PM -0700, rh wrote: > The previous change created a dictionary of one-to-one elements when > the intent was to map mutliple related types to one main type. > e.g. bash, ksh, zsh, sh all map to sh since they share similar syntax > This makes the mapping as the origin

Re: [PATCH] Add rm to submodule command.

2012-11-04 Thread Jens Lehmann
Am 04.11.2012 14:43, schrieb Jeff King: > On Fri, Nov 02, 2012 at 10:26:11AM -0700, Alex Linden Levy wrote: > >> This change removes the config entries in .gitmodules and adds it. >> --- > > Signoff? > >> git-submodule.sh | 62 >> +++- >> 1 f

What's cooking in git.git (Nov 2012, #01; Sun, 4)

2012-11-04 Thread Jeff King
What's cooking in git.git (Nov 2012, #01; Sun, 4) -- Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The third batch of topics has graduated to

Re: git-archive submodule support

2012-11-04 Thread Jens Lehmann
Am 04.11.2012 15:53, schrieb Rotem Yaari: > I was wondering if there are any plans to support inclusion of > submodules in git-archive. This is very useful for quickly preparing > ready-to-deploy archives of "unstable" branches etc., without the > users' need to clone submodule dependencies each ti

git commit/push can fail silently when clone omits ".git"

2012-11-04 Thread Jeffrey S. Haemer
Ladies and Gentlemen, I'm running git 1.7.9.5 on Ubuntu 12.04.1 LTS I got bitten by what follows. Yes, it's an edge case. Yes I now understand why it does what it does. Yes the right answer is "Don't do that, Jeff." :-) Still, it took me a little time to figure out what I'd done wrong because th

git svn problem, probably a regression

2012-11-04 Thread Joern Huxhorn
git svn failed on me with the following error while cloning an SVN repository: r1216 = fcf69d5102378ee41217d60384b96549bf2173cb (refs/remotes/svn/trunk) Found possible branch point: svn+ssh://@/trunk => svn+ssh://@/tags/_2008-10-22, 1216 Use of uninitialized value $u in substitution (s///) at