Re: [PATCH v3 0/6] Pull out require_clean_work_tree() functionality from builtin/pull.c

2016-10-05 Thread Johannes Schindelin
Hi Junio,

On Tue, 4 Oct 2016, Junio C Hamano wrote:

> Johannes Schindelin  writes:
> 
> > This is the 5th last patch series of my work to accelerate interactive
> > rebases in particular on Windows.
> 
> Offtopic, but I am always confused by what you might mean by this
> "nth last patch series".  Is this series 5th from the last and we
> have four more to go?

Yes, we have four more to go:

- the patch series (called "prepare-sequencer" in my fork) preparing the
  sequencer code for the next patch series, such as revamping the parser
  for the edit script (or "todo script" as I used to say all the time, or
  "insn sheet" as sequencer calls it),

- the patch series ("sequencer-i") teaching the sequencer to parse and
  execute the commands of rebase -i's git-rebase-todo file,

- the patch series ("rebase--helper") introducing the builtin, and using
  it from rebase -i, and finally

- the patch series ("rebase-i-extra") that moves more performance critical
  bits and pieces from git-rebase--interactive.sh into the rebase--helper.

I had originally planned to stop at rebase--helper and invite other
developers to join the fun of making rebase -i a true builtin, but the
performance improvement was surprisingly disappointing before the
rebase--helper learned to skip unnecessary picks, to verify that the
script is valid, to expand/collapse the SHA-1s, and to rearrange
fixup!/squash!  lines.

> In any case, after a quick re-read and comparison with the last
> round, I think this is in a good shape.  I'd say that we would wait
> for a few days for others to comment and then merge it to 'next' if
> we missed nothing glaringly wrong.

Perfect!
Dscho


Re: [PATCH v3 0/6] Pull out require_clean_work_tree() functionality from builtin/pull.c

2016-10-04 Thread Junio C Hamano
Johannes Schindelin  writes:

> This is the 5th last patch series of my work to accelerate interactive
> rebases in particular on Windows.

Offtopic, but I am always confused by what you might mean by this
"nth last patch series".  Is this series 5th from the last and we
have four more to go?

In any case, after a quick re-read and comparison with the last
round, I think this is in a good shape.  I'd say that we would wait
for a few days for others to comment and then merge it to 'next' if
we missed nothing glaringly wrong.

Thanks.


[PATCH v3 0/6] Pull out require_clean_work_tree() functionality from builtin/pull.c

2016-10-04 Thread Johannes Schindelin
This is the 5th last patch series of my work to accelerate interactive
rebases in particular on Windows.

Basically, all it does is to make reusable some functions that were
ported over from git-pull.sh but made private to builtin/pull.c.

Changes since v2:

- added a hint for translators.

- changed the existing error messages to start with a lower-case, as per
  our current convention (the previous error messages were inherited
  from code written before that convention was in place).

- struck the "truly" adjective from the commit message, as it did not
  get Junio's consent.


Johannes Schindelin (6):
  pull: drop confusing prefix parameter of die_on_unclean_work_tree()
  pull: make code more similar to the shell script again
  Make the require_clean_work_tree() function reusable
  Export also the has_un{staged,committed}_changed() functions
  wt-status: teach has_{unstaged,uncommitted}_changes() about submodules
  wt-status: begin error messages with lower-case

 builtin/pull.c | 71 +++-
 wt-status.c| 78 ++
 wt-status.h|  6 +
 3 files changed, 87 insertions(+), 68 deletions(-)

Published-As: 
https://github.com/dscho/git/releases/tag/require-clean-work-tree-v3
Fetch-It-Via: git fetch https://github.com/dscho/git require-clean-work-tree-v3

Interdiff vs v2:

 diff --git a/builtin/pull.c b/builtin/pull.c
 index c639167..0bf9802 100644
 --- a/builtin/pull.c
 +++ b/builtin/pull.c
 @@ -810,7 +810,7 @@ int cmd_pull(int argc, const char **argv, const char 
*prefix)
  
if (!autostash)
require_clean_work_tree(N_("pull with rebase"),
 -  "Please commit or stash them.", 1, 0);
 +  "please commit or stash them.", 1, 0);
  
if (get_rebase_fork_point(rebase_fork_point, repo, *refspecs))
hashclr(rebase_fork_point);
 diff --git a/wt-status.c b/wt-status.c
 index a86918a..010276b 100644
 --- a/wt-status.c
 +++ b/wt-status.c
 @@ -2264,15 +2264,16 @@ int require_clean_work_tree(const char *action, const 
char *hint, int ignore_sub
rollback_lock_file(lock_file);
  
if (has_unstaged_changes(ignore_submodules)) {
 -  error(_("Cannot %s: You have unstaged changes."), _(action));
 +  /* TRANSLATORS: the action is e.g. "pull with rebase" */
 +  error(_("cannot %s: You have unstaged changes."), _(action));
err = 1;
}
  
if (has_uncommitted_changes(ignore_submodules)) {
if (err)
 -  error(_("Additionally, your index contains uncommitted 
changes."));
 +  error(_("additionally, your index contains uncommitted 
changes."));
else
 -  error(_("Cannot %s: Your index contains uncommitted 
changes."),
 +  error(_("cannot %s: Your index contains uncommitted 
changes."),
  _(action));
err = 1;
}

-- 
2.10.0.windows.1.325.ge6089c1

base-commit: 0cf36115dce7438a0eafad54a81cc57175e8fb54