[RFC/PATCH v11 06/13] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2016-07-31 Thread Pranit Bauva
is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/am.c | 20 ++-- cache.h | 3 ++

Re: git bisect for reachable commits only

2016-07-31 Thread Jakub Narębski
W dniu 31.07.2016 o 02:06, Oleg Taranenko pisze: > Then, I suggest as well additional to defaulting via 'git config > bisect.reachable true/false' use per bisect session switch > > git bisect start --[un-]reachable-commits # which will override > default setting Isn't `--reachable-commits` t

[RFC/PATCH v11 05/13] t6030: explicitly test for bisection cleanup

2016-07-31 Thread Pranit Bauva
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- I faced this problem while converting `bisect_clean_state` and the tests

[RFC/PATCH v11 03/13] bisect--helper: `write_terms` shell function in C

2016-07-31 Thread Pranit Bauva
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 from inside the function write_terms() C implementation. Also `|| exit` is added whe

[RFC/PATCH v11 07/13] bisect--helper: `bisect_reset` shell function in C

2016-07-31 Thread Pranit Bauva
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 functions to C so as to use the existing test suite. As more functions are ported, this

[RFC/PATCH v11 11/13] bisect--helper: `bisect_next_check` shell function in C

2016-07-31 Thread Pranit Bauva
Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-next-check` is a temporary measure to port shell function to C so as to use the existing test suite. As more functions are ported, this

[RFC/PATCH v11 12/13] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-07-31 Thread Pranit Bauva
Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . In the shell version, the terms were identified by strings but in C version its done by bit manipulation and passing the integer value to the

[RFC/PATCH v11 08/13] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-07-31 Thread Pranit Bauva
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 . Using `--check-expected-revs` subcommand is a temporary measure to port shell functions to C so as to use the existing test

Re: [PATCH v3 10/10] convert: add filter..process option

2016-07-31 Thread Jakub Narębski
[Excuse me replying to myself, but there are a few things I forgot, or realized only later] W dniu 31.07.2016 o 00:05, Jakub Narębski pisze: > W dniu 30.07.2016 o 01:38, larsxschnei...@gmail.com pisze: >> From: Lars Schneider >> >> Git's clean/smudge mechanism invokes an external filter process

[RFC/PATCH v11 09/13] bisect--helper: `bisect_write` shell function in C

2016-07-31 Thread Pranit Bauva
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 shell function in C so as to use the existing test suite. As more functions are ported, this

[RFC/PATCH v11 02/13] bisect: rewrite `check_term_format` shell function in C

2016-07-31 Thread Pranit Bauva
Reimplement the `check_term_format` shell function in C and add a `--check-term-format` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-term-format` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more functions

[RFC/PATCH v11 10/13] bisect--helper: `check_and_set_terms` shell function in C

2016-07-31 Thread Pranit Bauva
Reimplement the `check_and_set_terms` shell function in C and add `check-and-set-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-and-set-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functio

[RFC/PATCH v11 01/13] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-07-31 Thread Pranit Bauva
`--next-all` is meant to be used as a subcommand to support multiple "operation mode" though the current implementation does not contain any other subcommand along side with `--next-all` but further commits will include some more subcommands. Helped-by: Johannes Schindelin Mentored-by: Lars Schne

[RFC/PATCH v11 13/13] bisect--helper: `bisect_start` shell function partially in C

2016-07-31 Thread Pranit Bauva
Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function. `bisect_start` shell function will be completed after the `bisect_next` she

[RFC/PATCH v11 04/13] bisect--helper: `bisect_clean_state` shell function in C

2016-07-31 Thread Pranit Bauva
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 . Using `--bisect-clean-state` subcommand is a measure to port shell function to C so as to use the existing test suite. As more functions are ported

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-07-31 Thread Richard Ipsum
On Fri, Jul 29, 2016 at 09:59:08AM -0700, Stefan Beller wrote: > On Fri, Jul 29, 2016 at 5:44 AM, Richard Ipsum > wrote: > >> > >> These definitely seem like a family of related problems. I'd like to > >> use git-series as a format for storing iterations on things like GitHub > >> pull-requests o

Re: [PATCH] t7063: work around FreeBSD's lazy mtime update feature

2016-07-31 Thread Duy Nguyen
On Sun, Jul 31, 2016 at 3:07 AM, Eric Wong wrote: >> would be more to the point of what is going on, here. But I >> also wonder if untracked cache itself could/should be doing this >> internally. > > Still wondering :> There's nothing we can do besides maybe run a cron job executing 'sync' ever

git 2.9 subtree split with rejoin

2016-07-31 Thread Sylvain Garrigues
Hello, It seems now with 2.9 you cannot use git subtree split —rejoin without —onto otherwise you get: fatal: refusing to merge unrelated histories I wish I could pass --allow-unrelated-histories but that doesn’t work. Adding —onto makes the split operation much much longer. Could we make a bug

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-07-31 Thread Richard Ipsum
On Fri, Jul 29, 2016 at 06:00:55AM -0700, Josh Triplett wrote: > On Fri, Jul 29, 2016 at 01:44:44PM +0100, Richard Ipsum wrote: > > On Fri, Jul 29, 2016 at 04:04:26AM -0700, Josh Triplett wrote: > > > I hope to use git notes with git-series in the future, by putting > > > another gitlink under the

Re: Un-paged commit messages in git filter-branch's commit-filter?

2016-07-31 Thread Stefan Tauner
On Thu, 16 Jun 2016 05:59:47 -0400 Jeff King wrote: > On Mon, Jun 13, 2016 at 08:28:18AM +0200, Stefan Tauner wrote: > > > I am trying to do a major cleanup of the repository in one of my > > projects (and switch from git-svn to native git). I have developed a > > commit-filter script over the l

Re: git 2.9 subtree split with rejoin

2016-07-31 Thread Jakub Narębski
W dniu 31.07.2016 o 16:32, Sylvain Garrigues pisze: > Hello, > > It seems now with 2.9 you cannot use git subtree split —rejoin > without —onto otherwise you get: >fatal: refusing to merge unrelated histories > > I wish I could pass --allow-unrelated-histories but that doesn’t > work. > > Ad

Re: [PATCH v3 10/10] convert: add filter..process option

2016-07-31 Thread Lars Schneider
> On 31 Jul 2016, at 11:42, Jakub Narębski wrote: > > [Excuse me replying to myself, but there are a few things I forgot, > or realized only later] No worries :) > > W dniu 31.07.2016 o 00:05, Jakub Narębski pisze: >> W dniu 30.07.2016 o 01:38, larsxschnei...@gmail.com pisze: >>> From: Lars S

gitk should maybe keep focus on same file when switching patch->tree view

2016-07-31 Thread Britton Kerin
if you're looking at the patch for a given file (have it selected in the lower right window), then when you switch to tree it would be nice if it started at that file. I realize you can view Old version/New version but that doesn't help with landing the the right level of the tree for projects wit

Re: [PATCH v3 03/10] pkt-line: add packet_flush_gentle()

2016-07-31 Thread Torstem Bögershausen
> Am 29.07.2016 um 20:37 schrieb larsxschnei...@gmail.com: > > From: Lars Schneider > > packet_flush() would die in case of a write error even though for some callers > an error would be acceptable. What happens if there is a write error ? Basically the protocol is out of synch. Lenght informa

Re: [PATCH v3 03/10] pkt-line: add packet_flush_gentle()

2016-07-31 Thread Lars Schneider
> On 31 Jul 2016, at 22:36, Torstem Bögershausen wrote: > > > >> Am 29.07.2016 um 20:37 schrieb larsxschnei...@gmail.com: >> >> From: Lars Schneider >> >> packet_flush() would die in case of a write error even though for some >> callers >> an error would be acceptable. > What happens if th

Re: [PATCH v3 10/10] convert: add filter..process option

2016-07-31 Thread Jakub Narębski
W dniu 30.07.2016 o 01:38, larsxschnei...@gmail.com pisze: [...] > +Please note that you cannot use an existing filter..clean > +or filter..smudge command as filter..process > +command. I think it would be more readable and easier to understand to write: ... you cannot use an existing ... comma

Re: [PATCH v3 10/10] convert: add filter..process option

2016-07-31 Thread Jakub Narębski
W dniu 31.07.2016 o 21:49, Lars Schneider pisze: > On 31 Jul 2016, at 11:42, Jakub Narębski wrote: >> W dniu 31.07.2016 o 00:05, Jakub Narębski pisze: >>> W dniu 30.07.2016 o 01:38, larsxschnei...@gmail.com pisze: [...] >>> I think it would be nice to have here at least summary of the benchmarks

[PATCH 0/2] add PAGER_ENV to build and core.pagerEnv to config

2016-07-31 Thread Eric Wong
This series allows us to more easily configure platform-specific defaults at build-time and also allow users to override them at runtime via config. Previous discussion in this thread: https://public-inbox.org/git/52d87a79.6060...@rawbw.com/T/ The following changes since commit f8f7adce9

[PATCH 2/2] pager: implement core.pagerEnv in config

2016-07-31 Thread Eric Wong
This allows overriding the build-time PAGER_ENV variable at run-time. Inspired by part 1 of an idea from Kyle J. McKay at: https://public-inbox.org/git/62db6def-8b39-4481-ba06-245bf4523...@gmail.com/ Signed-off-by: Eric Wong --- Documentation/config.txt | 7 +++ pager.c |

[PATCH 1/2] pager: move pager-specific setup into the build

2016-07-31 Thread Eric Wong
From: Junio C Hamano Allowing PAGER_ENV to be set at build-time allows us to move pager-specific knowledge out of our build. Currently, this allows us to set a better default for FreeBSD where more(1) is the same binary as less(1). This also prepares us for introducing a run-time config knob to

Re: [PATCH] t7063: work around FreeBSD's lazy mtime update feature

2016-07-31 Thread Torstem Bögershausen
> Am 30.07.2016 um 15:20 schrieb Nguyễn Thái Ngọc Duy : > > Let's start with the commit message of [1] from freebsd.git [2] > >Sync timestamp changes for inodes of special files to disk as late >as possible (when the inode is reclaimed). Temporarily only do >this if option UFS_LA

Re: [PATCH 1/2] pager: move pager-specific setup into the build

2016-07-31 Thread brian m. carlson
On Mon, Aug 01, 2016 at 01:05:56AM +, Eric Wong wrote: > +static void setup_pager_env(struct argv_array *env) > +{ > + const char *pager_env = stringify(PAGER_ENV); > + > + while (*pager_env) { > + struct strbuf buf = STRBUF_INIT; > + const char *cp = strchrnul(p

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-07-31 Thread Christian Couder
On Fri, Jul 29, 2016 at 12:10 PM, Richard Ipsum wrote: > On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote: > [snip] >> >> I'd welcome any feedback, whether on the interface and workflow, the >> internals and collaboration, ideas on presenting diffs of patch series, >> or anything else