Re: Bug? git worktree fails with master on bare repo

2016-10-10 Thread Michael Tutty
> If I create a bare _clone_, then "HEAD" could be detached, or point to some > branch, depending on where "HEAD" is in the source repo I didn't mean a clone, I meant a brand-new (bare) repo. Then I would clone it somewhere, add commits and branches, and push them to the bare repo. > If

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

2016-10-10 Thread Jeff King
On Sun, Oct 09, 2016 at 07:53:23PM -0700, Jeremy Huddleston Sequoia wrote: > Subject: Re: [PATCH] t4014-format-patch: Adjust git_version regex to better > handle distro changes to DEF_VER > > Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae > Signed-off-by: Jeremy Huddleston Sequoia

[PATCH v4 00/14] Mark strings in Perl scripts for translation

2016-10-10 Thread Vasco Almeida
Mark messages in some perl scripts for translation. Fix minor stuff and follow Jakub Narębski's suggestion to use N__() instead of __() in the hash tables. Interdiff included below. Vasco Almeida (14): i18n: add--interactive: mark strings for translation i18n: add--interactive: mark simple

[PATCH v4 07/14] i18n: add--interactive: i18n of help_patch_cmd

2016-10-10 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 54 --- 1 file

[PATCH v4 02/14] i18n: add--interactive: mark simple here-documents for translation

2016-10-10 Thread Vasco Almeida
Mark messages in here-document without interpolation for translation. The here-document delimiter \EOF, which is the same as 'EOF', indicate that the text is to be treated literally without interpolation of its content. Unfortunately xgettext is not able to extract here documents with delimiter

[PATCH v4 03/14] i18n: add--interactive: mark strings with interpolation for translation

2016-10-10 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 25

[PATCH v4 12/14] i18n: send-email: mark warnings and errors for translation

2016-10-10 Thread Vasco Almeida
Mark warnings, errors and other messages for translation. Signed-off-by: Vasco Almeida --- git-send-email.perl | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index

[PATCH v4 10/14] i18n: add--interactive: mark status words for translation

2016-10-10 Thread Vasco Almeida
Mark words 'nothing', 'unchanged' and 'binary' used to display what has been staged or not, in "git add -i" status command. Alternatively one could mark N__('nothing') no-op in order to xgettext(1) extract the string and then trigger the translation at run time only with __($print->{FILE}), but

[PATCH v4 11/14] i18n: send-email: mark strings for translation

2016-10-10 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl

[PATCH v4 13/14] i18n: send-email: mark string with interpolation for translation

2016-10-10 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida --- git-send-email.perl | 90

[PATCH v4 01/14] i18n: add--interactive: mark strings for translation

2016-10-10 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida ---

[PATCH v4 04/14] i18n: clean.c: match string with git-add--interactive.perl

2016-10-10 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida --- builtin/clean.c | 10 +- 1

[PATCH v4 05/14] i18n: add--interactive: mark plural strings

2016-10-10 Thread Vasco Almeida
Mark plural strings for translation. Unfold each action case in one entire sentence. Pass new keyword for xgettext to extract. Update test to include new subroutine __n() for plural strings handling. Update documentation to include a description of the new __n() subroutine. Signed-off-by:

[PATCH v4 14/14] i18n: difftool: mark warnings for translation

2016-10-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d0..8d3632e 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -22,6

[PATCH v4 06/14] i18n: add--interactive: mark patch prompt for translation

2016-10-10 Thread Vasco Almeida
Mark prompt message assembled in place for translation, unfolding each use case for each entry in the %patch_modes hash table. Previously, this script relied on whether $patch_mode was set to run the command patch_update_cmd() or show status and loop the main loop. Now, it uses $cmd to indicate

[PATCH v4 09/14] i18n: add--interactive: remove %patch_modes entries

2016-10-10 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.perl

[PATCH v4 08/14] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-10-10 Thread Vasco Almeida
Mark message of edit_hunk_manually displayed in the editing file when user chooses 'e' option. The message had to be unfolded to allow translation of the $participle verb. Some messages end up being exactly the same for some uses cases, but left it for easier change in the future, e.g., wanting

Re: [PATCH v2] gpg-interface: use more status letters

2016-10-10 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 06.10.2016 23:43: > Junio C Hamano writes: > >> Michael J Gruber writes: >> >>> Also, I'm open to using another letter for EXPKEYSIG but couldn't decide >>> between 'Y', 'Z', 'K'. 'K' could be confused with

Re: %C(auto) not working as expected

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 04:26:18PM +0700, Duy Nguyen wrote: > > If we do a revamp of the pretty-formats to bring them more in line with > > ref-filter (e.g., something like "%(color:red)") maybe that would be an > > opportunity to make minor adjustments. Though, hmm, it looks like > >

[PATCH v3 24/25] sequencer: start error messages consistently with lower case

2016-10-10 Thread Johannes Schindelin
Quite a few error messages touched by this developer during the work to speed up rebase -i started with an upper case letter, violating our current conventions. Instead of sneaking in this fix (and forgetting quite a few error messages), let's just have one wholesale patch fixing all of the error

[PATCH v3 23/25] sequencer: quote filenames in error messages

2016-10-10 Thread Johannes Schindelin
This makes the code consistent by fixing quite a couple of error messages. Suggested by Jakub Narębski. Signed-off-by: Johannes Schindelin --- sequencer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sequencer.c

[PATCH v3 25/25] sequencer: mark all error messages for translation

2016-10-10 Thread Johannes Schindelin
There was actually only one error message that was not yet marked for translation. Signed-off-by: Johannes Schindelin --- sequencer.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sequencer.c b/sequencer.c index

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Jakub Narębski
W dniu 09.10.2016 o 21:03, Ian Kelling pisze: > I've got patches in various projects, and I don't have time to keep up > with the mailing list, but I'd like to help out with maintenance of that > code, or the functions/files it touches. People don't cc me. I figure I > could filter the list, test

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 11:24:01AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Oct 07, 2016 at 11:56:38AM +0200, Heiko Voigt wrote: > > > >> The description for referencing commits looks as if it is contradicting > >> the example, since it is itself enclosed in

Re: [PATCH] t3700-add.sh: Avoid filename collission between tests which could lead to test failure

2016-10-10 Thread Junio C Hamano
Jeremy Huddleston Sequoia writes: > Regressed-in: 610d55af0f082f6b866dc858e144c03d8ed4424c > Signed-off-by: Jeremy Huddleston Sequoia > CC: Thomas Gummerer > CC: Junio C Hamano This is also under-explained. Was

RE: git merge deletes my changes

2016-10-10 Thread Eduard Egorov
Hello again, I've noticed that my git is quite old (1.8.3) and built it from source tarball (2.10.1). Now the output is: # ~/gitbuild/git-2.10.1/git merge -s subtree --squash ceph_ansible fatal: refusing to merge unrelated histories I've checked my command history again: 738 git rm -rf

[PATCH v3 22/25] sequencer: mark action_name() for translation

2016-10-10 Thread Johannes Schindelin
The definition of this function goes back all the way to 043a449 (sequencer: factor code out of revert builtin, 2012-01-11), long before a serious effort was made to translate all the error messages. It is slightly out of the context of the current patch series (whose purpose it is to

[PATCH v3 21/25] sequencer: remove overzealous assumption in rebase -i mode

2016-10-10 Thread Johannes Schindelin
The sequencer was introduced to make the cherry-pick and revert functionality available as library function, with the original idea being to extend the sequencer to also implement the rebase -i functionality. The test to ensure that all of the commands in the script are identical to the overall

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Junio C Hamano
Jeremy Huddleston Sequoia writes: > Actually, looks like that as just a rabbit hole. The real issue > looks to be because an earlier test drops down xfoo3 as a symlink, > which causes this test to fail due to the collision. I'll get out > a patch in a bit.

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 07:09:12PM +0200, René Scharfe wrote: > > diff --git a/pretty.c b/pretty.c > > index 25efbca..73e58b5 100644 > > --- a/pretty.c > > +++ b/pretty.c > > @@ -965,22 +965,31 @@ static size_t parse_color(struct strbuf *sb, /* in > > UTF-8 */ > > > > if (!end) > >

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Heiko Voigt writes: > If you want to reference a previous commit in the history of a stable > -branch, use the format "abbreviated sha1 (subject, date)", > +branch, use the format 'abbreviated sha1 ("subject", date)', > with the subject enclosed in a pair of double-quotes,

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Oct 07, 2016 at 11:56:38AM +0200, Heiko Voigt wrote: > >> The description for referencing commits looks as if it is contradicting >> the example, since it is itself enclosed in double quotes. Lets use >> single quotes around the description and include

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

2016-10-10 Thread Jeremy Huddleston Sequoia
> On Oct 10, 2016, at 06:10, Jeff King wrote: > > On Sun, Oct 09, 2016 at 07:53:23PM -0700, Jeremy Huddleston Sequoia wrote: > >> Subject: Re: [PATCH] t4014-format-patch: Adjust git_version regex to better >> handle distro changes to DEF_VER >> >> Regressed-in:

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

2016-10-10 Thread Junio C Hamano
Jeremy Huddleston Sequoia writes: > Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae Please be considerate to future readers of "git log" to help them avoid mistakes earlier commits made that caused you troubles. This line by itself without any explanation of what was

[PATCH 1/2] submodule: ignore trailing slash on superproject URL

2016-10-10 Thread Stefan Beller
Before 63e95beb0 (2016-04-15, submodule: port resolve_relative_url from shell to C), it did not matter if the superprojects URL had a trailing slash or not. It was just chopped off as one of the first steps (The "remoteurl=${remoteurl%/}" near the beginning of resolve_relative_url(), which was

Re: [PATCH v2] gpg-interface: use more status letters

2016-10-10 Thread Junio C Hamano
Michael J Gruber writes: > Sorry, this got "lost in vacation". Before that, I was looking for an > easy way to test expired signatures, but gpg1 and gpg2 behave somewhat > differently in that respect (2 does not allow to create already expired > signatures). > > Is

[PATCH 2/2] submodule: ignore trailing slash in relative url

2016-10-10 Thread Stefan Beller
This is similar to the previous patch, though no user reported a bug and I could not find a regressive behavior. However it is a good thing to be strict on the output and for that we always omit a trailing slash. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:52:26AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Having separate exec/shell boolean options just punts the overlap from > > the command key to those keys. If you have two mutually exclusive > > options, I think the best thing is a single

[PATCH v3 12/25] sequencer: remember the onelines when parsing the todo file

2016-10-10 Thread Johannes Schindelin
The `git-rebase-todo` file contains a list of commands. Most of those commands have the form The is displayed primarily for the user's convenience, as rebase -i really interprets only the part. However, there are *some* places in interactive rebase where the is used to display

Re: git filter-branch --subdirectory-filter not working as expected, history of other folders is preserved

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 05:12:25PM +0100, Seaders Oloinsigh wrote: > Due to the structure of this repo, it looks like there are some > branches that never had anything to do with the android/ subdirectory, > so they're not getting wiped out. My branch is in a better state to > how I want it, but

Re: [PATCH] t3700-add.sh: Avoid filename collission between tests which could lead to test failure

2016-10-10 Thread Jeremy Huddleston Sequoia
> On Oct 10, 2016, at 09:44, Junio C Hamano wrote: > > Jeremy Huddleston Sequoia writes: > >> Regressed-in: 610d55af0f082f6b866dc858e144c03d8ed4424c >> Signed-off-by: Jeremy Huddleston Sequoia >> CC: Thomas Gummerer

[PATCH v3 08/25] sequencer: strip CR from the todo script

2016-10-10 Thread Johannes Schindelin
It is not unheard of that editors on Windows write CR/LF even if the file originally had only LF. This is particularly awkward for exec lines of a rebase -i todo sheet. Take for example the insn "exec echo": The shell script parser splits at the LF and leaves the CR attached to "echo", which leads

[PATCH v3 06/25] sequencer: future-proof read_populate_todo()

2016-10-10 Thread Johannes Schindelin
Over the next commits, we will work on improving the sequencer to the point where it can process the todo script of an interactive rebase. To that end, we will need to teach the sequencer to read interactive rebase's todo file. In preparation, we consolidate all places where that todo file is

[PATCH v3 07/25] sequencer: completely revamp the "todo" script parsing

2016-10-10 Thread Johannes Schindelin
When we came up with the "sequencer" idea, we really wanted to have kind of a plumbing equivalent of the interactive rebase. Hence the choice of words: the "todo" script, a "pick", etc. However, when it came time to implement the entire shebang, somehow this idea got lost and the sequencer was

[PATCH v3 03/25] sequencer: avoid unnecessary indirection

2016-10-10 Thread Johannes Schindelin
We really do not need the *pointer to a* pointer to the options in the read_populate_opts() function. Signed-off-by: Johannes Schindelin --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v3 01/25] sequencer: use static initializers for replay_opts

2016-10-10 Thread Johannes Schindelin
This change is not completely faithful: instead of initializing all fields to 0, we choose to initialize command and subcommand to -1 (instead of defaulting to REPLAY_REVERT and REPLAY_NONE, respectively). Practically, it makes no difference at all, but future-proofs the code to require explicit

[PATCH v3 00/25] Prepare the sequencer for the upcoming rebase -i patches

2016-10-10 Thread Johannes Schindelin
This patch series marks the '4' in the countdown to speed up rebase -i by implementing large parts in C. It is based on the `libify-sequencer` patch series that I submitted last week. The patches in this series merely prepare the sequencer code for the next patch series that actually teaches the

[PATCH v3 02/25] sequencer: use memoized sequencer directory path

2016-10-10 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- builtin/commit.c | 2 +- sequencer.c | 11 ++- sequencer.h | 5 + 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 1cba3b7..9fddb19 100644 ---

[PATCH v3 05/25] sequencer: eventually release memory allocated for the option values

2016-10-10 Thread Johannes Schindelin
The sequencer is our attempt to lib-ify cherry-pick. Yet it behaves like a one-shot command when it reads its configuration: memory is allocated and released only when the command exits. This is kind of okay for git-cherry-pick, which *is* a one-shot command. All the work to make the sequencer

[PATCH v3 04/25] sequencer: future-proof remove_sequencer_state()

2016-10-10 Thread Johannes Schindelin
In a couple of commits, we will teach the sequencer to handle the nitty gritty of the interactive rebase, which keeps its state in a different directory. Signed-off-by: Johannes Schindelin --- sequencer.c | 21 + 1 file changed, 13 insertions(+),

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Junio C Hamano
Stefan Beller writes: > submodule..path:: > + The path within this project for a submodule. This variable is > + kept in the .gitmodules file. See linkgit:git-submodule[1] and > + linkgit:gitmodules[5] for details. What does it exactly mean to be "kept"? Does it

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Jeff King
On Sun, Oct 09, 2016 at 03:34:17PM +0300, Mantas Mikulėnas wrote: > This is based on the existing gnome-keyring helper, but instead of > libgnome-keyring (which was specific to GNOME and is deprecated), it > uses libsecret which can support other implementations of XDG Secret > Service API.

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Junio C Hamano
Jeff King writes: > So here's what a patch to do that would look like. I admit that "I can't > think of a good use" does not mean there _isn't_ one, but perhaps by > posting this, it might provoke other people to think on it, too. And if > nobody can come up with, maybe it's a

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Junio C Hamano
Jeff King writes: > Having separate exec/shell boolean options just punts the overlap from > the command key to those keys. If you have two mutually exclusive > options, I think the best thing is a single option, like: > > type = > > and then it is obvious that a second

Re: git merge deletes my changes

2016-10-10 Thread Paul Smith
On Mon, 2016-10-10 at 10:19 +, Eduard Egorov wrote: > # ~/gitbuild/git-2.10.1/git merge -s subtree --squash ceph_ansible > > Can somebody confirm this please? Doesn't "merge -s subtree" really > merges branches? I think possibly you're not fully understanding what the --squash flag does...

Re: [PATCH v4 4/4] mergetool: honor -O

2016-10-10 Thread Junio C Hamano
David Aguilar writes: > Teach mergetool to pass "-O" down to `git diff` when > specified on the command-line. > > Helped-by: Johannes Sixt > Signed-off-by: David Aguilar > --- > Since v3: > > I missed one last piped invocation of "git

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Stefan Beller
+cc Xiaolong Ye On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: >> -Original Message- >> From: Ian Kelling >> Sent: Sunday, October 09, 2016 15:03 >> >> I've got patches in various projects, and I don't have time to keep up >> with the

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

2016-10-10 Thread Junio C Hamano
Jeff King writes: > On Sun, Oct 09, 2016 at 07:53:23PM -0700, Jeremy Huddleston Sequoia wrote: > >> Subject: Re: [PATCH] t4014-format-patch: Adjust git_version regex to better >> handle distro changes to DEF_VER >> >> Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae >>

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

2016-10-10 Thread Jeremy Huddleston Sequoia
> On Oct 10, 2016, at 09:42, Junio C Hamano wrote: > > Jeremy Huddleston Sequoia writes: > >> Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae > > Please be considerate to future readers of "git log" to help them > avoid mistakes earlier commits

Re: [PATCH] remote.c: free previous results when looking for a ref match

2016-10-10 Thread Stefan Beller
On Sat, Oct 8, 2016 at 6:38 AM, René Scharfe wrote: > > Again, this check is not necessary. If I read the code correctly the > pointer could be uninitialized at that point, though, causing free(3) to > crash. yep, this patch is bogus.

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Stefan Beller
On Mon, Oct 10, 2016 at 11:09 AM, Junio C Hamano wrote: > Stefan Beller writes: >> submodule..path:: >> + The path within this project for a submodule. This variable is >> + kept in the .gitmodules file. See linkgit:git-submodule[1] and >> +

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 17:15 schrieb Jeff King: On Mon, Oct 10, 2016 at 10:28:18AM -0400, Jeff King wrote: We could add some new tag to change the behavior of all following %C tags. Something like %C(tty) maybe (probably a bad name), then discourage the use if "%C(auto" for terminal detection?

[PATCH v3 19/25] sequencer: left-trim lines read from the script

2016-10-10 Thread Johannes Schindelin
Interactive rebase's scripts may be indented; we need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-by: Johannes Schindelin --- sequencer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sequencer.c

[PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-10 Thread Johannes Schindelin
In interactive rebases, we commit a little bit differently than the sequencer did so far: we heed the "author-script", the "message" and the "amend" files in the .git/rebase-merge/ subdirectory. Likewise, we may want to edit the commit message *even* when providing a file containing the suggested

[PATCH v3 20/25] sequencer: refactor write_message()

2016-10-10 Thread Johannes Schindelin
The write_message() function safely writes an strbuf to a file. Sometimes it is inconvenient to require an strbuf, though: the text to be written may not be stored in a strbuf, or the strbuf should not be released after writing. Let's refactor "safely writing string to a file" into

[PATCH v3 16/25] sequencer: support amending commits

2016-10-10 Thread Johannes Schindelin
This teaches the run_git_commit() function to take an argument that will allow us to implement "todo" commands that need to amend the commit messages ("fixup", "squash" and "reword"). Signed-off-by: Johannes Schindelin --- sequencer.c | 6 -- 1 file changed, 4

[PATCH v3 17/25] sequencer: support cleaning up commit messages

2016-10-10 Thread Johannes Schindelin
The run_git_commit() function already knows how to amend commits, and with this new option, it can also clean up commit messages (i.e. strip out commented lines). This is needed to implement rebase -i's 'fixup' and 'squash' commands as sequencer commands. Signed-off-by: Johannes Schindelin

[PATCH v3 15/25] sequencer: allow editing the commit message on a case-by-case basis

2016-10-10 Thread Johannes Schindelin
In the upcoming commits, we will implement more and more of rebase -i's functionality inside the sequencer. One particular feature of the commands to come is that some of them allow editing the commit message while others don't, i.e. we cannot define in the replay_opts whether the commit message

[PATCH v3 14/25] sequencer: introduce a helper to read files written by scripts

2016-10-10 Thread Johannes Schindelin
As we are slowly teaching the sequencer to perform the hard work for the interactive rebase, we need to read files that were written by shell scripts. These files typically contain a single line and are invariably ended by a line feed (and possibly a carriage return before that). Let's use a

[PATCH v3 18/25] sequencer: do not try to commit when there were merge conflicts

2016-10-10 Thread Johannes Schindelin
The return value of do_recursive_merge() may be positive (indicating merge conflicts), or 0 (indicating success). It also may be negative, indicating a fatal error that requires us to abort. Now, if the return value indicates that there are merge conflicts, we should not try to commit those

[PATCH v3 10/25] sequencer: get rid of the subcommand field

2016-10-10 Thread Johannes Schindelin
The subcommands are used exactly once, at the very beginning of sequencer_pick_revisions(), to determine what to do. This is an unnecessary level of indirection: we can simply call the correct function to begin with. So let's do that. While at it, ensure that the subcommands return an error code

[PATCH v3 09/25] sequencer: avoid completely different messages for different actions

2016-10-10 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- sequencer.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index cee7e50..443a238 100644 --- a/sequencer.c +++ b/sequencer.c @@ -224,11 +224,8 @@ static int

[PATCH v3 11/25] sequencer: refactor the code to obtain a short commit name

2016-10-10 Thread Johannes Schindelin
Not only does this DRY up the code (providing a better documentation what the code is about, as well as allowing to change the behavior in a single place), it also makes it substantially shorter to use the same functionality in functions to be introduced when we teach the sequencer to process

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Junio C Hamano
Junio C Hamano writes: > ... > I also notice that the problematic test uses "chmod 755"; don't we > need POSIXPERM prerequisite on this test, too, I wonder? > > Thanks. > > -- >8 -- > t3700: fix broken test under !SANITY > > An "add --chmod=+x" test recently added by

Re: Feature request: use relative path in worktree config files

2016-10-10 Thread Junio C Hamano
Duy Nguyen writes: >> I think there are some pros and some cons for relative path and absolute >> path. >> Maybe append a "--relative" option with `git worktree add` ? >> >> I've converted all path to relative and all work with success. >> >> What do you think to append this

RE: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Jason Pyeron
> -Original Message- > From: Stefan Beller > Sent: Monday, October 10, 2016 14:43 > > +cc Xiaolong Ye > > On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: > >> -Original Message- > >> From: Ian Kelling > >> Sent: Sunday, October 09,

RE: How to watch a mailing list & repo for patches which affect a certain area of code? [OT]

2016-10-10 Thread Jason Pyeron
> -Original Message- > From: Stefan Beller > Sent: Monday, October 10, 2016 15:08 > > On Mon, Oct 10, 2016 at 11:56 AM, Jason Pyeron wrote: > >> -Original Message- > >> From: Stefan Beller > >> Sent: Monday, October 10, 2016 14:43 > >> > >> +cc Xiaolong Ye

Formatting problem send_mail in version 2.10.0

2016-10-10 Thread Larry Finger
I have recently switched to openSUSE Leap 42.2 and found that some of the features of send_mail no longer work. The problem occurs when trying to add information to a Cc to Stable. The initial pass through the patch produces the output (body) Adding cc: Stable [4.8+]

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 11:52:14AM -0700, Junio C Hamano wrote: > > + By default, colors are shown only when enabled for log output (by > > + `color.diff`, `color.ui`, or `--color`, and respecting the `auto` > > + settings of the former if we are going to a terminal). `%C(auto,...)` > > + is

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 02:00 schrieb Jeff King: > On Sat, Oct 08, 2016 at 05:38:47PM +0200, René Scharfe wrote: > >> Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs >> instead of taking detours through find_unique_abbrev() and its static >> buffer. This is shorter in most cases

Re: [PATCH] documentation: clarify submodule..[url, path] variables

2016-10-10 Thread Junio C Hamano
Stefan Beller writes: >> Does it mean "never appears in .git/config, and when it appears it >> will not be used at all"? If so we shouldn't even list it here. > > I meant: > Git wont put it into .git/config on its own. If you really wanted to have > it there, you need to do

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-10 Thread Junio C Hamano
Jeff King writes: > On Mon, Oct 10, 2016 at 11:24:01AM -0700, Junio C Hamano wrote: > >> I no longer have preference either way myself, even though I was in >> favor of no-quotes simply because I had an alias to produce that >> format and was used to it. > > I'll admit that I

[PATCHv2] documentation: improve submodule..{url, path} description

2016-10-10 Thread Stefan Beller
Unlike the url variable a user cannot override the the path variable, as it is part of the content together with the gitlink at the given path. To avoid confusion do not mention the .path variable in the config section and rely on the documentation provided in gitmodules[5]. Enhance the

Re: [PATCH 1/2] submodule: ignore trailing slash on superproject URL

2016-10-10 Thread Dennis Kaarsemaker
[And now with CC to the list, sorry Stefan] On Mon, 2016-10-10 at 10:56 -0700, Stefan Beller wrote: > Before 63e95beb0 (2016-04-15, submodule: port resolve_relative_url from > shell to C), it did not matter if the superprojects URL had a trailing > slash or not. It was just chopped off as one of

Re: [PATCH v1 2/2] convert.c: stream and early out

2016-10-10 Thread Junio C Hamano
tbo...@web.de writes: > -static void gather_stats(const char *buf, unsigned long size, struct > text_stat *stats) > +static void gather_stats_partly(const char *buf, unsigned long len, > + struct text_stat *stats, unsigned earlyout) > { I think it is OK not to

Re: %C(auto) not working as expected

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 01:46 schrieb Jeff King: >> diff --git a/Documentation/pretty-formats.txt >> b/Documentation/pretty-formats.txt >> index a942d57..89e3bc6 100644 >> --- a/Documentation/pretty-formats.txt >> +++ b/Documentation/pretty-formats.txt >> @@ -166,7 +166,8 @@ endif::git-rev-list[] >> -

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread René Scharfe
Am 10.10.2016 um 19:42 schrieb Jeff King: On Mon, Oct 10, 2016 at 07:09:12PM +0200, René Scharfe wrote: diff --git a/pretty.c b/pretty.c index 25efbca..73e58b5 100644 --- a/pretty.c +++ b/pretty.c @@ -965,22 +965,31 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:20:50PM +0200, Dennis Kaarsemaker wrote: > On Sun, 2016-10-09 at 15:34 +0300, Mantas Mikulėnas wrote: > > This is based on the existing gnome-keyring helper, but instead of > > libgnome-keyring (which was specific to GNOME and is deprecated), it > > uses libsecret which

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 02:59:35PM -0400, Jeff King wrote: > > I must be reading the patch incorrectly, but I cannot quite tell > > where I want astray... > > No, we don't come here from %C() at all. This is for bare "%Cred", which > cannot have "always" (or "auto"), as there is no syntactic

Re: [PATCH] pretty: respect color settings for %C placeholders

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 09:59:17PM +0200, René Scharfe wrote: > > > Shouldn't we have an "else" here? > > > > I'm not sure what you mean; can you write it out? > > > - if (skip_prefix(begin, "auto,", )) { > > + > > + if (!skip_prefix(begin, "always,", )) { > >

Re: [PATCH v1 0/2] convert: stream and early out

2016-10-10 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > An optimization when autocrlf is used and the binary/text detection is run. > Or git ls-files --eol is run to analyze the content of files or blobs. This looks like a worthwhile thing to do. Please sign-off the patches when

Re: [PATCH] use strbuf_add_unique_abbrev() for adding short hashes, part 3

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:46:21PM +0200, René Scharfe wrote: > Good question. ALLOC_GROW() doesn't double exactly, but indeed the > number of reallocations depends on the size of the added pieces. I > always thought of strbuf_addf() as an expensive function for > convenience, but never timed

Re: [PATCH/RFC] git.c: support "!!" aliases that do not move cwd

2016-10-10 Thread Junio C Hamano
Jeff King writes: > ... My main motive in switching to the > "alias.$cmd.key" syntax is that it fixes the ancient mistake of putting > arbitrary content into the key (just like pager.*, as we've discussed > elsewhere). Yup, we are on the same page. It's not too grave a mistake

Re: git 2.10.1 test regression in t3700-add.sh

2016-10-10 Thread Johannes Sixt
Am 10.10.2016 um 19:41 schrieb Junio C Hamano: I also notice that the problematic test uses "chmod 755"; don't we need POSIXPERM prerequisite on this test, too, I wonder? Good point. Without POSIXPERM the test demonstrate that, since chmod 755 is basically a noop, the following add --chmod=-x

Re: [PATCH v10 13/14] convert: add filter..process option

2016-10-10 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > +# Count unique lines in two files and compare them. > +test_cmp_count () { > + for FILE in $@ > + do > + sort $FILE | uniq -c | sed "s/^[ ]*//" >$FILE.tmp > + cat $FILE.tmp >$FILE Unquoted references to $FILE bothers me. Are

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Ian Kelling
On Mon, Oct 10, 2016, at 12:08 PM, Stefan Beller wrote: > Well it is found in 2.9 and later. Currently the base footer is > opt-in, e.g. you'd > need to convince people to run `git config format.useAutoBase true` or to > manually add the base to the patch via `format-patch --base=`. Nice. Another

Re: Invisible file remove during merge

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 06:04:26PM -0700, Octavio Alvarez wrote: > If I do a "git rm file" during conflict resolution, the removed file > (mysterious-file.txt) does not show up on "git log --stat" nor "git show > --patch" for the merge commit. "git log" does not do merge diffs by default; you

Re: How to watch a mailing list & repo for patches which affect a certain area of code?

2016-10-10 Thread Stefan Beller
On Mon, Oct 10, 2016 at 11:56 AM, Jason Pyeron wrote: >> -Original Message- >> From: Stefan Beller >> Sent: Monday, October 10, 2016 14:43 >> >> +cc Xiaolong Ye >> >> On Sun, Oct 9, 2016 at 2:26 PM, Jason Pyeron wrote: >> >>

Re: [PATCH] contrib: add credential helper for libsecret

2016-10-10 Thread Dennis Kaarsemaker
On Sun, 2016-10-09 at 15:34 +0300, Mantas Mikulėnas wrote: > This is based on the existing gnome-keyring helper, but instead of > libgnome-keyring (which was specific to GNOME and is deprecated), it > uses libsecret which can support other implementations of XDG Secret > Service API. > > Passes

Re: %C(auto) not working as expected

2016-10-10 Thread Jeff King
On Mon, Oct 10, 2016 at 10:52:47PM +0200, René Scharfe wrote: > > I like the intent here, though I found "Values, color" hard to parse (it > > was not immediately clear that you mean "the color paragraph of the > > Values section", as commas are already being used in that sentence for > > the

  1   2   >