Re: [BUG?] git rebase not accepting :/ syntax

2012-09-10 Thread Yann Dirson
On Fri, 07 Sep 2012 15:54:49 +0200 Andreas Schwab sch...@linux-m68k.org wrote: Yann Dirson dir...@bertin.fr writes: In 1.7.10.3, git rebase -i :/Merge will complain with: fatal: Needed a single revision invalid upstream :/Merge ... whereas git rev-parse :/Merge has no problem

Re: [BUG?] git rebase not accepting :/ syntax

2012-09-10 Thread Joachim Schmitz
Yann Dirson wrote: On Fri, 07 Sep 2012 15:54:49 +0200 ... BTW, git-rebase.sh seems to be quite inconsistent on the use of $() vs. ``, not to mention the clear preference stated in CodingGuidelines. There are still quite a few more places in *.sh where `cmd`is used instead of $(cmd):

Re: [PATCH 2/4] Add a new function, filter_string_list()

2012-09-10 Thread Michael Haggerty
On 09/09/2012 11:40 AM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 8 string-list.c | 17 + string-list.h

Re: [PATCH 3/4] Add a new function, string_list_remove_duplicates()

2012-09-10 Thread Michael Haggerty
On 09/09/2012 11:45 AM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 4 string-list.c | 17 + string-list.h

Re: [PATCH 4/4] Add a function string_list_longest_prefix()

2012-09-10 Thread Michael Haggerty
On 09/09/2012 11:54 AM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: [...] diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt index 9206f8f..291ac4c 100644 --- a/Documentation/technical/api-string-list.txt +++

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Adam Spiers
On Tue, Sep 04, 2012 at 08:06:12PM +0700, Nguyen Thai Ngoc Duy wrote: On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers g...@adamspiers.org wrote: --- a/builtin/add.c +++ b/builtin/add.c @@ -273,7 +273,7 @@ static int add_files(struct dir_struct *dir, int flags) fprintf(stderr,

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Adam Spiers
On Wed, Sep 05, 2012 at 05:25:25PM +0700, Nguyen Thai Ngoc Duy wrote: On Wed, Sep 5, 2012 at 12:26 AM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: +static void output_exclude(const char *path, struct exclude *exclude) +{ + char *type =

Re: [PATCH 1/4] Add a new function, string_list_split_in_place()

2012-09-10 Thread Michael Haggerty
On 09/10/2012 07:47 AM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: ... Consider something like struct string_list *split_file_into_words(FILE *f) { char buf[1024]; struct string_list *list = new string list; list-strdup_strings =

Re: [PATCH 9/8] t0060: split absolute path test in two to exercise some of it on Windows

2012-09-10 Thread Michael Haggerty
Looks fine to me. Thanks! Michael On 09/09/2012 05:42 PM, Johannes Sixt wrote: Only the first half of the test works only on POSIX, the second half passes on Windows as well. A later test real path removes other extra slashes looks very similar, but it does not make sense to split it in

Re: [PATCH] Makefile: quiet shell commands when make --silent

2012-09-10 Thread Pete Wyckoff
gits...@pobox.com wrote on Sun, 09 Sep 2012 17:35 -0700: Pete Wyckoff p...@padd.com writes: Option --silent, --quiet or -s to make prevents echoing of commands as they are executed. However, there are some explicit echo commands in the Makefile and in the two GIT-VERSION-GEN scripts

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Nguyen Thai Ngoc Duy
On Mon, Sep 10, 2012 at 6:09 PM, Adam Spiers g...@adamspiers.org wrote: fprintf(stderr, %s\n, dir-ignored[i]-name); - fprintf(stderr, _(Use -f if you really want to add them.\n)); + fprintf(stderr, _(Use -f if you really want to add

Re: receive.denyNonNonFastForwards not denying force update

2012-09-10 Thread John Arthorne
Just to close the loop on this thread, it did turn out to be a permission problem in our case. It was difficult to track down because it was only a problem on one server in the cluster. Each server had a system git config file at /usr/local/etc/gitconfig. This was a symlink pointing to a single

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Jeff King
On Sun, Sep 09, 2012 at 03:44:54PM +0100, David Gould wrote: static void clear_child_for_cleanup(pid_t pid) { struct child_to_clean **last, *p; last = children_to_clean; for (p = children_to_clean; p; p = p-next) { if (p-pid == pid) {

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Erik Faye-Lund
On Mon, Sep 10, 2012 at 3:44 PM, Jeff King p...@peff.net wrote: On Sun, Sep 09, 2012 at 03:44:54PM +0100, David Gould wrote: You want something like: for (... { if (... { ... } last = p-next; } or (probably clearer, but I haven't read your coding style

Re: [PATCH 2/2] attr: binary attribute should choose built-in binary merge driver

2012-09-10 Thread Jeff King
On Sat, Sep 08, 2012 at 09:40:39PM -0700, Junio C Hamano wrote: The built-in binary attribute macro expands to -diff -text, so that textual diff is not produced, and the contents will not go through any CR/LF conversion ever. During a merge, it should also choose the binary low-level merge

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 03:58:40PM +0200, Erik Faye-Lund wrote: for (... { if (... { ... } last = p-next; } [...] I feel like bikeshedding a bit today! I tend to either prefer either the latter or something like this: while (p) { ...

Re: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Jeff King
On Sat, Sep 08, 2012 at 09:20:48PM +0200, Jan Engelhardt wrote: On Saturday 2012-09-08 20:59, Junio C Hamano wrote: diff --git a/daemon.c b/daemon.c index 4602b46..eaf08c2 100644 --- a/daemon.c +++ b/daemon.c @@ -1,3 +1,4 @@ +#include stdbool.h #include cache.h #include

Re: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Joachim Schmitz
Jeff King wrote: On Sat, Sep 08, 2012 at 09:20:48PM +0200, Jan Engelhardt wrote: On Saturday 2012-09-08 20:59, Junio C Hamano wrote: diff --git a/daemon.c b/daemon.c index 4602b46..eaf08c2 100644 --- a/daemon.c +++ b/daemon.c @@ -1,3 +1,4 @@ +#include stdbool.h #include cache.h #include

Re: [PATCH 1/4] Add a new function, string_list_split_in_place()

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: OK, so the bottom line would be to have two versions of the function. One takes a (const char *) and *requires* strdup_strings to be set on its input list: int string_list_split(struct string_list *list, const char *string,

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Jeff King
On Sun, Sep 09, 2012 at 12:24:58PM -0700, Junio C Hamano wrote: Having said all that, I am not sure if the fixing is really the right approach to begin with. Contrast these two: $ git blame MakeFILE $ git blame HEAD -- MakeFILE The latter, regardless of core.ignorecase, should

[RFC] Add edit action for interactive rebase?

2012-09-10 Thread Andrew Wong
Occasionally, while I'm in the middle of an interactive rebase, I'd change my mind about the todo list and want to modify it. This means manually digging out the todo file from the rebase directory, and invoking the editor. So I thought it might be convenient to have an edit action that simply

[PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Andrew Wong
This allows users to edit the todo list while they're in the middle of an interactive rebase. Signed-off-by: Andrew Wong andrew.k...@gmail.com --- git-rebase--interactive.sh | 6 ++ git-rebase.sh | 14 ++ 2 files changed, 20 insertions(+) diff --git

Re: checkout extra files

2012-09-10 Thread Jeff King
On Fri, Sep 07, 2012 at 01:49:15PM -0700, Junio C Hamano wrote: -- 8 -- gitcli: contrast wildcard given to shell and to git People who are not used to working with shell may intellectually understand how the command line argument is massaged by the shell but still have a hard time

Problems with repack during push

2012-09-10 Thread Rob Marshall
Hi, Whenever I do a git push origin of a new branch I see: Auto packing the repository for optimum performance. /usr/local/libexec/git-core/git-sh-setup: line 241: uname: command not found /usr/local/libexec/git-core/git-repack: line 56: rm: command not found

Re: [PATCH 4/4] Add a function string_list_longest_prefix()

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Another idea: in string-list.h, one could name parameters sorted_list when they must be sorted as a precondition of the function. That sounds like a very sensible thing to do. But before getting too hung up on finery, the effort might be better

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Matthieu Moy
Andrew Wong andrew.k...@gmail.com writes: This allows users to edit the todo list while they're in the middle of an interactive rebase. I like the idea. +edit) + git_sequence_editor $todo || +die_abort Could not execute editor + + exit + ;; Indent with space. Please, use tabs

Re: Problems with repack during push

2012-09-10 Thread Matthieu Moy
Rob Marshall rob.marshal...@gmail.com writes: If I do a 'git repack' it works fine, so are these messages coming from the remote server? I guess so, and your remote server has a restricted environment (chroot or so) with very few commands allowed, which prevents shell-scripts from executing

Re: [PATCH] cherry-pick: Append -x line on separate paragraph

2012-09-10 Thread Jeff King
On Sat, Sep 08, 2012 at 04:10:59PM +0200, Robin Stocker wrote: Maybe the solution is to detect if the original commit message ends with a trailer and in that case keep the existing behavior of not inserting a blank line? Yeah, that sounds like a good change from this makes the

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: Administrivia. Please never deflect direct responses to you with Mail-Followup-To header. I told my mailer to follow-up so that I could give you advice in response, while adding others in the discussion to Cc so that they do not have to repeat what I

Re: [PATCH 4/4] Add a function string_list_longest_prefix()

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 09:24:17AM -0700, Junio C Hamano wrote: While we're on the subject, it seems to me that documenting APIs like these in separate files under Documentation/technical rather than in the header files themselves - makes the documentation for a particular function

Re: [PATCH/RFC] grep: optionally show only the match

2012-09-10 Thread René Scharfe
Am 09.09.2012 23:58, schrieb Marcus Karlsson: Make git-grep optionally omit the parts of the line before and after the match. Signed-off-by: Marcus Karlsson m...@acc.umu.se --- Documentation/git-grep.txt | 8 +++- builtin/grep.c | 2 ++ grep.c | 7 +--

Confirm my false error suspicions of Gitweb query injection

2012-09-10 Thread Joseph Leong
Hi Everyone, I'm using Gitweb (Based on Git 1.7.9 on RHEL 5.8). I was poking around and tried a GET Request (REQ) with some SQL statements as a search query and noticed a 500. Can i just confirm with anyone here that the error message I'm seeing in the Response (RESP) is basically saying that

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Andrew Wong
On Mon, Sep 10, 2012 at 12:25 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Indent with space. Please, use tabs (same below). Ah, thanks. Good catch. Just edit may be a bit misleading, as we already have the edit action inside the todolist. I'd call this --edit-list to avoid

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 12:46:45PM -0400, Andrew Wong wrote: Just edit may be a bit misleading, as we already have the edit action inside the todolist. I'd call this --edit-list to avoid ambiguity. I thought that might be a bit confusing too. --edit-list doesn't seem informative about

Re: Problems with repack during push

2012-09-10 Thread Rob Marshall
OK, thanks. I'll check with the guy who set up the server. Rob On 9/10/12 12:26 PM, Matthieu Moy wrote: Rob Marshall rob.marshal...@gmail.com writes: If I do a 'git repack' it works fine, so are these messages coming from the remote server? I guess so, and your remote server has a

Re: checkout extra files

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: When writing a script that is expected to handle random user-input, it is a good practice to make it explicit which arguments are which by placing disambiguating `--` at appropriate places. Look at the paragraph below your addition. It is typographically

Re: Confirm my false error suspicions of Gitweb query injection

2012-09-10 Thread Matthieu Moy
Joseph Leong josephcle...@gmail.com writes: [RESP] 500 - Internal Server Error Unmatched ( in regex; marked by lt;-- HERE in m/( lt;-- HERE select 1234,/ at /var/www/git/gitweb.cgi line 4845. Gitweb is feeding your input as a perl regex, which is not really clean but shouldn't really harm

Re: checkout extra files

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 10:09:43AM -0700, Junio C Hamano wrote: Does it make sense to join that final paragraph into what is now the third bullet, and then add your new text (the fourth bullet) after? I am not sure. After re-reading it, I do not think the fileglob discussion belongs to

Re: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Joachim Schmitz
Jeff King wrote: On Mon, Sep 10, 2012 at 04:38:58PM +0200, Joachim Schmitz wrote: More importantly, though, is it actually portable? I thought it was added in C99, and we try to stick to C89 to support older compilers and systems. My copy of C99 is vague (it says only that the bool macro was

Re: Confirm my false error suspicions of Gitweb query injection

2012-09-10 Thread Junio C Hamano
Joseph Leong josephcle...@gmail.com writes: Hi Everyone, I'm using Gitweb (Based on Git 1.7.9 on RHEL 5.8). I was poking around and tried a GET Request (REQ) with some SQL statements as a search query and noticed a 500. Can i just confirm with anyone here that the error message I'm seeing

Re: Confirm my false error suspicions of Gitweb query injection

2012-09-10 Thread Joseph Leong
and you earned bonus points for the details - thank you very much! On Mon, Sep 10, 2012 at 10:37 AM, Junio C Hamano gits...@pobox.com wrote: Joseph Leong josephcle...@gmail.com writes: Hi Everyone, I'm using Gitweb (Based on Git 1.7.9 on RHEL 5.8). I was poking around and tried a GET

Re: [PATCH 4/4] Add a function string_list_longest_prefix()

2012-09-10 Thread Andreas Ericsson
On 09/10/2012 06:33 PM, Jeff King wrote: On Mon, Sep 10, 2012 at 09:24:17AM -0700, Junio C Hamano wrote: While we're on the subject, it seems to me that documenting APIs like these in separate files under Documentation/technical rather than in the header files themselves - makes the

Re: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 07:26:26PM +0200, Joachim Schmitz wrote: as are non-const array intializers, e.g.: const char *args[] = { editor, path, NULL }; ^ .../git/editor.c, line 39: error(122): expression must have a constant

RE: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Joachim Schmitz
From: Jeff King [mailto:p...@peff.net] Sent: Monday, September 10, 2012 7:59 PM To: Joachim Schmitz Cc: git@vger.kernel.org Subject: Re: [PATCH] daemon: restore getpeername(0,...) use On Mon, Sep 10, 2012 at 07:26:26PM +0200, Joachim Schmitz wrote: as are non-const array intializers,

Re: [RFC] Add edit action for interactive rebase?

2012-09-10 Thread Johannes Sixt
Am 10.09.2012 18:14, schrieb Andrew Wong: Occasionally, while I'm in the middle of an interactive rebase, I'd change my mind about the todo list and want to modify it. This means manually digging out the todo file from the rebase directory, and invoking the editor. So I thought it might be

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Johannes Sixt
Am 10.09.2012 18:54, schrieb Jeff King: On Mon, Sep 10, 2012 at 12:46:45PM -0400, Andrew Wong wrote: Just edit may be a bit misleading, as we already have the edit action inside the todolist. I'd call this --edit-list to avoid ambiguity. I thought that might be a bit confusing too.

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 08:36:43PM +0200, Johannes Sixt wrote: [1] It does preclude using --edit to make a note about a later commit while you are in the middle of resolving a conflict or something. You'd have to do it at the end. I don't know if anybody actually cares about

Using doxygen (or something similar) to generate API docs [was [PATCH 4/4] Add a function string_list_longest_prefix()]

2012-09-10 Thread Michael Haggerty
I'm renaming this thread so that the bikeshedding can get over ASAP. On 09/10/2012 07:48 PM, Andreas Ericsson wrote: On 09/10/2012 06:33 PM, Jeff King wrote: On Mon, Sep 10, 2012 at 09:24:17AM -0700, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Also, better

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Andrew Wong
On Mon, Sep 10, 2012 at 2:46 PM, Jeff King p...@peff.net wrote: On Mon, Sep 10, 2012 at 08:36:43PM +0200, Johannes Sixt wrote: [1] It does preclude using --edit to make a note about a later commit while you are in the middle of resolving a conflict or something. You'd have to do it

Re: checkout extra files

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: I would argue the opposite; if it is about a specific point, then put it with the point. Otherwise, you are asking the reader to remember back to an earlier point (that they may not even have read; in reference documentation, the point of a list is often to let

[PATCH 1/2] gitcli: formatting fix

2012-09-10 Thread Junio C Hamano
The paragraph to encourage use of -- in scripts belongs to the bullet point that describes the behaviour for a command line without the explicit -- disambiguation, not a supporting explanation for the entire bulletted list. Signed-off-by: Junio C Hamano gits...@pobox.com ---

[PATCH 2/2] gitcli: contrast wildcard given to shell and to git

2012-09-10 Thread Junio C Hamano
People who are not used to working with shell may intellectually understand how the command line argument is massaged by the shell but still have a hard time visualizing the difference between letting the shell expand fileglobs and having Git see the fileglob to use as a pathspec. Signed-off-by:

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Junio C Hamano
Andrew Wong andrew.k...@gmail.com writes: On Mon, Sep 10, 2012 at 2:46 PM, Jeff King p...@peff.net wrote: On Mon, Sep 10, 2012 at 08:36:43PM +0200, Johannes Sixt wrote: [1] It does preclude using --edit to make a note about a later commit while you are in the middle of resolving a

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Sep 10, 2012 at 03:58:40PM +0200, Erik Faye-Lund wrote: for (... { if (... { ... } last = p-next; } [...] I feel like bikeshedding a bit today! I tend to either prefer either the latter or something like

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 01:00:35PM -0700, Junio C Hamano wrote: And to conclude my bikeshedding for the day: Shouldn't last ideally be called something like prev instead? It's the previously visited element, not the last element in the list. It is the last element visited (just as last

Re: checkout extra files

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 12:35:05PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I would argue the opposite; if it is about a specific point, then put it with the point. Otherwise, you are asking the reader to remember back to an earlier point (that they may not even have

Re: Probable bug in file run-command.c function clear_child_for_cleanup

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Sep 10, 2012 at 01:00:35PM -0700, Junio C Hamano wrote: And to conclude my bikeshedding for the day: Shouldn't last ideally be called something like prev instead? It's the previously visited element, not the last element in the list. It is the

Re: [RFC] Add edit action for interactive rebase?

2012-09-10 Thread Andrew Wong
On Mon, Sep 10, 2012 at 2:28 PM, Johannes Sixt j...@kdbg.org wrote: Did you think about what can go wrong? For example, starting with this todo sheet: exec false pick 1234567 Ah, that's definitely a problem. I was going to say we probably just to check the done file, same as the one we

Re: [PATCH] daemon: restore getpeername(0,...) use

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 08:27:07PM +0200, Joachim Schmitz wrote: I think it is a mistake to set -std=c89 (or whatever similar option your compiler supports). Like I said, we are not interested in being strictly C89-compliant. We are interested in working on real-world systems. If your

Re: [PATCH 1/2] notes get-ref: --expand expands the output notes ref.

2012-09-10 Thread Johan Herland
On Thu, Sep 6, 2012 at 9:47 PM, Junio C Hamano gits...@pobox.com wrote: W. Trevor King wk...@tremily.us writes: On Wed, Sep 05, 2012 at 10:23:54PM -0700, Junio C Hamano wrote: Really? Would git log --expand master be useful? I'm clearly not an expert on this, but isn't that what git

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: If the proposal were instead to add a certain type of pathspec that is case-insensitive[2], that would make much more sense to me. It is not violating git's case-sensitivity because it is purely a _query_ issue. And it is a feature you might use whether or not

Re: checkout extra files

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: Hmph. Isn't that what I suggested in my first email? :P Until I read the current text I did not realize the trailing paragraph was to apply only to point C (no -- disambiguates and throws errors) but somehow thought it was covering both point B (with -- you are

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 01:30:03PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: If the proposal were instead to add a certain type of pathspec that is case-insensitive[2], that would make much more sense to me. It is not violating git's case-sensitivity because it is

Re: [PATCH v3 02/14] t5500: add tests of fetch-pack --all --depth=N $URL $REF

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Document some bugs in git fetch-pack: 1. If git fetch-pack is called with --all, --depth, and an explicit existing non-tag reference to fetch, then it falsely reports that the reference was not found, even though it was fetched correctly. 2.

Re: [PATCH v3 05/14] Change fetch_pack() and friends to take string_list arguments

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Instead of juggling nr_heads,heads (sometimes called nr_match,match), pass around the list of references to be sought in a single string_list variable called sought. Future commits will make more use of string_list functionality. Signed-off-by:

Re: approxidate parsing for bad time units

2012-09-10 Thread Jeffrey Middleton
As you mentioned, parsing n ... [month], and even ...n... (e.g. the 3rd) as the nth day of a month is great, but in this case, I think n ... ago is a pretty strong sign that that's not the intended behavior. My first thought was just to make it an error if the string ends in ago but the date is

Re: [PATCH] rebase -i: Teach --edit action

2012-09-10 Thread Andrew Wong
On Mon, Sep 10, 2012 at 3:57 PM, Junio C Hamano gits...@pobox.com wrote: Hrm... They see the contents of the todo file immediately after they say rebase --edit-todo and the sole reason they said that command is because they wanted to edit the todo file. Is it likely they need a reminder?

Re: [PATCH v3 09/14] filter_refs(): build refs list as we go

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Instead of temporarily storing matched refs to temporary array return_refs, simply append them to newlist as we go. This changes the order of references in newlist to strictly sorted if --all and --depth and named references are all specified,

[PATCH v2 0/6] Add some string_list-related functions

2012-09-10 Thread Michael Haggerty
Version 2 of a patch series that adds some functions to the string_list API. This patch series applies to current master. Thanks for Junio for lots of great feedback. The patch series Clean up how fetch_pack() handles the heads list v3, which requires some of the new string_list functionality,

[PATCH v2 1/6] string_list: add function string_list_append_nodup()

2012-09-10 Thread Michael Haggerty
Add a new function that appends a string to a string_list without copying it. This can be used to pass ownership of an already-copied string to a string_list that has strdup_strings set. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 17

[PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Michael Haggerty
Add two new functions, string_list_split() and string_list_split_in_place(). These split a string into a string_list on a separator character. The first makes copies of the substrings (leaving the input string untouched) and the second splits the original string in place, overwriting the

[PATCH v2 3/6] string_list: add a new function, filter_string_list()

2012-09-10 Thread Michael Haggerty
This function allows entries that don't match a specified criterion to be discarded from a string_list while preserving the order of the remaining entries. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 11 +++ string-list.c

[PATCH v2 4/6] string_list: add a new function, string_list_remove_duplicates()

2012-09-10 Thread Michael Haggerty
Add a function that deletes duplicate entries from a sorted string_list. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 9 + string-list.c | 17 + string-list.h

[PATCH v2 5/6] string_list: add a function string_list_longest_prefix()

2012-09-10 Thread Michael Haggerty
Add a function that finds the longest string from a string_list that is a prefix of a given string. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 8 string-list.c | 20 +++

[PATCH v2 6/6] api-string-list.txt: initialize the string_list the easy way

2012-09-10 Thread Michael Haggerty
In the demo code blurb, show how to initialize the string_list using STRING_LIST_INIT_NODUP rather than memset(). Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Documentation/technical/api-string-list.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v3 00/14] Clean up how fetch_pack() handles the heads list

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: This patch series depends on the Add some string_list-related functions series that I just submitted. This series is a significant rewrite of v2 based on the realization that the nr_heads,heads pair that is passed around in these functions is

[PATCH] completion: add --no-edit option for git-commit

2012-09-10 Thread Yacine Belkadi
Signed-off-by: Yacine Belkadi yacine.belkad...@gmail.com --- contrib/completion/git-completion.bash |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 222b804..d1f905e 100644 ---

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Sep 10, 2012 at 01:30:03PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: If the proposal were instead to add a certain type of pathspec that is case-insensitive[2], that would make much more sense to me. It is not violating git's

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 02:38:08PM -0700, Junio C Hamano wrote: Thanks, that helped. I got excited when I saw the icase in the comments and thought it might already be implemented. But it looks like it is still to be done. :) Yeah, some are tongue-in-cheek (e.g. I do not know what

Re: [PATCH v3 02/14] t5500: add tests of fetch-pack --all --depth=N $URL $REF

2012-09-10 Thread Michael Haggerty
On 09/10/2012 10:46 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Document some bugs in git fetch-pack: 1. If git fetch-pack is called with --all, --depth, and an explicit existing non-tag reference to fetch, then it falsely reports that the reference was not

Re: Using doxygen (or something similar) to generate API docs [was [PATCH 4/4] Add a function string_list_longest_prefix()]

2012-09-10 Thread Jeff King
On Mon, Sep 10, 2012 at 09:21:12PM +0200, Michael Haggerty wrote: I'm renaming this thread so that the bikeshedding can get over ASAP. Thanks. :) http://tomdoc.org/ Looks much nicer to me than most doxygen I've seen. But again, it's been a while, so maybe doxygen is nicer than I

Re: [PATCH v3 00/14] Clean up how fetch_pack() handles the heads list

2012-09-10 Thread Michael Haggerty
On 09/09/2012 08:15 PM, Junio C Hamano wrote: Jeff King p...@peff.net writes: On Sun, Sep 09, 2012 at 03:20:18AM -0700, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: This patch series depends on the Add some string_list-related functions series that I just submitted.

Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/string-list.c b/string-list.c index 5594b7d..f9051ec 100644 --- a/string-list.c +++ b/string-list.c @@ -204,3 +204,52 @@ void unsorted_string_list_delete_item(struct string_list *list, int i, int free_ list-items[i] =

Re: [PATCH v2 1/6] string_list: add function string_list_append_nodup()

2012-09-10 Thread Michael Haggerty
On 09/10/2012 11:56 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/string-list.c b/string-list.c index d9810ab..5594b7d 100644 --- a/string-list.c +++ b/string-list.c @@ -148,13 +148,23 @@ void print_string_list(const struct string_list *p, const

Re: Using doxygen (or something similar) to generate API docs [was [PATCH 4/4] Add a function string_list_longest_prefix()]

2012-09-10 Thread Michael Haggerty
On 09/10/2012 11:56 PM, Jeff King wrote: On Mon, Sep 10, 2012 at 09:21:12PM +0200, Michael Haggerty wrote: My plate is full. If you are able to work on this, it would be awesome. As far as I'm concerned, you are the new literate documentation czar :-) Lucky me? :) I was nominating

Re: [PATCH v3 00/14] Clean up how fetch_pack() handles the heads list

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: OK. As long as the sort order matches the order string-list internally uses for its bisection search, it won't be a problem, then. The sorting is crucial but there is no bisection involved. The sorted linked-list of references available from

Re: [PATCH v2 2/6] string_list: add two new functions for splitting strings

2012-09-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: +`string_list_split`, `string_list_split_in_place`:: + + Split a string into substrings on a delimiter character and + append the substrings to a `string_list`. If `maxsplit` is + non-negative, then split at most `maxsplit` times.

Re: [PATCH/RFC] blame: respect core.ignorecase

2012-09-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: But I would think for that particular use case, you would not want to do a per-glob prefix for that, but would rather use a command-line switch. Yes. Even though it is not listed as possible future semantics, one thing that we may want to have before all others

Re: Using doxygen (or something similar) to generate API docs [was [PATCH 4/4] Add a function string_list_longest_prefix()]

2012-09-10 Thread Andreas Ericsson
On 09/10/2012 11:56 PM, Jeff King wrote: On Mon, Sep 10, 2012 at 09:21:12PM +0200, Michael Haggerty wrote: I'm renaming this thread so that the bikeshedding can get over ASAP. Thanks. :) http://tomdoc.org/ Looks much nicer to me than most doxygen I've seen. But again, it's been a