Re: [PATCH 5/5] format-patch: avoid freopen()

2016-06-19 Thread Eric Sunshine
On Sat, Jun 18, 2016 at 6:04 AM, Johannes Schindelin wrote: > We just taught the relevant functions to respect the diffopt.file field, > to allow writing somewhere else than stdout. Let's make use of it. > [...] > Signed-off-by: Johannes Schindelin

Re: [PATCH v2 2/2] log: add log.showSignature configuration variable

2016-06-19 Thread Eric Sunshine
On Sat, Jun 18, 2016 at 8:25 AM, Mehul Jain wrote: > Users may want to always use "--show-signature" while using git-log and > related commands. > > When log.showSignature is set to true, git-log and related commands will > behave as if "--show-signature" was given to

Re: [PATCH] pathspec: prevent empty strings as pathspecs

2016-06-18 Thread Eric Sunshine
On Sat, Jun 18, 2016 at 9:49 PM, David Turner wrote: > On Sat, 2016-06-18 at 20:57 -0400, Emily Xie wrote: >> + while (argv[n]) { >> + if (*argv[n] == '\0') { >> + die("Empty string is not a valid pathspec."); >> + } > > nit:

Re: [PATCH 4/7] run-command: add pipe_command helper

2016-06-17 Thread Eric Sunshine
On Fri, Jun 17, 2016 at 7:28 PM, Jeff King <p...@peff.net> wrote: > On Fri, Jun 17, 2016 at 04:03:18PM -0400, Eric Sunshine wrote: >> > diff --git a/run-command.h b/run-command.h >> > @@ -79,17 +79,34 @@ int run_command_v_opt(const char **argv, int opt); >>

Re: [PATCH 4/7] run-command: add pipe_command helper

2016-06-17 Thread Eric Sunshine
On Thu, Jun 16, 2016 at 5:37 AM, Jeff King wrote: > We already have capture_command(), which captures the stdout > of a command in a way that avoids deadlocks. But sometimes > we need to do more I/O, like capturing stderr as well, or > sending data to stdin. It's easy to write code

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

2016-06-17 Thread Eric Sunshine
On Thu, Jun 16, 2016 at 4:32 PM, Joey Hess wrote: > This adds new smudge-to-file and clean-from-file filter commands, > which are similar to smudge and clean but allow direct access to files on > disk. > [...] > Signed-off-by: Joey Hess > --- > diff --git

Re: [PATCH v2 5/6] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-06-16 Thread Eric Sunshine
On Thu, Jun 16, 2016 at 3:05 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Thu, Jun 16, 2016 at 2:44 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva <pranit.ba...@gmail.com> >> wro

Re: [PATCH v2 6/6] bisect--helper: `bisect_write` shell function in C

2016-06-16 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > Reimplement the `bisect_write` shell function in C and add a > `bisect-write` subcommand to `git bisect--helper` to call it from > git-bisect.sh > > Using `--bisect-write` subcommand is a temporary measure to port

Re: [PATCH v2 5/6] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > Reimplement `is_expected_rev` & `check_expected_revs` shell function in > C and add a `--check-expected-revs` subcommand to `git bisect--helper` to > call it from git-bisect.sh . > [...] > Signed-off-by: Pranit Bauva

Re: [PATCH v2 4/6] bisect--helper: `bisect_reset` shell function in C

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` > subcommand to `git bisect--helper` to call it from git-bisect.sh . > [...] > Signed-off-by: Pranit Bauva > --- >

Re: [PATCH v2 1/6] bisect--helper: `bisect_clean_state` shell function in C

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 2:47 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Wed, Jun 15, 2016 at 11:34 PM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva <pranit.ba...@gmail.com> >> wrote: >&g

Re: [PATCH v2 3/6] wrapper: move is_empty_file() from builtin/am.c

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > is_empty_file() can help to refactor a lot of code. Also it is quite > helpful while converting shell scripts which use `test -s`. Since As justification, "can help to refactor a lot of code" is very nebulous. It

Re: [PATCH v2 1/6] bisect--helper: `bisect_clean_state` shell function in C

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > Reimplement `bisect_clean_state` shell function in C and add a > `bisect-clean-state` subcommand to `git bisect--helper` to call it from > git-bisect.sh . > [...] > Signed-off-by: Pranit Bauva

Re: [PATCH v2 0/6] convert various shell functions in git-bisect to C

2016-06-15 Thread Eric Sunshine
On Wed, Jun 15, 2016 at 10:00 AM, Pranit Bauva wrote: > Changes wrt previous version: > * Use STRING_LIST_INIT_NODUP to avoid leaks in bisect_clean_state() > * Use test_path_is_missing in the patch 2/6 > * drop file_size() > * move is_empty_file() method from

Re: [PATCH 16/38] resolve_gitlink_ref(): implement using resolve_ref_recursively()

2016-06-13 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote: > resolve_ref_recursively() can handle references in arbitrary files > reference stores, so use it to resolve "gitlink" (i.e., submodule) > references. Aside from removing redundant code, this allows submodule > lookups

Re: [PATCH 3/3] blame,shortlog: don't make local option variables static

2016-06-13 Thread Eric Sunshine
On Mon, Jun 13, 2016 at 1:39 AM, Jeff King wrote: > There's no need for these option variables to be static, > except that they are referenced by the options array itself, > which is static. But having all of this static is simply > unnecessary and confusing (and inconsistent with

Re: [PATCH 00/27] nd/shallow-deepen updates

2016-06-10 Thread Eric Sunshine
On Fri, Jun 10, 2016 at 8:26 AM, Nguyễn Thái Ngọc Duy wrote: > This contains cleanups after Eric's comments (all good points, > thanks!). Changed patches have Junio's s-o-b line removed, so it's > easy to see which is changed and which is not. 09/27 is a new one, > split out of

Re: [PATCH 1/2] bisect--helper: `is_expected_rev` shell function in C

2016-06-10 Thread Eric Sunshine
On Fri, Jun 10, 2016 at 9:39 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Fri, Jun 10, 2016 at 3:03 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> Reimplemen

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-10 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote: > We want ref_stores to be polymorphic, so invent a base class of which > files_ref_store is a derived class. For now there is a one-to-one > relationship between ref_stores and submodules. > > Signed-off-by: Michael

Re: [PATCH 2/2] bisect--helper: `check_expected_revs` shell function in C

2016-06-09 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva wrote: > Reimplement the `check_expected_revs` shell function in C and add a > `--check-expected-revs` subcommand to `git bisect--helper` to call it > from git-bisect.sh . > [...] > Signed-off-by: Pranit Bauva

Re: [PATCH 1/2] bisect--helper: `is_expected_rev` shell function in C

2016-06-09 Thread Eric Sunshine
On Thu, Jun 9, 2016 at 5:33 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >> + strbuf_trim(_hex); >> + return !strcmp(actual_hex.buf, expected_hex); > > Thus

Re: [PATCH 1/2] bisect--helper: `is_expected_rev` shell function in C

2016-06-09 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva wrote: > Reimplement `is_expected_rev` shell function in C. This will further be > called from `check_expected_revs` function. This is a quite small > function thus subcommand facility is redundant. This patch should be

Re: [PATCH] Use "working tree" instead of "working directory" for git status

2016-06-09 Thread Eric Sunshine
On Thu, Jun 9, 2016 at 1:46 PM, Lars Vogel wrote: > Working directory can be easily confused with the current directory. > In one of my patches I already updated the usage of working directory > with working tree for the man page but I noticed that git status also > uses

Re: [PATCH v4 4/6] send-email: create email parser subroutine

2016-06-09 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 7:54 PM, Samuel GROOT <samuel.gr...@grenoble-inp.org> wrote: > On 06/08/2016 10:17 PM, Junio C Hamano wrote: >> Eric Sunshine <sunsh...@sunshineco.com> writes: >>> An embedded CR probably shouldn't happen, but I'm not convinced that >>>

Re: [PATCH v4 4/6] send-email: create email parser subroutine

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 3:30 PM, Samuel GROOT <samuel.gr...@grenoble-inp.org> wrote: > On 06/08/2016 08:12 PM, Eric Sunshine wrote: >> On Wed, Jun 8, 2016 at 1:58 PM, Junio C Hamano <gits...@pobox.com> wrote: >>> Samuel GROOT <samuel.gr...@grenoble-inp.org> wri

Re: [PATCH v4 4/6] send-email: create email parser subroutine

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 1:58 PM, Junio C Hamano wrote: > Samuel GROOT writes: >> +sub parse_email { >> + my %mail = (); >> + my $fh = shift; >> + my $last_header; > >> + # Unfold and parse multiline header fields >> + while

Re: [PATCH 1/4] bisect--helper: `bisect_clean_state` shell function in C

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 5:41 AM, Christian Couder <christian.cou...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 10:02 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Jun 8, 2016 at 3:46 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>&g

Re: [PATCH 4/4] bisect--helper: `bisect_reset` shell function in C

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 9:20 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 1:29 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> + i

Re: [PATCH 4/4] bisect--helper: `bisect_reset` shell function in C

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 5:51 AM, Christian Couder <christian.cou...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 9:59 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: >>> + if (file_size(git_path_bisect_start()) < 1) { >> >> This doesn't eve

Re: [PATCH v2 63/94] builtin/apply: make apply_all_patches() return -1 on error

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 12:37 PM, Christian Couder <christian.cou...@gmail.com> wrote: > On Mon, May 16, 2016 at 5:44 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, May 11, 2016 at 9:17 AM, Christian Couder >> <christian.cou...@gmail.com> wrote:

Re: [PATCH 2/4] t6030: explicitly test for bisection cleanup

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 4:07 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 4:51 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> diff --git a/t

Re: [PATCH 3/4] dir: introduce file_size() to check the size of file

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 3:57 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 1:07 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> dir: introduce f

Re: [PATCH 1/4] bisect--helper: `bisect_clean_state` shell function in C

2016-06-08 Thread Eric Sunshine
On Wed, Jun 8, 2016 at 3:46 AM, Pranit Bauva <pranit.ba...@gmail.com> wrote: > On Wed, Jun 8, 2016 at 4:01 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >>> +

Re: [PATCH 4/4] bisect--helper: `bisect_reset` shell function in C

2016-06-08 Thread Eric Sunshine
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote: > Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` > subcommand to `git bisect--helper` to call it from git-bisect.sh . > > Using `bisect_reset` subcommand is a temporary measure to port shell >

Re: [PATCH 3/4] dir: introduce file_size() to check the size of file

2016-06-08 Thread Eric Sunshine
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote: > dir: introduce file_size() to check the size of file > > At times we require to see if the file is empty and get the size of the > file. By using stat we can get the file size without actually having to > open the file

Re: [PATCH 1/4] bisect--helper: `bisect_clean_state` shell function in C

2016-06-07 Thread Eric Sunshine
On Tue, Jun 7, 2016 at 6:31 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva <pranit.ba...@gmail.com> wrote: >> +int bisect_clean_state(void) >> +{ I forgot to mention that this and other functions should be 'static'.

Re: [PATCH 2/4] t6030: explicitly test for bisection cleanup

2016-06-07 Thread Eric Sunshine
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote: > This is not an improvement in the test coverage but it helps in making > it explicit as to what exactly would be the error as other tests are > focussed on testing other things. It's not clear why you consider this as

Re: [PATCH 1/4] bisect--helper: `bisect_clean_state` shell function in C

2016-06-07 Thread Eric Sunshine
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote: > Reimplement `bisect_clean_state` shell function in C and add a > `bisect-clean-state` subcommand to `git bisect--helper` to call it from > git-bisect.sh . > [...] > Signed-off-by: Pranit Bauva >

Re: [PATCH v2 12/13] dir_iterator: new API for iterating over a directory tree

2016-06-06 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 8:33 AM, Michael Haggerty wrote: > The iterator interface is modeled on that for references, though no > vtable is necessary because there is (so far?) only one type of > dir_iterator. > [...] Some minor comments below, though probably nothing

Re: [PATCH 25/26] upload-pack: add get_reachable_list()

2016-06-05 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/upload-pack.c b/upload-pack.c > @@ -505,10 +513,48 @@ static int do_reachable_revlist(struct child_process > *cmd, > +static int

Re: [PATCH 24/26] upload-pack: split check_unreachable() in two, prep for get_reachable_list()

2016-06-05 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/upload-pack.c b/upload-pack.c > @@ -452,24 +452,24 @@ static int is_our_ref(struct object *o) > -static int check_unreachable(struct

Re: [PATCH v1 1/1] connect: [host:port] is lagacy for ssh

2016-06-05 Thread Eric Sunshine
On Sun, Jun 5, 2016 at 7:09 AM, wrote: > connect: [host:port] is lagacy for ssh s/lagacy/legacy/ > Early versions of the parser in connect.c handled > git clone [host:123]:/path the same as > git clone ssh://host:123/path > > Keep that feature as legacy, but disable it for all

Re: [PATCH 23/26] t5500, t5539: tests for shallow depth excluding a ref

2016-06-04 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh > @@ -661,4 +661,26 @@ test_expect_success 'fetch shallow since ...' ' >

Re: [PATCH 22/26] clone: define shallow clone boundary with --shallow-exclude

2016-06-04 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/clone.c b/builtin/clone.c > @@ -44,6 +44,7 @@ static int deepen; > +static struct string_list option_not = STRING_LIST_INIT_NODUP;

Re: [PATCH 21/26] fetch: define shallow boundary with --shallow-exclude

2016-06-04 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/fetch.c b/builtin/fetch.c > @@ -41,6 +41,7 @@ static int max_children = 1; > +static struct string_list deepen_not =

Re: [PATCH 18/26] t5500, t5539: tests for shallow depth since a specific date

2016-06-04 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:55 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh > @@ -73,5 +73,31 @@ test_expect_success 'no shallow lines after receiving

Re: [PATCH] reflog: continue walking the reflog past root commits

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 4:42 PM, SZEDER Gábor wrote: > If a repository contains more than one root commit, then its HEAD > reflog may contain multiple "creation events", i.e. entries whose > "from" value is the null sha1. Listing such a reflog currently stops > prematurely at

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 8:02 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Fri, Jun 3, 2016 at 7:42 PM, Junio C Hamano <gits...@pobox.com> wrote: >> Eric Sunshine <sunsh...@sunshineco.com> writes: >> >>>> static int is_mboxrd_from(co

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 7:42 PM, Junio C Hamano <gits...@pobox.com> wrote: > Eric Sunshine <sunsh...@sunshineco.com> writes: > >>> static int is_mboxrd_from(const char *line) { >>> return starts_with(line + strspn(line, ">")

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 6:36 PM, Junio C Hamano <gits...@pobox.com> wrote: > Eric Sunshine <sunsh...@sunshineco.com> writes: >> On Thu, Jun 2, 2016 at 3:51 AM, Eric Wong <e...@80x24.org> wrote: >>> Eric Wong <e...@80x24.org> wrote: >>>> Eric S

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-06-03 Thread Eric Sunshine
[cc:+junio] On Thu, Jun 2, 2016 at 3:51 AM, Eric Wong <e...@80x24.org> wrote: > Eric Wong <e...@80x24.org> wrote: >> Eric Sunshine <sunsh...@sunshineco.com> wrote: >> > On Tue, May 31, 2016 at 3:45 AM, Eric Wong <e...@80x24.org> wrote: >> &

Re: [BUG] git-submodule has bash-ism?

2016-06-01 Thread Eric Sunshine
On Wed, Jun 1, 2016 at 4:56 PM, Junio C Hamano wrote: > Subject: [PATCH] t5500 & t7403: lose bash-ism "local" > > In t5500::check_prot_host_port_path(), diagport is not a variable > used elsewhere and the function is not recursively called so this > can simply lose the "local",

Re: [PATCH 2/4] reachable.c: mark reachable objects in index from all worktrees

2016-06-01 Thread Eric Sunshine
On Wed, Jun 1, 2016 at 6:45 AM, Nguyễn Thái Ngọc Duy wrote: > Current mark_reachable_objects() only marks objects from index from > _current_ worktree as reachable instead of all worktrees. Because this > function is used for pruning, there is a chance that objects referenced >

Re: [PATCH] t4014: shell portability fix

2016-06-01 Thread Eric Sunshine
On Tue, May 31, 2016 at 10:31 PM, Jeff King <p...@peff.net> wrote: > On Tue, May 31, 2016 at 08:09:43PM -0400, Eric Sunshine wrote: >> I was under the impression that the project was moving toward 'env' to >> deal[1] with this sort of issue. >> >> [1]: 512477b

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 6:56 PM, Jeff King wrote: > On Tue, May 31, 2016 at 03:53:15PM -0700, Junio C Hamano wrote: >> One-shot assignment to an environment variable, i.e. >> >> VAR=VAL cmd >> >> does not work as expected for "cmd" that is a shell function on >> certain

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 3:59 AM, Michael Haggerty <mhag...@alum.mit.edu> wrote: > On 05/31/2016 07:29 AM, Eric Sunshine wrote: >> On Mon, May 30, 2016 at 3:55 AM, Michael Haggerty <mhag...@alum.mit.edu> >> wrote: >>> +struct ref_ite

Re: [PATCH] t0005: ksh93 portability workaround

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 6:47 PM, Junio C Hamano wrote: > The test has two things ksh93 does not happy about: s/does/is/ > * It thinks "(( command1; command2 ) | command3)" is a perfectly >sane way to write a pipeline. ksh93, unlike other POSIX shells, >does not like

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 4:12 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On reflection, even with the '^' anchor, it isn't safe the way it's > coded since '^' will match following a newline, won't it? Therefore, > because 'line' isn't necessarily NUL-terminated, the patter

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 2:29 PM, Eric Wong <e...@80x24.org> wrote: > Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Tue, May 31, 2016 at 3:45 AM, Eric Wong <e...@80x24.org> wrote: >> > Eric Sunshine <sunsh...@sunshineco.com> wrote: > Ah thanks,

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 3:45 AM, Eric Wong <e...@80x24.org> wrote: > Eric Sunshine <sunsh...@sunshineco.com> wrote: >> On Mon, May 30, 2016 at 7:21 PM, Eric Wong <e...@80x24.org> wrote: >> > +

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-30 Thread Eric Sunshine
On Mon, May 30, 2016 at 3:55 AM, Michael Haggerty wrote: > [...] > This commit introduces a new iteration primitive for references: a > ref_iterator. A ref_iterator is a polymorphic object that a reference > storage backend can be asked to instantiate. There are three

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-30 Thread Eric Sunshine
On Mon, May 30, 2016 at 7:21 PM, Eric Wong wrote: > This output format prevents format-patch output from breaking > readers if somebody copy+pasted an mbox into a commit message. > > Unlike the traditional "mboxo" format, "mboxrd" is designed to > be fully-reversible. "mboxrd"

Re: [PATCH v4] upload-pack.c: use of parse-options API

2016-05-27 Thread Eric Sunshine
On Fri, May 27, 2016 at 10:16 AM, Antoine Queru wrote: > upload-pack.c: use of parse-options API Matthieu already mentioned that this should use imperative mood: upload-pack: use parse-options API > Option parsing now uses the parser API instead of a

Re: [PATCH 14/26] shallow.c: implement a generic shallow boundary finder based on rev-list

2016-05-26 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy wrote: > Instead of a custom commit walker like get_shallow_commits(), this new > function uses rev-list to mark NOT_SHALLOW to all reachable commits, > except borders. The definition of reachable is to be defined by the >

Re: [PATCH 09/26] upload-pack: move rev-list code out of check_non_tip()

2016-05-25 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/upload-pack.c b/upload-pack.c > @@ -451,7 +451,7 @@ static int is_our_ref(struct object *o) > -static void check_non_tip(void) > +static

Re: [PATCH 07/26] upload-pack: use skip_prefix() instead of starts_with()

2016-05-25 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy wrote: > upload-pack: use skip_prefix() instead of starts_with() > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/upload-pack.c b/upload-pack.c > @@ -403,8 +405,8 @@ static int

Re: [PATCH 02/26] transport-helper.c: refactor set_helper_option()

2016-05-25 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy wrote: > For now we can handle two types, string and boolean, in > set_helper_option(). Later on we'll add string_list support, which does > not fit well. The new function strbuf_set_helper_option() can be reused > for a

Re: [PATCH 01/26] remote-curl.c: convert fetch_git() to use argv_array

2016-05-25 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/remote-curl.c b/remote-curl.c > @@ -726,37 +726,30 @@ static int fetch_git(struct discovery *heads, > char *depth_arg = NULL; > -

Re: [PATCH v7 3/3] bisect--helper: `write_terms` shell function in C

2016-05-23 Thread Eric Sunshine
On Mon, May 23, 2016 at 10:48 AM, Pranit Bauva wrote: > Reimplement the `write_terms` shell function in C and add a `write-terms` > subcommand to `git bisect--helper` to call it from git-bisect.sh . Also > remove the subcommand `--check-term-format` as it can now be called

Re: [PATCH v2 0/5] worktree lock/unlock

2016-05-22 Thread Eric Sunshine
entation update of patch 4/5, everything looks fine, and the series is: Reviewed-by: Eric Sunshine <sunsh...@sunshineco.com> -- 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/majordomo-info.html

Re: [PATCH v2 5/5] worktree: add "unlock" command

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 6:43 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/worktree.c b/builtin/worktree.c > @@ -500,6 +501,37 @@ static int lock_worktree(int ac, const char **av, const > char *prefix) >

Re: [PATCH v2 6/6] worktree: simplify prefixing paths

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 7:32 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, May 22, 2016 at 5:33 AM, Nguyễn Thái Ngọc Duy <pclo...@gmail.com> > wrote: >> @@ -467,6 +467,8 @@ int cmd_worktree(int ac, const char **av, const char >>

Re: [PATCH v2 4/5] worktree: add "lock" command

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 6:43 AM, Nguyễn Thái Ngọc Duy <pclo...@gmail.com> wrote: > Helped-by: Eric Sunshine <sunsh...@sunshineco.com> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> > --- > diff --git a/Documentation/git-worktree.txt b/Documentation/git-w

Re: [PATCH 4/5] worktree: add "lock" command

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 6:31 AM, Duy Nguyen <pclo...@gmail.com> wrote: > On Mon, May 16, 2016 at 7:09 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >>> + old_reason = is_worktree_locked(wt); >>> + if (old_reason) {

Re: [PATCH v2 1/5] worktree.c: add find_worktree_by_path()

2016-05-22 Thread Eric Sunshine
uot;, it likely will be nice to allow people to specify the linked worktree not only by path, but also by tag, and possibly even by $(basename $path) if not ambiguous. [1]: http://article.gmane.org/gmane.comp.version-control.git/275528 > Helped-by: Eric Sunshine <sunsh...@sunsh

Re: [PATCH 3/5] worktree.c: add is_worktree_locked()

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 5:53 AM, Duy Nguyen <pclo...@gmail.com> wrote: > On Fri, May 13, 2016 at 11:52 PM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> Actually, I recall that when I suggested the idea of 'struct worktree' >> and get_worktrees() to

Re: [PATCH v2 1/5] worktree.c: add find_worktree_by_path()

2016-05-22 Thread Eric Sunshine
ample by branch > or even by internal id. They may be added later if proved useful. > > Helped-by: Eric Sunshine <sunsh...@sunshineco.com> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> > --- > diff --git a/worktree.h b/worktree.h > @@ -29,6 +29,1

Re: [PATCH v2 0/6] nd/worktree-cleanup-post-head-protection update

2016-05-22 Thread Eric Sunshine
everything looks fine and the series is: Reviewed by: Eric Sunshine <sunsh...@sunshineco.com> -- 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/majordomo-info.html

Re: [PATCH 05/21] i18n: sequencer: mark entire sentences for translation

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 8:44 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: >> For what it's worth I agree with you and disagree with Eric here and >> Junio in the "[PATCH 03/21] i18n: advice: internationalize message for >> conflicts" thread. >>

Re: [PATCH v2 6/6] worktree: simplify prefixing paths

2016-05-22 Thread Eric Sunshine
On Sun, May 22, 2016 at 5:33 AM, Nguyễn Thái Ngọc Duy wrote: > This also makes slash conversion always happen on Windows (a side effect > of prefix_filename). Which is a good thing. Selling this patch as a mere simplification seems misguided (especially as it's subjective

Re: [PATCH v7 1/9] connect: document why we sometimes call get_port after get_host_and_port

2016-05-21 Thread Eric Sunshine
On Sat, May 21, 2016 at 7:17 PM, Mike Hommey wrote: > Signed-off-by: Mike Hommey > --- > diff --git a/connect.c b/connect.c > @@ -742,6 +742,12 @@ struct child_process *git_connect(int fd[2], const char > *url, >

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-20 Thread Eric Sunshine
On Fri, May 20, 2016 at 12:39 PM, Junio C Hamano <gits...@pobox.com> wrote: > Eric Sunshine <sunsh...@sunshineco.com> writes: >> Indeed, the sed seems superfluous. The output of the test command is: >> >> git: 'lfg' is not a git command. See 'gi

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-19 Thread Eric Sunshine
[cc:+junio] On Thu, May 19, 2016 at 5:31 PM, Vasco Almeida <vascomalme...@sapo.pt> wrote: > Às 18:34 de 19-05-2016, Eric Sunshine escreveu: >> On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida <vascomalme...@sapo.pt> >> wrote: >>> - sed -e "1

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-19 Thread Eric Sunshine
On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: > The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, > because it's expecting to filter out the original output. Accommodate > gettext poison case by also filtering out the default simulated output.

Re: [PATCH 14/21] i18n: rebase-interactive: mark strings for translation

2016-05-19 Thread Eric Sunshine
On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: > Mark strings in git-rebase--interactive.sh for translation. There is no > need to source git-sh-i18n since git-rebase.sh already does so. > > Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to >

Re: [PATCH/RFC] Add userdiff built-in pattern for CSS code

2016-05-19 Thread Eric Sunshine
On Thu, May 19, 2016 at 10:45 AM, Matthieu Moy wrote: >> Subject: [PATCH/RFC] Add userdiff built-in pattern for CSS code >> [...snip...] >> Add the info in documentation that CSS is now built-in. > > This doesn't add much to the patch (we can already see that from

[PATCH v3 4/5] t1500: avoid setting configuration options outside of tests

2016-05-18 Thread Eric Sunshine
quired by the manual git-config invocations outside of tests is no longer needed, and is thus dropped. Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> --- t/t1500-rev-parse.sh | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/

[PATCH v3 2/5] t1500: test_rev_parse: facilitate future test enhancements

2016-05-18 Thread Eric Sunshine
the test and driving it via a for-loop. Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> --- t/t1500-rev-parse.sh | 44 +--- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh index 0

[PATCH v3 1/5] t1500: be considerate to future potential tests

2016-05-18 Thread Eric Sunshine
) into a common setup test consistent with modern practice. Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> --- t/t1500-rev-parse.sh | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh index 48ee077..0194f54 100755 --- a/t/t15

[PATCH v3 3/5] t1500: avoid changing working directory outside of tests

2016-05-18 Thread Eric Sunshine
lls, this expression evaluates incorrectly to a single argument ("-C ") rather than the expected two (-C and ""). Work around this problem with the slightly ungainly expression: ${dir:+-C} ${dir:+"$dir"} Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> --- t/t15

[PATCH v3 5/5] t1500: avoid setting environment variables outside of tests

2016-05-18 Thread Eric Sunshine
t_unconfig() need to know GIT_DIR, as well, but neither function can be used within a subshell. Consequently, GIT_DIR is instead cleared manually via test_when_finished(). Signed-off-by: Eric Sunshine <sunsh...@sunshineco.com> --- t/t1500-rev-parse.sh | 24 +++- 1 file change

[PATCH v3 0/5] modernize t1500

2016-05-18 Thread Eric Sunshine
ontrol.git/294902/focus=294916 [3]: http://thread.gmane.org/gmane.comp.version-control.git/294902/focus=294923 [4]: http://thread.gmane.org/gmane.comp.version-control.git/294902/focus=294971 Eric Sunshine (5): t1500: be considerate to future potential tests t1500: test_rev_parse: facilitate future t

Re: [PATCH 05/21] i18n: sequencer: mark entire sentences for translation

2016-05-18 Thread Eric Sunshine
On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: > Mark entire sentences of error message rather than assembling one using > placeholders (e.g. "Cannot %s during a %s"). That would facilitate > translation work. > > Signed-off-by: Vasco Almeida

Re: [PATCH 03/21] i18n: advice: internationalize message for conflicts

2016-05-18 Thread Eric Sunshine
On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: > Mark message for translation telling the user she has conflicts to > resolve. Expose each particular use case, in order to enable translating > entire sentences which would facilitate translating into other >

Re: [PATCH v2 2/5] t1500: test_rev_parse: facilitate future test enhancements

2016-05-18 Thread Eric Sunshine
On Wed, May 18, 2016 at 1:32 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, May 18, 2016 at 12:38 PM, SZEDER Gábor <sze...@ira.uka.de> wrote: >> Quoting Eric Sunshine <sunsh...@sunshineco.com>: >>> + for o in is-bare-repository \ &g

Re: [PATCH v2 2/5] t1500: test_rev_parse: facilitate future test enhancements

2016-05-18 Thread Eric Sunshine
On Wed, May 18, 2016 at 12:38 PM, SZEDER Gábor <sze...@ira.uka.de> wrote: > Quoting Eric Sunshine <sunsh...@sunshineco.com>: >> + for o in is-bare-repository \ >> +is-inside-git-dir \ >> +is-inside-work-tree

Re: [PATCH v2 3/5] t1500: avoid changing working directory outside of tests

2016-05-17 Thread Eric Sunshine
On Tue, May 17, 2016 at 7:06 PM, SZEDER Gábor <sze...@ira.uka.de> wrote: > Quoting Junio C Hamano <gits...@pobox.com>: >> Jeff King <p...@peff.net> writes: >>> On Tue, May 17, 2016 at 04:48:33PM -0400, Eric Sunshine wrote: >>>> On Tue, May 17, 20

Re: [PATCH v2 3/5] t1500: avoid changing working directory outside of tests

2016-05-17 Thread Eric Sunshine
On Tue, May 17, 2016 at 5:52 PM, Jeff King <p...@peff.net> wrote: > On Tue, May 17, 2016 at 04:48:33PM -0400, Eric Sunshine wrote: >> On Tue, May 17, 2016 at 4:37 PM, Junio C Hamano <gits...@pobox.com> wrote: >> > Eric Sunshine <sunsh...@sunshineco.com> wri

Re: [PATCH v2 3/5] t1500: avoid changing working directory outside of tests

2016-05-17 Thread Eric Sunshine
On Tue, May 17, 2016 at 4:37 PM, Junio C Hamano <gits...@pobox.com> wrote: > Eric Sunshine <sunsh...@sunshineco.com> writes: >> + git ${dir:+-C "$dir"} rev-parse --$o >actual && > > This is kosher POSIX, but I vaguely recall

[PATCH v2 0/5] modernize t1500

2016-05-17 Thread Eric Sunshine
l.git/294088 [2]: http://thread.gmane.org/gmane.comp.version-control.git/294088/focus=294168 [3]: http://thread.gmane.org/gmane.comp.version-control.git/294088/focus=294170 Eric Sunshine (5): t1500: be considerate to future potential tests t1500: test_rev_parse: facilitate future test enhancement

<    8   9   10   11   12   13   14   15   16   17   >