Re: [PATCH v15 06/13] ref-filter: add option to filter out tags, branches and remotes

2015-09-01 Thread Junio C Hamano
Karthik Nayak writes: >>> + if (filter->kind == FILTER_REFS_BRANCHES) >>> + ret = for_each_fullref_in("refs/heads/", ref_filter_handler, >>> &ref_cbdata, broken); >>> + else if (filter->kind == FILTER_REFS_REMOTES) >>> + ret = for_each_fullref_in("refs/remotes/", ref_filte

Re: git svn clone fails

2015-09-01 Thread Eric Wong
Jörg Schaible wrote: > Is there really no other place for a bug report? This will simply vanish in > the list's noise ... These messages do get seen and read. (And I would not have seen this message if it were posted anywhere else). But I don't have much time or motivation to work on git svn s

Re: [PATCH v15 06/13] ref-filter: add option to filter out tags, branches and remotes

2015-09-01 Thread Karthik Nayak
On Wed, Sep 2, 2015 at 3:00 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> + if (!filter->kind) >> die("filter_refs: invalid type"); >> + else { >> + if (filter->kind == FILTER_REFS_BRANCHES) >> + ret = for_each_fullref_in("refs/heads/

Re: [PATCHv4 1/3] submodule: implement `list` as a builtin helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 2:24 PM, Stefan Beller wrote: > Most of the submodule operations work on a set of submodules. > Calculating and using this set is usually done via: > >module_list "$@" | { >while read mode sha1 stage sm_path >do > # the actual

Re: [PATCHv4 1/3] submodule: implement `list` as a builtin helper

2015-09-01 Thread Stefan Beller
please ignore. -- 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

[PATCHv4 1/3] submodule: implement `list` as a builtin helper

2015-09-01 Thread Stefan Beller
Most of the submodule operations work on a set of submodules. Calculating and using this set is usually done via: module_list "$@" | { while read mode sha1 stage sm_path do # the actual operation done } Currently the function `module_

Re: [PATCH v2 0/6] Make "local" orthogonal to date format

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 10:55:38PM +0100, John Keeping wrote: > Jeff's first patch is unmodified but I've squashed the fixed currently > on "pu" into the second. I also realised while adding the tests that > "raw-local" is meaningless so I've modified the code to reject it in the > same way as "r

Re: [PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread Junio C Hamano
OK by me. Thanks, I also forgot that need for preparatory code movement. On Tue, Sep 1, 2015 at 3:39 PM, Jeff King wrote: > On Tue, Sep 01, 2015 at 11:33:08PM +0100, John Keeping wrote: > >> > Even in --date=raw, we do show the timezone offset, so I do not >> > necessarily agree that raw-local is

Re: [PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 11:40:13PM +0100, John Keeping wrote: > > I notice we end up with rather long lines for some of these. Would: > > > > test_date "" <<-\EOF > > Mon Jul 3 17:18:43 2006 +0200 > > Mon Jul 3 17:18:44 2006 +0200 > > Mon Jul 3 17:18:45 2006 +0200 > > EOF > > > > be mo

Re: [PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread John Keeping
On Tue, Sep 01, 2015 at 06:31:58PM -0400, Jeff King wrote: > On Tue, Sep 01, 2015 at 10:55:41PM +0100, John Keeping wrote: > > > I considered moving the test_expect_success into the helper, like with > > test_atom earlier in the file, but it doesn't make the code much more > > concise and we still

Re: [PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 11:33:08PM +0100, John Keeping wrote: > > Even in --date=raw, we do show the timezone offset, so I do not > > necessarily agree that raw-local is nonsensical. That's the only > > difference between the one I queued yesterday and this one. > > I suspect it depends on the i

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:31:41PM -0700, Stefan Beller wrote: > > Ah, right, I think I misunderstood Junio's question. Yes, if we start > > calling cmd_fetch() from inside the threads, things may get confusing. > > > > I'll see how painful the thread storage approach would be. > > I think that m

Re: [PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread John Keeping
On Tue, Sep 01, 2015 at 03:16:50PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > This is Jeff's original patch with my fixup for DATE_STRFTIME squashed > > in and a new change to reject "raw-local" (in both Documentation/ and > > date.c). > > Even in --date=raw, we do show the timezo

Re: [PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 10:55:41PM +0100, John Keeping wrote: > I considered moving the test_expect_success into the helper, like with > test_atom earlier in the file, but it doesn't make the code much more > concise and we still need either to setup the output outside the test > case or to escape

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 3:26 PM, Jeff King wrote: > On Tue, Sep 01, 2015 at 03:23:06PM -0700, Stefan Beller wrote: > >> > Hmm, does Stefan's thread-pool thing interact with this decision in >> > any way? >> >> I do not plan to actually fetch from inside the thread pool, but each thread >> is just a

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:23:06PM -0700, Stefan Beller wrote: > > Hmm, does Stefan's thread-pool thing interact with this decision in > > any way? > > I do not plan to actually fetch from inside the thread pool, but each thread > is just a proxy for starting a new process doing the fetch and get

Re: [PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 5:55 PM, John Keeping wrote: > This moves the setup of the "expected" file inside the test case. The > helper function has the advantage that we can use SQ in the file content > without needing to escape the quotes. > > Signed-off-by: John Keeping > --- > diff --git a/t/t6

Re: [PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:16:50PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > This is Jeff's original patch with my fixup for DATE_STRFTIME squashed > > in and a new change to reject "raw-local" (in both Documentation/ and > > date.c). > > Even in --date=raw, we do show the timez

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:13:25PM -0700, Junio C Hamano wrote: > > So instead, let us just assume that any async process is > > handling sideband data. That's always true now, and is > > likely to remain so in the future. > > Hmm, does Stefan's thread-pool thing interact with this decision in >

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 3:13 PM, Junio C Hamano wrote: > Jeff King writes: > >> What we really need is thread-local storage for >> packet_trace_identity. But the async code does not provide >> an interface for that, and it would be messy to add it here >> (we'd have to care about pthreads, initial

Re: [PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread Junio C Hamano
Nicely done. -- 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 1/2] run-command: provide in_async query function

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 03:09:56PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It's not easy for arbitrary code to find out whether it is > > running in an async process or not. A top-level function > > which is fed to start_async() can know (you just pass down > > an argument saying

Re: [PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread Junio C Hamano
John Keeping writes: > This is Jeff's original patch with my fixup for DATE_STRFTIME squashed > in and a new change to reject "raw-local" (in both Documentation/ and > date.c). Even in --date=raw, we do show the timezone offset, so I do not necessarily agree that raw-local is nonsensical. That'

[PATCH] rerere: release lockfile in non-writing functions

2015-09-01 Thread Jeff King
There's a bug in builtin/am.c in which we take a lock on MERGE_RR recursively. But rather than fix am.c, this patch fixes the confusing interface from rerere.c that caused the bug. Read on for the gory details. The setup_rerere() function both reads the existing MERGE_RR file, and takes MERGE_RR.l

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Junio C Hamano
Jeff King writes: > What we really need is thread-local storage for > packet_trace_identity. But the async code does not provide > an interface for that, and it would be messy to add it here > (we'd have to care about pthreads, initializing our > pthread_key_t ahead of time, etc). True. > So in

Re: [PATCH 1/2] run-command: provide in_async query function

2015-09-01 Thread Junio C Hamano
Jeff King writes: > It's not easy for arbitrary code to find out whether it is > running in an async process or not. A top-level function > which is fed to start_async() can know (you just pass down > an argument saying "you are async"). But that function may > call other global functions, and we

[PATCH v2 4/6] t6300: make UTC and local dates different

2015-09-01 Thread John Keeping
By setting the UTC time to 23:18:43 the date in +0200 is the following day, 2006-07-04. This will ensure that the test for "short-local" to be added in a following patch tests for different output from the "short" format. Signed-off-by: John Keeping --- t/t6300-for-each-ref.sh | 48

[PATCH v2 6/6] t6300: add tests for "-local" date formats

2015-09-01 Thread John Keeping
Signed-off-by: John Keeping --- t/t6300-for-each-ref.sh | 32 1 file changed, 32 insertions(+) diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 2e76ca9..c3aee70 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -170,6 +170,

[PATCH v2 5/6] t6300: add test for "raw" date format

2015-09-01 Thread John Keeping
Signed-off-by: John Keeping --- t/t6300-for-each-ref.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 9e0096f..2e76ca9 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -196,6 +196,10 @@ test_expect_success 'Che

[PATCH v2 3/6] t6300: introduce test_date() helper

2015-09-01 Thread John Keeping
This moves the setup of the "expected" file inside the test case. The helper function has the advantage that we can use SQ in the file content without needing to escape the quotes. Signed-off-by: John Keeping --- I considered moving the test_expect_success into the helper, like with test_atom ea

[PATCH v2 2/6] date: make "local" orthogonal to date format

2015-09-01 Thread John Keeping
From: Jeff King Most of our "--date" modes are about the format of the date: which items we show and in what order. But "--date=local" is a bit of an oddball. It means "show the date in the normal format, but using the local timezone". The timezone we use is orthogonal to the actual format, and t

[PATCH v2 1/6] fast-import: switch crash-report date to iso8601

2015-09-01 Thread John Keeping
From: Jeff King When fast-import emits a crash report, it does so in the user's local timezone. But because we omit the timezone completely for DATE_LOCAL, a reader of the report does not immediately know which time zone was used. Let's switch this to ISO8601 instead, which includes the time zone

[PATCH v2 0/6] Make "local" orthogonal to date format

2015-09-01 Thread John Keeping
Jeff's first patch is unmodified but I've squashed the fixed currently on "pu" into the second. I also realised while adding the tests that "raw-local" is meaningless so I've modified the code to reject it in the same way as "relative-local". Jeff King (2): fast-import: switch crash-report date

Re: [PATCH v15 06/13] ref-filter: add option to filter out tags, branches and remotes

2015-09-01 Thread Junio C Hamano
Karthik Nayak writes: > + if (!filter->kind) > die("filter_refs: invalid type"); > + else { > + if (filter->kind == FILTER_REFS_BRANCHES) > + ret = for_each_fullref_in("refs/heads/", > ref_filter_handler, &ref_cbdata, broken); > +

Re: [PATCH v15 05/13] ref-filter: implement an `align` atom

2015-09-01 Thread Junio C Hamano
Karthik Nayak writes: > We have an `at_end` function for each element of the stack which is to > be called when the `end` atom is encountered. Using this we implement > the aling_handler() for the `align` atom, this aligns the final strbuf align_handler(). > struct ref_formatting_stack { >

Re: Git crash on different versions, including current

2015-09-01 Thread Christian Soltenborn
Hi Johannes, > If you copy the entire `GoogleTestExtension` folder somewhere else, does the crash happen there, still? Can you share a .zip of this folder? Ciao, Johannes I just unzipped the folder to C: and tried again, and it indeed still crashes. Which is probably good news, because it shouldn

Re: [PATCH 1/2] run-command: provide in_async query function

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 04:22:43PM -0400, Jeff King wrote: > diff --git a/run-command.c b/run-command.c > index 3277cf7..c8029f2 100644 > --- a/run-command.c > +++ b/run-command.c This diff is a little funny to read because the interesting context is far away, and it is not immediately obvious wh

[PATCH 2/2] pkt-line: show packets in async processes as "sideband"

2015-09-01 Thread Jeff King
If you run "GIT_TRACE_PACKET=1 git push", you may get confusing output like (line prefixes omitted for clarity): packet: push< \1000eunpack ok0019ok refs/heads/master packet: push< unpack ok packet: push< ok refs/heads/master packet: push< packet: p

[PATCH 1/2] run-command: provide in_async query function

2015-09-01 Thread Jeff King
It's not easy for arbitrary code to find out whether it is running in an async process or not. A top-level function which is fed to start_async() can know (you just pass down an argument saying "you are async"). But that function may call other global functions, and we would not want to have to pas

[PATCH 0/2] clarify sideband muxing in GIT_TRACE_PACKET

2015-09-01 Thread Jeff King
I happened to be debugging push with GIT_TRACE_PACKET today, and got confused by the mixture of trace from the sideband demuxer and push itself (details in patch 2/2). This series fixes it by showing a distinct prefix for the sideband reads. There's some trickery with start_async() involved, so I'

Re: [PATCHv4 1/3] submodule: implement `list` as a builtin helper

2015-09-01 Thread Junio C Hamano
Stefan Beller writes: > +static int module_list_compute(int argc, const char **argv, > + const char *prefix, > + struct pathspec *pathspec) > +{ > + int i, result = 0; > + char *max_prefix, *ps_matched = NULL; > + int max_prefix_

Re: [PATCHv4 3/3] submodule: implement `clone` as a builtin helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 3:05 PM, Jeff King wrote: > On Tue, Sep 01, 2015 at 02:52:54PM -0400, Eric Sunshine wrote: >> > + /* Redirect the worktree of the submodule in the superproject's >> > config */ >> > + if (strbuf_getcwd(&sb)) >> > + die_errno(_("unable to get curren

Re: [PATCHv4 3/3] submodule: implement `clone` as a builtin helper

2015-09-01 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Sep 1, 2015 at 2:24 PM, Stefan Beller wrote: >> This converts implements the helper `module_clone`. This functionality is > > Mentioned previously[1]: "converts implements"? > > [1]: http://article.gmane.org/gmane.comp.version-control.git/276966 Stefan, perhaps a

Re: [PATCHv4 3/3] submodule: implement `clone` as a builtin helper

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 02:52:54PM -0400, Eric Sunshine wrote: > > + /* Redirect the worktree of the submodule in the superproject's > > config */ > > + if (strbuf_getcwd(&sb)) > > + die_errno(_("unable to get current working directory")); > > + > > + if (!is_absol

Re: Windows path handling changed between versions

2015-09-01 Thread Geofrey Sanders
I can (eventually) make a proper bug report,in the mean time I'll address a few particulars: * I've been using git from regular CMD with Git's bin/ in my path. Not Git Bash. * I created a new repo by cloning, giving an absolute path for the working tree location. This is the line from the script I

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Junio C Hamano
Lars Schneider writes: > I searched the Internet for clues around cp1252 and found that a > similar patch was submitted to Mercurial just a month ago. The author > seconds my cp1252 observation: > http://mercurial.808500.n3.nabble.com/PATCH-stable-convert-use-original-local-encoding-when-converti

Re: [PATCHv4 2/3] submodule: implement `name` as a builtin helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 2:24 PM, Stefan Beller wrote: > This implements the helper `module_name` in C instead of shell, You probably want s/module_name/name/ or state more explicitly: Reimplement `module_name` shell function in C as `name`. or something. > yielding a nice performance boost.

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Lars Schneider
On 01 Sep 2015, at 19:35, Junio C Hamano wrote: > Lars Schneider writes: > >> On 01 Sep 2015, at 01:13, Junio C Hamano wrote: >> >>> larsxschnei...@gmail.com writes: >>> From: Lars Schneider >>> >>> Here is a space for you to describe what it does and why it is a >>> good idea

Re: [PATCHv4 3/3] submodule: implement `clone` as a builtin helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 2:24 PM, Stefan Beller wrote: > This converts implements the helper `module_clone`. This functionality is Mentioned previously[1]: "converts implements"? [1]: http://article.gmane.org/gmane.comp.version-control.git/276966 > needed for converting `git submodule update` lat

Re: GSoC 2015 is over

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 06:55:04PM +0200, Matthieu Moy wrote: > I consider this GSoC as a great success and a pleasant experience. > Congratulation to Paul and Karthik, and a warm "thank you" to everybody > who contributed: administrators, mentors, reviewers, and obviously > Junio! (not to mention

Re: [PATCH 3/3] submodule: implement `module_clone` as a builtin helper

2015-09-01 Thread Eric Sunshine
On Tue, Sep 1, 2015 at 1:49 PM, Stefan Beller wrote: > took all suggestions except the one below. > >> >> if (strbuf_getcwd(&sb)) >> die_errno(...); >> strbuf_addf(&sb, "/%s, sm_gitdir); >> free(sm_gitdir); >> sm_gitdir = strbuf_detach(&sb, NULL); >> >>> + } >>> + >>>

[PATCH v15 12/13] tag.c: implement '--format' option

2015-09-01 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

[PATCH v15 08/13] ref-filter: add support to sort by version

2015-09-01 Thread Karthik Nayak
From: Karthik Nayak Add support to sort by version using the "v:refname" and "version:refname" option. This is achieved by using the 'versioncmp()' function as the comparing function for qsort. This option is included to support sorting by versions in `git tag -l` which will eventually be ported

[PATCH v15 11/13] tag.c: use 'ref-filter' APIs

2015-09-01 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter' to filter out

[PATCH v15 06/13] ref-filter: add option to filter out tags, branches and remotes

2015-09-01 Thread Karthik Nayak
From: Karthik Nayak Add a function called 'for_each_fullref_in()' to refs.{c,h} which iterates through each ref for the given path without trimming the path and also accounting for broken refs, if mentioned. Add 'filter_ref_kind()' in ref-filter.c to check the kind of ref being handled and retur

[PATCH v15 09/13] ref-filter: add option to match literal pattern

2015-09-01 Thread Karthik Nayak
From: Karthik Nayak Since 'ref-filter' only has an option to match path names add an option for plain fnmatch pattern-matching. This is to support the pattern matching options which are used in `git tag -l` and `git branch -l` where we can match patterns like `git tag -l foo*` which would match

[PATCH v15 07/13] ref-filter: add support for %(contents:lines=X)

2015-09-01 Thread Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using the '-n' option. Copy code from 'tag.c' to 'ref-filter' and modify it to support appending of N lines from the annotation of tags to the given strbuf. Implement %(contents:lines=X) where X lines of the given object are obtained.

[PATCH v15 13/13] tag.c: implement '--merged' and '--no-merged' options

2015-09-01 Thread Karthik Nayak
Use 'ref-filter' APIs to implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit. The '--no-merged' option lets the user to only list tags not merged into the named commit. If no object is provided it assum

[PATCH v15 10/13] tag.c: use 'ref-filter' data structures

2015-09-01 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter' completely. As this is a temporary

[PATCH v15 04/13] ref-filter: introduce handler function for each atom

2015-09-01 Thread Karthik Nayak
Introduce a handler function for each atom, which is called when the atom is processed in show_ref_array_item(). In this context make append_atom() as the default handler function and extract quote_formatting() out of append_atom(). Bump this to the top. Mentored-by: Christian Couder Mentored-by

[PATCH v15 05/13] ref-filter: implement an `align` atom

2015-09-01 Thread Karthik Nayak
Implement an `align` atom which left-, middle-, or right-aligns the content between %(align:..) and %(end). It is followed by `:,`, where the `` is either left, right or middle and `` is the size of the area into which the content will be placed. If the content between %(align:) and %(end) is more

[PATCH v15 03/13] utf8: add function to align a string into given strbuf

2015-09-01 Thread Karthik Nayak
Add strbuf_utf8_align() which will align a given string into a strbuf as per given align_type and width. If the width is greater than the string length then no alignment is performed. Helped-by: Eric Sunshine Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak

[PATCH v15 02/13] ref-filter: introduce ref_formatting_state and ref_formatting_stack

2015-09-01 Thread Karthik Nayak
Introduce ref_formatting_state which will hold the formatted output strbuf instead of directly printing to stdout. This will help us in creating modifier atoms which modify the format specified before printing to stdout. Implement a stack machinery for ref_formatting_state, this allows us to push

[PATCH v15 00/13] port builtin/tag.c to use ref-filter APIs.

2015-09-01 Thread Karthik Nayak
The previous iteration of this series is found here: http://article.gmane.org/gmane.comp.version-control.git/276779 Changes in this version: * Make %(contents:lines=X) use existing ref-filter code rather than reply completely on the code borrowed from tag.c. * Make struct align and struct contents

[PATCH v15 01/13] ref-filter: move `struct atom_value` to ref-filter.c

2015-09-01 Thread Karthik Nayak
Since atom_value is only required for the internal working of ref-filter it doesn't belong in the public header. Helped-by: Eric Sunshine Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- ref-filter.c | 5 + ref-filter.h | 5 + 2 files changed, 6

[PATCHv4 3/3] submodule: implement `clone` as a builtin helper

2015-09-01 Thread Stefan Beller
This converts implements the helper `module_clone`. This functionality is needed for converting `git submodule update` later on, which we want to add threading to. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 140 git-submodule.sh

[PATCHv4 1/3] submodule: implement `list` as a builtin helper

2015-09-01 Thread Stefan Beller
Most of the submodule operations work on a set of submodules. Calculating and using this set is usually done via: module_list "$@" | { while read mode sha1 stage sm_path do # the actual operation done } Currently the function `module_

[PATCHv4 2/3] submodule: implement `name` as a builtin helper

2015-09-01 Thread Stefan Beller
This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real0m11.066s user0m3.348s sys 0m8.534s With this patch applied

[PATCHv4 0/3] submodule--helper: Have some refactoring only patches first

2015-09-01 Thread Stefan Beller
I added all suggestions from Eric and rewrote the main function to not have hardcoded all the commands we're introducing. diff to patch series 3 below. Stefan Beller (3): submodule: implement `list` as a builtin helper submodule: implement `name` as a builtin helper submodule: implement `cl

Re: [PATCH] git-quiltimport: add commandline option --series

2015-09-01 Thread Junio C Hamano
Juerg Haefliger writes: > The quilt series file doesn't have to be located in the same directory > with the patches and can be named differently than 'series' as well. This > patch adds a commandline option to allow for a non-standard series > filename and location. > > Signed-off-by: Juerg Haefl

Re: [PATCH] path.c: make 'common_list' a file local symbol

2015-09-01 Thread Junio C Hamano
Ramsay Jones writes: > Commit 04afda89 ("refs: clean up common_list", 26-08-2015) changed > the type of the 'common_list' symbol from an array of 'formatted' > strings to an array of struct containing the same data. However, in > addition it also (inadvertently) changed the visibility of the > sy

Re: Git's inconsistent command line options

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 10:50 AM, Barry Warsaw wrote: > On Sep 01, 2015, at 09:42 AM, Junio C Hamano wrote: > >>That way, you are forcing all the existing scripts to be updated to >>say "git -c ..." for _all_ invocations of Git they have, aren't you? > > No, why? If the default value enables the c

Re: [PATCH 3/3] submodule: implement `module_clone` as a builtin helper

2015-09-01 Thread Stefan Beller
took all suggestions except the one below. > > if (strbuf_getcwd(&sb)) > die_errno(...); > strbuf_addf(&sb, "/%s, sm_gitdir); > free(sm_gitdir); > sm_gitdir = strbuf_detach(&sb, NULL); > >> + } >> + >> + if (strbuf_getcwd(&sb)) >> + die_errno("unab

Re: Git's inconsistent command line options

2015-09-01 Thread Barry Warsaw
On Sep 01, 2015, at 09:42 AM, Junio C Hamano wrote: >That way, you are forcing all the existing scripts to be updated to >say "git -c ..." for _all_ invocations of Git they have, aren't you? No, why? If the default value enables the current ui, then no scripts need changing. Users can enable th

Re: GSoC 2015 is over

2015-09-01 Thread Karthik Nayak
On Tue, Sep 1, 2015 at 10:25 PM, Matthieu Moy wrote: > Hi, > > The Google Summer of Code 2015 is officially over. We had two students > (Paul and Karthik), and both of them passed. 100 % success :-). > Congrats Paul :) > I didn't follow closely Paul's work, but we now have C builtins for > "pull

Re: [PATCH v14 00/13] Port tag.c to use ref-filter.c

2015-09-01 Thread Karthik Nayak
On Mon, Aug 31, 2015 at 5:06 PM, Karthik Nayak wrote: > On Mon, Aug 31, 2015 at 1:01 PM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> * We perform quoting on each layer of nested alignment. >> >> I do not understand why. >> >> For example, using the tip of karthik/exp on GitHub (on top

Re: [PATCH] t7300: fix broken && chains

2015-09-01 Thread Jeff King
On Tue, Sep 01, 2015 at 08:27:59AM +0200, erik elfström wrote: > ( > echo "100644 $o5 0a" > echo "100644 $o0 0c" > echo "16 $c1 0d" > ) >expected && > > I'd estimate that there are hundreds of these (see t3030 for > examples). I'm not sure if you c

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Junio C Hamano
Lars Schneider writes: > On 01 Sep 2015, at 01:13, Junio C Hamano wrote: > >> larsxschnei...@gmail.com writes: >> >>> From: Lars Schneider >>> >> >> Here is a space for you to describe what it does and why it is a >> good idea to have it. > How about this: > > Perforce keeps the encoding of

Re: Windows path handling changed between versions

2015-09-01 Thread Johannes Schindelin
Hi Geofrey, On 2015-09-01 18:55, Geofrey Sanders wrote: > I recently upgraded from Windows Git 1.6.2 to 2.5.0 and found myself > unable to rebase. Turns out paths didn't used to be case-sensitive and > now they are, causing a number of operations to halt. A repo created > by pointing at the direct

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Junio C Hamano
Lars Schneider writes: >> I'll move this to 9822, as 9821 is taken by another git-p4 test, >> while queuing. > OK. I wasn’t sure how this is handled. Just for my understanding: As > soon as a TC number is occupied in one of the official branches > (master/next/pu/maint) then the next number shoul

Re: [PATCH] mailmap: update my entry with new email address

2015-09-01 Thread Ramsay Jones
Hi Johannes, On 01/09/15 17:11, Johannes Schindelin wrote: > Hi Ramsay, > > On 2015-09-01 17:50, Ramsay Jones wrote: > >> diff --git a/.mailmap b/.mailmap >> index ece2951..e5b4126 100644 >> --- a/.mailmap >> +++ b/.mailmap >> @@ -186,7 +186,7 @@ Philip Jägenstedt >> >> Philipp A. Hartmann >>

Re: [PATCH] push: don't show Done with --quiet --porcelain

2015-09-01 Thread Junio C Hamano
Josh Rabinowitz writes: > Change so 'git push --porcelain --quiet' emits no text when there > is no error. This makes the --quiet option here more consistent with > other git commands. > > Signed-off-by: josh rabinowitz > --- The rationale given in 77555854 (git-push: make git push --porcelain

Re: [PATCH] mailmap: update my entry with new email address

2015-09-01 Thread Stefan Beller
On Tue, Sep 1, 2015 at 9:11 AM, Johannes Schindelin wrote: > Hi Ramsay, > > On 2015-09-01 17:50, Ramsay Jones wrote: > >> diff --git a/.mailmap b/.mailmap >> index ece2951..e5b4126 100644 >> --- a/.mailmap >> +++ b/.mailmap >> @@ -186,7 +186,7 @@ Philip Jägenstedt >> >> Philipp A. Hartmann >>

Windows path handling changed between versions

2015-09-01 Thread Geofrey Sanders
I recently upgraded from Windows Git 1.6.2 to 2.5.0 and found myself unable to rebase. Turns out paths didn't used to be case-sensitive and now they are, causing a number of operations to halt. A repo created by pointing at the directory c:\core\guidewire\Dev\2.4 would (I suppose) technically h

GSoC 2015 is over

2015-09-01 Thread Matthieu Moy
Hi, The Google Summer of Code 2015 is officially over. We had two students (Paul and Karthik), and both of them passed. 100 % success :-). I didn't follow closely Paul's work, but we now have C builtins for "pull" and "am" (both in master) instead of shell scripts. Karthik worked on the unificati

Re: Git's inconsistent command line options

2015-09-01 Thread Junio C Hamano
(Administrivia) please do not cull CC list when replying. Barry Warsaw writes: > On Sep 01, 2015, at 02:28 AM, David Aguilar wrote: > >>While a script writer could write, "git -c core.cliversion=1 ...", >>no one does that, no one wants to do that, and it just seems >>like a bad idea that's best

Re: making refs/bisect/ per worktree (was Re: (unknown))

2015-09-01 Thread Junio C Hamano
David Turner writes: > This version of the patch series squashes in Junio's comment fix and > the xstrndup fix. > > In addition, it removes refs/worktree, and just makes refs/bisect > per-worktree. If we later discover that other things need to be > per-worktree, we can do refs/worktree, but for

Re: [PATCH] t7300: fix broken && chains

2015-09-01 Thread Junio C Hamano
erik elfström writes: > On Mon, Aug 31, 2015 at 6:58 PM, Junio C Hamano wrote: >> >> ... It may have been >> better if you didn't do "while we are here" and corrected only the >> &&-chain in patch 1/2 and then updated the style of the tests to >> take advantage of the newer facilities recent te

Re: [PATCHv3 2/3] submodule: implement `module-name` as a builtin helper

2015-09-01 Thread Stefan Beller
On Mon, Aug 31, 2015 at 7:31 PM, Eric Sunshine wrote: > On Mon, Aug 31, 2015 at 8:40 PM, Stefan Beller wrote: >> This implements the helper `module_name` in C instead of shell, >> yielding a nice performance boost. >> >> Before this patch, I measured a time (best out of three): >> >> $ time ./t

Re: [PATCH] mailmap: update my entry with new email address

2015-09-01 Thread Johannes Schindelin
Hi Ramsay, On 2015-09-01 17:50, Ramsay Jones wrote: > diff --git a/.mailmap b/.mailmap > index ece2951..e5b4126 100644 > --- a/.mailmap > +++ b/.mailmap > @@ -186,7 +186,7 @@ Philip Jägenstedt > > Philipp A. Hartmann > Philippe Bruhat > Ralf Thielow > -Ramsay Allan Jones > +Ramsay Jone

[PATCH] path.c: make 'common_list' a file local symbol

2015-09-01 Thread Ramsay Jones
Commit 04afda89 ("refs: clean up common_list", 26-08-2015) changed the type of the 'common_list' symbol from an array of 'formatted' strings to an array of struct containing the same data. However, in addition it also (inadvertently) changed the visibility of the symbol from file local to external

[PATCH] mailmap: update my entry with new email address

2015-09-01 Thread Ramsay Jones
My 'demon' email address is no longer functional since, after 16+ years with demon, I have had to change my ISP. :( Also, take the opportunity to remove my middle name, which I only use on official documents (or in the GECOS field when creating a user account on unix). Signed-off-by: Ramsay Jone

Re: [PATCH v14 04/13] ref-filter: implement an `align` atom

2015-09-01 Thread Karthik Nayak
On Tue, Sep 1, 2015 at 6:41 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> Like this: >> >> else if (skip_prefix(name, "align", &valp)) { >> struct align *align = &v->u.align; >> struct strbuf **s; >> >> if (valp[0] != ':') >> die(_("form

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Lars Schneider
On 01 Sep 2015, at 16:35, Torsten Bögershausen wrote: > On 2015-09-01 14.47, Lars Schneider wrote: +test_expect_success 'Create a repo containing iso8859-1 encoded paths' ' >> +cd "$cli" && >> + >> +ISO8859="$(printf "$UTF8_ESCAPED" | iconv -f utf-8 -t >> is

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Torsten Bögershausen
On 2015-09-01 14.47, Lars Schneider wrote: >>> +test_expect_success 'Create a repo containing iso8859-1 encoded paths' ' >>> >> +cd "$cli" && >>> >> + >>> >> +ISO8859="$(printf "$UTF8_ESCAPED" | iconv -f utf-8 -t >>> >> iso8859-1)" && >>> >> +>"$ISO8859" && >>> >> +

Re: Git's inconsistent command line options

2015-09-01 Thread Barry Warsaw
On Sep 01, 2015, at 02:28 AM, David Aguilar wrote: >While a script writer could write, "git -c core.cliversion=1 ...", >no one does that, no one wants to do that, and it just seems >like a bad idea that's best left unexplored. Sure, no one will do that from the command line, but I don't think peo

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Lars Schneider
On 01 Sep 2015, at 01:13, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> > > Here is a space for you to describe what it does and why it is a > good idea to have it. How about this: Perforce keeps the encoding of a path as given by the originating OS.

Re: [PATCH v14 04/13] ref-filter: implement an `align` atom

2015-09-01 Thread Matthieu Moy
Karthik Nayak writes: > Like this: > > else if (skip_prefix(name, "align", &valp)) { > struct align *align = &v->u.align; > struct strbuf **s; > > if (valp[0] != ':') > die(_("format: usage %%(align:,)")); > else > v

Re: [PATCH v14 04/13] ref-filter: implement an `align` atom

2015-09-01 Thread Karthik Nayak
On Mon, Aug 31, 2015 at 11:32 PM, Eric Sunshine wrote: > On Mon, Aug 31, 2015 at 1:28 PM, Matthieu Moy > wrote: >> Eric Sunshine writes: >>> >>> Warning about unrecognized atoms may indeed be a good idea, however, >>> the current behavior isn't a huge problem since user discovers the >>> error w

Re: [PATCH v3] git-p4: add "--path-encoding" option

2015-09-01 Thread Lars Schneider
On 01 Sep 2015, at 06:37, Torsten Bögershausen wrote: > On 01/09/15 00:10, larsxschnei...@gmail.com wrote: >> From: Lars Schneider >> >> Signed-off-by: Lars Schneider >> --- >> Documentation/git-p4.txt| 5 + >> git-p4.py | 6 ++ >> t/t9821-git-p4-path-

  1   2   >