[PATCH 00/12] Layout control placeholders for pretty format

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This series was ejected out of pu some time ago due to gcc warnings. I did not have time to look at it (and it worked ok for me so it was not a pressing matter). This re-roll should fix that. For demonstration, try git log --pretty='format:%C(auto)%h %<(80,trunc)%s%>>(10,ltrunc)%C(auto)%d%>(15,m

[PATCH 08/12] pretty: two phase conversion for non utf-8 commits

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Always assume format_commit_item() takes an utf-8 string for string handling simplicity (we can handle utf-8 strings, but can't with other encodings). If commit message is in non-utf8, or output encoding is not, then the commit is first converted to utf-8, processed, then output converted to outpu

[PATCH 07/12] utf8: keep NULs in reencode_string()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
reencode_string() will be used in the next patch for re-encoding pretty output, which can contain NULs. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fast-export.c| 3 ++- builtin/mailinfo.c | 3 ++- compat/precompose_utf8.c | 2 +- notes.c | 4 +++- pretty.c

[PATCH 05/12] pretty: save commit encoding from logmsg_reencode if the caller needs it

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The commit encoding is parsed by logmsg_reencode, there's no need for the caller to re-parse it again. The reencoded message now have the new encoding, not the original one. The caller would need to read commit object again before parsing. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/blame.c

[PATCH 12/12] pretty: support %>> that steal trailing spaces

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This is pretty useful in `%<(100)%s%Cred%>(20)% an' where %s does not use up all 100 columns and %an needs more than 20 columns. By replacing %>(20) with %>>(20), %an can steal spaces from %s. %>> understands escape sequences, so %Cred does not stop it from stealing spaces in %<(100). Signed-off-

[PATCH 11/12] pretty: support truncating in %>, %< and %>

2013-03-15 Thread Nguyễn Thái Ngọc Duy
%>(N,trunc) truncates the righ part after N columns and replace the last two letters with "..". ltrunc does the same on the left. mtrunc cuts the middle out. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/pretty-formats.txt | 6 +++-- pretty.c | 51 +++

[PATCH 09/12] pretty: add %C(auto) for auto-coloring on the next placeholder

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This is not simply convenient over $C(auto,xxx). Some placeholders (actually only one, %d) do multi coloring and we can't emit a multiple colors with %C(auto,xxx). Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/pretty-formats.txt | 3 ++- pretty.c | 15 +++

[PATCH 10/12] pretty: support padding placeholders, %< %> and %>

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Either %<, %> or %<> standing before a placeholder specifies how many columns (at least as the placeholder can exceed it) it takes. Each differs on how spaces are padded: %< pads on the right (aka left alignment) %> pads on the left (aka right alignment) %>< pads both ways equally (aka cente

[PATCH 06/12] pretty: get the correct encoding for --pretty:format=%e

2013-03-15 Thread Nguyễn Thái Ngọc Duy
parse_commit_header() provides the commit encoding for '%e' and it reads it from the re-encoded message, which contains the new encoding, not the original one in the commit object. Get the commit encoding from logmsg_reencode() instead. Signed-off-by: Nguyễn Thái Ngọc Duy --- pretty.c | 13

[PATCH 04/12] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- utf8.c | 20 ++-- utf8.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/utf8.c b/utf8.c index 82c2ddf..38322a1 100644 --- a/utf8.c +++ b/utf8.c @@ -266,18 +266,26 @@ int utf8_width(const char **start, size_t *remain

[PATCH 03/12] utf8.c: move display_mode_esc_sequence_len() for use by other functions

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- utf8.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/utf8.c b/utf8.c index 1087870..82c2ddf 100644 --- a/utf8.c +++ b/utf8.c @@ -9,6 +9,20 @@ struct interval { int last; }; +static size_t display_m

[PATCH 02/12] pretty: share code between format_decoration and show_decorations

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This also adds color support to format_decoration() Signed-off-by: Nguyễn Thái Ngọc Duy --- log-tree.c | 60 +--- log-tree.h | 3 ++ pretty.c | 19 + t/t4207-log-decoration-colors

[PATCH 01/12] pretty-formats.txt: wrap long lines

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/pretty-formats.txt | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 105f18a..66345d1 100644 --- a/Documentation/pretty-formats.tx

[PATCH v3+ 1/5] wt-status: move strbuf into read_and_strip_branch()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The strbufs are placed outside read_and_strip_branch as a premature optimization: when it reads "refs/heads/foo" to strbuf and wants to return just "foo", it could do so without memory movement. In return the caller must not use the returned pointer after releasing strbufs, which own the buffers th

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2013 at 5:22 PM, Duy Nguyen wrote: > On Wed, Mar 13, 2013 at 11:16 PM, Junio C Hamano wrote: >> The noise this introduces to the test suite is a bit irritating and >> makes us think twice if this really a good change. > > I originally thought of two options, this or add an env fla

Re: git svn error "Not a valid object name"

2013-03-15 Thread Eric Wong
Adam Retter wrote: > Our public SourceForge Subversion repository is here: > http://svn.code.sf.net/p/exist/code/trunk/eXist It's asking me for a username/password... > We cloned that to the local server using rsync and are attempting to > migrate to git using the following commands: > > $ git

[PATCH] index-pack: fix buffer overflow caused by translations

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The translation of "completed with %d local objects" is put in a 48-byte buffer, which may be enough for English but not true for any translations. Convert it to use strbuf (i.e. no hard limit on translation length). Signed-off-by: Nguyễn Thái Ngọc Duy --- My bad, I should have checked this when

Re: [PATCH v1 22/45] archive: convert to use parse_pathspec

2013-03-15 Thread Duy Nguyen
On Sat, Mar 16, 2013 at 12:56 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> @@ -232,11 +228,18 @@ static int path_exists(struct tree *tree, const char >> *path) >> static void parse_pathspec_arg(const char **pathspec, >> struct archiver_args *ar_args) >> { >> -

regression in multi-threaded git-pack-index

2013-03-15 Thread Stefan Zager
We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack failed I have only been able to reproduce it on a Mac thus far; will try ubuntu next. We can make it go away

[PATCH] archive-zip: use deflateInit2() to ask for raw compressed data

2013-03-15 Thread René Scharfe
We use the function git_deflate_init() -- which wraps the zlib function deflateInit() -- to initialize compression of ZIP file entries. This results in compressed data prefixed with a two-bytes long header and followed by a four-bytes trailer. ZIP file entries consist of ZIP headers and raw compr

Re: [PATCH v1 44/45] pathspec: support :(glob) syntax

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy wrote: > +GIT_GLOB_PATHSPECS:: > + Setting this variable to `1` will cause git to treat all > + pathspecs as glob patterns (aka "glob" magic). Per recent git -> Git normalization, probably: s/git/Git/ > + > +GIT_NOGLOB_PATHSPECS::

Re: [PATCH v1 40/45] parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy wrote: > Prefix length is not preserved across commands when --literal-pathspecs > is specified (no magic is allowed, including 'prefix'). That's OK > because we all paths are literal. No magic, no special treatment s/we all/we know all/ ...or

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen writes: > Thanks, that looks good to me: > > # It took 2.58 seconds to enumerate untracked files. > # Consider the -u option for a possible speed-up? > > But: > If I follow the advice as is given and use "git status -u", the result is the > same. Yeah, that was taken from

Re: [PATCH v1 10/45] parse_pathspec: a special flag for max_depth feature

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy wrote: > match_pathspec_depth() and tree_entry_interesting() check max_depth > field in order to support "git grep --max-depth". The feature > activation is tied to "recursive" field, which led to some unwated s/unwated/unwanted/ > activation

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 15.03.13 21:06, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> > Thanks, I like that much better than mine >> > (and expere is probably a word not yet invented) > OK, then how about redoing Duy's patch like this on top? > > I've moved the timing collection from the caller to callee

Re: SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Joshua Jensen
- Original Message - From: Konstantin Khomoutov Date: 3/15/2013 11:03 AM On Fri, 15 Mar 2013 11:05:11 +0100 Kristof Mattei wrote: C:\Program Files (x86)\Git\bin>ssh -V OpenSSH_6.1p1, OpenSSL 1.0.1e 11 Feb 2013 Is there any way you can incorporate this update in the installer? Yes, yo

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen writes: > Thanks, I like that much better than mine > (and expere is probably a word not yet invented) OK, then how about redoing Duy's patch like this on top? I've moved the timing collection from the caller to callee, and I think the result is more readable. The message

git branch: multiple --merged and --no-merged options?

2013-03-15 Thread Jed Brown
I find myself frequently running commands like this $ comm -12 <(git branch --no-merged master) <(git branch --merged next) when checking for graduation candidates. Of course I first tried $ git branch --no-merged master --merged next but this is equivalent to $ git branch --merged next

Re: [PATCH v1 22/45] archive: convert to use parse_pathspec

2013-03-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > @@ -232,11 +228,18 @@ static int path_exists(struct tree *tree, const char > *path) > static void parse_pathspec_arg(const char **pathspec, > struct archiver_args *ar_args) > { > - ar_args->pathspec = pathspec = get_pathspec("", pathspec); > +

Re: [PATCH v1 00/45] nd/parse-pathspec and :(glob) pathspec magic

2013-03-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Probably not much to say. A big portion of this series is the > conversion to struct pathspec, which enables more use of pathspec > magic. :(glob) magic is added to verify that the conversion makes > sense. I haven't read any of these patches, but there remains on

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 03/15/2013 05:53 PM, Junio C Hamano wrote: Torsten Bögershausen writes: [PATCH] git status: Document that git status -uno is faster In some repostories users expere that "git status" command takes long time. expere??? Certainly you did not mean "expect". "observe", "experience", or "see

Re: building git ; need suggestion

2013-03-15 Thread Paul Campbell
On Fri, Mar 15, 2013 at 12:52 PM, Joydeep Bakshi wrote: > > On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson wrote: > >> On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: >>> [1] the server will have different git repo with branches >>> [2] there will be a web-based GUI which must be

Re: SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Konstantin Khomoutov
On Fri, 15 Mar 2013 11:05:11 +0100 Kristof Mattei wrote: > We're having issues with the version of SSH included in git version > 1.8.1.msysgit.1 (Git-1.8.1.2-preview20130201.exe) > > The included version of SSH is from 2007: > > C:\Program Files (x86)\Git\bin - Old>ssh -V > OpenSSH_4.6p1, OpenS

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen writes: > [PATCH] git status: Document that git status -uno is faster > > In some repostories users expere that "git status" command takes long time. expere??? Certainly you did not mean "expect". "observe", "experience", or "see", perhaps? > The command spends some time

Re: Tag peeling peculiarities

2013-03-15 Thread Junio C Hamano
Michael Haggerty writes: > What is stored in ref_value.peeled? Is it the peeled version of > ref_value.sha1, or is it the peeled version of the associated refname? > Because they are not necessarily the same thing: an entry in the packed > ref_cache *might* be overridden by a loose reference wit

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

2013-03-15 Thread Pete Wyckoff
gits...@pobox.com wrote on Wed, 13 Mar 2013 12:38 -0700: > Karsten Blees writes: > > > However, AFAIK inotify doesn't work recursively, so the daemon > > would at least have to track the directory structure to be able to > > register / unregister inotify handlers as directories come and go. > >

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Daniel Stenberg
On Fri, 15 Mar 2013, Junio C Hamano wrote: As for how ALL vs DEFAULT will act or differ in the future, I suspect that we will end up having them being the same (even when we add bits) as we've encouraged "ALL" in the documentation like this for quite some time. Thanks, then we should stick to

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Junio C Hamano
Daniel Stenberg writes: > (speaking from a libcurl perspective) > > As for how ALL vs DEFAULT will act or differ in the future, I suspect > that we will end up having them being the same (even when we add bits) > as we've encouraged "ALL" in the documentation like this for quite > some time. Tha

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Ramkumar Ramachandra
Torsten Bögershausen wrote: > [PATCH] git status: Document that git status -uno is faster Yes. I like this patch. > In some repostories users expere that "git status" command takes long time. > The command spends some time searching the file system for untracked files. > Document that searching

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 03/15/2013 01:30 PM, Duy Nguyen wrote: On Thu, Mar 14, 2013 at 10:05 PM, Junio C Hamano wrote: "to speed up by stopping displaying untracked files" does not look like giving a balanced suggestion. It is increasing the risk of forgetting about newly created files the user may want to add, bu

Re: building git ; need suggestion

2013-03-15 Thread Konstantin Khomoutov
On Fri, 15 Mar 2013 13:44:15 +0100 Fredrik Gustafsson wrote: [...] > The webgui that's most populair is cgit and git-web. They don't do ACL > afaik. gitweb passes around branch names using a specific parameter in the GET queries it operates on, like http://gitweb.domain.local/?p=repo.git;a=short

Re: building git ; need suggestion

2013-03-15 Thread Magnus Bäck
On Friday, March 15, 2013 at 08:52 EDT, Joydeep Bakshi wrote: > On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson wrote: > > > gitolite have a more fine ACL. Check it out. However it doesn't > > really meet your needs with web-interface (and I'm not even sure > > about the ACL thing is fine e

Re: building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson wrote: > On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: >> [1] the server will have different git repo with branches >> [2] there will be a web-based GUI which must be flexible to show just a >> specific branch of a repo based on u

Re: building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
forgot to mention: a code review system like gerrit is also helpful, but don't know if gerrit has such fine control mechanism. On 15-Mar-2013, at 5:54 PM, Joydeep Bakshi wrote: > Hello list, > > Greetings !!! > > I'm building a git repo on a dedicated server; hen

Re: building git ; need suggestion

2013-03-15 Thread Fredrik Gustafsson
On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: > [1] the server will have different git repo with branches > [2] there will be a web-based GUI which must be flexible to show just a > specific branch of a repo based on user authentication > [3] the web-based GUI should also have th

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2013 at 10:05 PM, Junio C Hamano wrote: >>> "to speed up by stopping displaying untracked files" does not look >>> like giving a balanced suggestion. It is increasing the risk of >>> forgetting about newly created files the user may want to add, but >>> the risk is not properly wa

building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
Hello list, Greetings !!! I'm building a git repo on a dedicated server; hence need some kind guidelines from you. [1] the server will have different git repo with branches [2] there will be a web-based GUI which must be flexible to show just a specific branch of a repo based on user authentic

[BUG?] google code http auth weirdness

2013-03-15 Thread Jeff King
I tried pushing to a repository at Google Code for the first time today, and I encountered some weird behavior with respect to asking for credentials. If I use the url "https://code.google.com/r/repo/";, everything works; I get prompted for my username/password. But if I instead use the url "http

Re: Bug: git web--browse doesn't recognise browser on OS X

2013-03-15 Thread Christian Couder
Hi, On Thu, Mar 14, 2013 at 12:39 PM, Timo Sand wrote: > Hi > > I tried to open a website by runnin 'git web--browse http://google.com' > and it replied 'No known browser available'. First git web--browse is a plumbing shell script to display documentation on a web browser when you type somethin

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Daniel Stenberg
On Thu, 14 Mar 2013, Junio C Hamano wrote: As to ALL vs DEFAULT, given that its manual page is riddled with a scary warning: This function must be called at least once within a program (a program is all the code that shares a memory space) before the program calls any other function i

SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Kristof Mattei
We're having issues with the version of SSH included in git version 1.8.1.msysgit.1 (Git-1.8.1.2-preview20130201.exe) The included version of SSH is from 2007: C:\Program Files (x86)\Git\bin - Old>ssh -V OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 Updating the OpenSSH component (downloaded with Cy