Re: [RFC/PATCH] Triangular Workflow UI improvement: Documentation

2016-06-07 Thread Matthieu Moy
"Philip Oakley" writes: > From: "Matthieu Moy" > >> But then the maintainer is not the one picking changes from it (you're >> sending them by email), so the "maintainer" label is not really accurate >> in the diagram: >> >> + --- >> +| UPSTREAM | maintainer |

Re: [PATCH] cherry-pick: allow to pick to unborn branches

2016-06-07 Thread Junio C Hamano
Michael J Gruber writes: > Here and below, I'm mimicking/copying the behavior that we have right > now already. I asked myself the same question - rolling back to orphan > state shouldn't be that hard after all. But that would be a change in > behavior that - if considered a fix/improvement - wou

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-07 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >>> +test_config_unchanged () { >>> + git config --list --local >original >>> + "$@" >>> + git config --list --local >modified >>> + test_cmp original modified >>> +} >> >> The test passes if "$@" fails. You should &&-chain the lines here t

Re: What's cooking in git.git (Jun 2016, #02; Mon, 6)

2016-06-07 Thread Mike Hommey
On Mon, Jun 06, 2016 at 10:58:44PM -0700, Junio C Hamano wrote: > * mh/connect (2016-06-06) 10 commits > - connect: [host:port] is legacy for ssh > - connect: move ssh command line preparation to a separate function > - connect: actively reject git:// urls with a user part > - connect: change t

Re: What's cooking in git.git (Jun 2016, #02; Mon, 6)

2016-06-07 Thread Torsten Bögershausen
* mh/connect (2016-06-06) 10 commits - connect: [host:port] is legacy for ssh - connect: move ssh command line preparation to a separate function - connect: actively reject git:// urls with a user part - connect: change the --diag-url output to separate user and host - connect: make parse_conne

Re: [PATCH v4 3/3] completion: add git status

2016-06-07 Thread Thomas Braun
Am 06.06.2016 um 19:57 schrieb Junio C Hamano: > Thomas Braun writes: > >> +case "$cur" in >> +--ignore-submodules=*) >> +__gitcomp "none untracked dirty all" "" >> "${cur##--ignore-submodules=}" >> +return >> +;; >> +--untracked-files=*) >> +

Re: [RFC/PATCHv2] Documentation: triangular workflow

2016-06-07 Thread Jordan DE GEA
> Le 7 juin 2016 à 08:58, Matthieu Moy a écrit : > > "Philip Oakley" writes: > >> Given that clarification I'd be happier to go with it being one's >> 'Publish' repo. >> >> My initial reticence was because of the association of "publish" with >> vanity publishing and other forms of over-sharin

Re: Minor Bug in Renaming Branches

2016-06-07 Thread Eric Deplagne
On Tue, 07 Jun 2016 06:13:14 +0200, Torsten Bögershausen wrote: > On 06/06/2016 09:35 PM, Stefan Beller wrote: >> On Mon, Jun 6, 2016 at 12:17 PM, Torsten Bögershausen wrote: >> >>> A limitation is introduced by Mac OS and Windows: >>> BRANCH/NAME and branch/name refer to the same object in the fi

t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Pirate Praveen
Hi, I'm trying to rebuild git 2.8.1 on debian jessie/stable and I get this error (tests upto this succeeds). not ok 32 - should avoid cleaning possible submodules I added debian stretch repo to apt sources.list and ran apt-get source -b git. You can see the build options passed here http://repo

[PATCHv3] Documentation: triangular workflow

2016-06-07 Thread Jordan DE GEA
Currently, triangular workflow can be configured, but there is no documentation about it. A documentation is useful to keep configuration possibilities up-to-date. A new subsection is created in gitworkflow. Signed-off-by: Michael Haggerty Signed-off-by: Matthieu Moy Signed-off-by: Jordan DE GE

Re: [PATCH V2 1/3] strbuf: add tests

2016-06-07 Thread Johannes Schindelin
Hi William, On Mon, 6 Jun 2016, William Duclot wrote: > + enum { > + MODE_UNSPECIFIED = 0, > + MODE_BASIC_GROW , > + MODE_STRBUF_CHECK, > + MODE_GROW_OVERFLOW > + } cmdmode = MODE_UNSPECIFIED; > + struct option options[] = { > +

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Christian Couder
On Wed, Jun 1, 2016 at 4:00 PM, Duy Nguyen wrote: > On Tue, May 31, 2016 at 8:18 PM, Christian Couder > wrote: [3] http://thread.gmane.org/gmane.comp.version-control.git/202902/focus=203020 >>> >>> This points to https://github.com/peff/git/commits/jk/external-odb >>> which is dead. J

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Mike Hommey
On Tue, Jun 07, 2016 at 10:46:07AM +0200, Christian Couder wrote: > The high level overview of the patch series I would like to send > really soon now could go like this: > > --- > Git can store its objects only in the form of loose objects in > separate files or packed objects in a pack file. > T

Re: [PATCH] completion: complete --move for git branch

2016-06-07 Thread Remi Galan Alfonso
Ville Skyttä writes: > On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso > wrote: > > > > Hi, > > > > Ville Skyttä writes: > > > while [ $c -lt $cword ]; do > > > i="${words[c]}" > > > case "$i" in > > > --d|-m)only_local_ref="y

Re: [PATCH V2 2/3] pretty.c: rename strbuf_wrap() function

2016-06-07 Thread Johannes Schindelin
Hi William, On Mon, 6 Jun 2016, William Duclot wrote: > diff --git a/pretty.c b/pretty.c > index 87c4497..2b9e89a 100644 > --- a/pretty.c > +++ b/pretty.c > @@ -904,8 +904,8 @@ static void parse_commit_message(struct > format_commit_context *c) > c->commit_message_parsed = 1; > } > > -s

Re: [PATCH V2 3/3] strbuf: allow to use preallocated memory

2016-06-07 Thread William Duclot
On Mon, Jun 06, 2016 at 04:24:53PM -0700, Junio C Hamano wrote: > Jeff King writes: > >>> I think that call should reset line.buf to the original buffer on >>> the stack, instead of saying "Ok, I'll ignore the original memory >>> not owned by us and instead keep pointing at the allocated memory",

[ANNOUNCE] Git for Windows 2.8.4

2016-06-07 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.8.4 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.8.3 (May 20th 2016) New Features ??? Comes with Git 2.8.4. Bug Fixes ??? Child processes no longer inherit handles to te

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 3:46 PM, Christian Couder wrote: >> Any thought on object streaming support? > > No I didn't think about this. In fact I am not sure what this means. > >> It could be a big deal (might >> affect some design decisions). > > Could you elaborate on this? Object streaming api i

Re: t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Johannes Schindelin
Hi Pirate Praveen, On Tue, 7 Jun 2016, Pirate Praveen wrote: > I'm trying to rebuild git 2.8.1 on debian jessie/stable and I get this > error (tests upto this succeeds). > > not ok 32 - should avoid cleaning possible submodules How about re-running the script with -i -v -x? If the output is sti

Re: What's cooking in git.git (Jun 2016, #02; Mon, 6)

2016-06-07 Thread Vasco Almeida
Junio C Hamano pobox.com> writes: > * va/i18n-even-more (2016-05-26) 22 commits > - t5523: use test_i18ngrep for negation [snip because of gmane] > - i18n: advice: mark string about detached head for translation > - i18n: builtin/remote.c: fix mark for translation > > More markings of mess

[PATCH 4/5] lock_ref_for_update(): make error handling more uniform

2016-06-07 Thread Michael Haggerty
To aid the effort, extract a new function, check_old_oid(), and use it in the two places where the read value of the reference has to be checked against update->old_sha1. Update tests to reflect the improvements. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 77

[PATCH 1/5] t1404: rename file to t1404-update-ref-errors.sh

2016-06-07 Thread Michael Haggerty
I want to broaden the scope of this test file, so rename it accordingly. Signed-off-by: Michael Haggerty --- t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-errors.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-er

[PATCH 5/5] lock_ref_for_update(): avoid a symref resolution

2016-06-07 Thread Michael Haggerty
If we're overwriting a symref with a SHA-1, we need to resolve the value of the symref (1) to check against update->old_sha1 and (2) to write to its reflog. However, we've already read the symref itself and know its referent. So there is no need to read the symref's value through the symref; we can

[PATCH 3/5] t1404: add more tests of update-ref error handling

2016-06-07 Thread Michael Haggerty
Some of the error messages will be improved in subsequent commits. Signed-off-by: Michael Haggerty --- t/t1404-update-ref-errors.sh | 221 ++- 1 file changed, 219 insertions(+), 2 deletions(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref

[PATCH 2/5] t1404: document function test_update_rejected

2016-06-07 Thread Michael Haggerty
And declare its variables to be local. Signed-off-by: Michael Haggerty --- t/t1404-update-ref-errors.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh index 2818460..a62d62a 100755 --- a/t/t1404-update-ref-errors.sh +++ b/t/t14

[PATCH 0/5] Improve test coverage of update-ref error messages

2016-06-07 Thread Michael Haggerty
The logic for deciding what error to emit under various update-ref failure scenarios is nontrivial. Add a bunch of tests of these error messages. Then improve a few error messages that were not ideal. One or two other error messages could still be improved, but that would take more work so I will s

[PATCH v4 03/38] i18n: advice: internationalize message for conflicts

2016-06-07 Thread Vasco Almeida
Mark message for translation telling the user she has conflicts to resolve. Expose each particular use case, in order to enable translating entire sentences which would facilitate translating into other languages. Change "Pull" to lowercase to match other instances. Update test t5520-pull.sh, that

[PATCH v4 29/38] i18n: merge: change command option help to lowercase

2016-06-07 Thread Vasco Almeida
Change command option description to lowercase, matching pull counterpart option. Translators would have to translate such message only once. Signed-off-by: Vasco Almeida --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge.c b/builtin/merge.c ind

[PATCH v4 30/38] i18n: sequencer: add period to error message

2016-06-07 Thread Vasco Almeida
Add a period to error message so it matches others instances in sequencer.c. Now translator would have to translate such message only once. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 57b3671..e9

[PATCH v4 11/38] i18n: bisect: simplify error message for i18n

2016-06-07 Thread Vasco Almeida
The message was not being extracted by xgettext, although it was marked for translation, seemingly because it contained a command substitution. Moreover, eval_gettext should be used instead of gettext for strings with substitution. See step 4. of section 15.5.2.1 Preparing Shell Scripts for Intern

[PATCH v4 33/38] i18n: remote: allow translations to reorder message

2016-06-07 Thread Vasco Almeida
Before this patch, translations couldn't place the branch name where it was better fit in the message "and with remote ". Allow translations that, instead of forcing the branch name to display right of the message. Signed-off-by: Vasco Almeida --- builtin/remote.c | 7 +++ 1 file changed, 3

[PATCH v4 19/38] tests: unpack-trees: update to use test_i18n* functions

2016-06-07 Thread Vasco Almeida
Use functions test_i18ncmp and test_i18ngrep to successfully pass tests running under GETTEXT_POISON. The output strings compared to in these test were marked for translation in ed47fdf ("i18n: unpack-trees: mark strings for translation", 2016-04-09) and later improved in 2e3926b ("i18n: unpack-tr

[PATCH v4 28/38] i18n: merge: mark messages for translation

2016-06-07 Thread Vasco Almeida
Mark messages shown to the user for translation. Signed-off-by: Vasco Almeida --- builtin/merge.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index b555a1b..961def5 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1014,7

[PATCH v4 31/38] i18n: standardise messages

2016-06-07 Thread Vasco Almeida
Standardise messages in order to save translators some work. Nuances fixed in this commit: "failed to read %s" "read of %s failed" "detach the HEAD at named commit" "detach HEAD at named commit" "removing '%s' failed" "failed to remove '%s'" "index file corrupt" "corrupt index file" "failed to

[PATCH v4 16/38] i18n: rebase-interactive: mark comments of squash for translation

2016-06-07 Thread Vasco Almeida
Mark comment messages of squash/fixup file ($squash_msg) for translation. Helper functions this_nth_commit_message and skip_nth_commit_message replace the previous method of making the comment messages (such as "This is the 2nd commit message:") aided by nth_string helper function. This step was t

[PATCH v4 10/38] i18n: rebase: mark placeholder for translation

2016-06-07 Thread Vasco Almeida
Mark placeholder "" in git-rebase.sh for translation. The string containing the named placeholder is passed to shell function error_on_missing_default_upstream in git-parse-remote.sh which uses it to display a command hint for the user. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 fi

[PATCH v4 12/38] t6030: update to use test_i18ncmp

2016-06-07 Thread Vasco Almeida
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6030-bisect-porcelain.sh b/t/t

[PATCH v4 26/38] i18n: notes: mark options for translation

2016-06-07 Thread Vasco Almeida
Mark options description of git prune for translation. Signed-off-by: Vasco Almeida --- builtin/notes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index d11e6eb..0572051 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -934,8 +9

[PATCH v4 22/38] t5523: use test_i18ngrep for negation

2016-06-07 Thread Vasco Almeida
Replace the first form with the second one: ! grep expected actual test_i18ngrep ! expected actual The latter syntax is supported by test_i18ngrep defined in t/test-lib.sh. Although the test already passes whether GETTEXT_POSION is enabled, use the i18n grep variant for the sake

[PATCH v4 24/38] i18n: transport-helper.c: change N_() call to _()

2016-06-07 Thread Vasco Almeida
The N_() no-op call currently marks the string to be extracted by xgettext but doesn't trigger the retrieval of the translation at run time, whereas _() does both. Meaning that, in spite of having translations available, they were never retrieved to make use of them. Signed-off-by: Vasco Almeida

[PATCH v4 02/38] i18n: advice: mark string about detached head for translation

2016-06-07 Thread Vasco Almeida
Mark string with advice seen by the user when in detached head. Update test t7201-co.sh to pass under GETTEXT_POISON build. Pretend success if the number of lines of "git checkout renamer^" output is not greater than 1 and test are running under GETTEXT_POISON. Signed-off-by: Vasco Almeida ---

[PATCH v4 08/38] merge-octupus: use die shell function from git-sh-setup.sh

2016-06-07 Thread Vasco Almeida
Source git-sh-setup in order to use die shell function from git-sh-setup.sh library instead of using the one defined in git-merge-octopus.sh. Remove the former die function. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --g

[PATCH v4 00/38] i18n and test updates

2016-06-07 Thread Vasco Almeida
Marks several messages for translation and updates tests to pass under GETTEXT_POISON. Some tests were updated to fit previous i18n marks, others were updated to fit marks made by these patches. Patches that only touch test file refer to marks done in commits previous to these ones. Depends on com

[PATCH v4 05/38] i18n: sequencer: mark entire sentences for translation

2016-06-07 Thread Vasco Almeida
Mark entire sentences of error message rather than assembling one using placeholders (e.g. "Cannot %s during a %s"). That would facilitate translation work because it is easier to translate a entire sentence than translating pieces. We would have better translations at the expense of source code v

[PATCH v4 13/38] i18n: git-sh-setup.sh: mark strings for translation

2016-06-07 Thread Vasco Almeida
Positional arguments, such as $0, $1, etc, need to be stored on shell variables for use in translatable strings, according to gettext manual [1]. Add git-sh-setup.sh to LOCALIZED_SH variable in Makefile to enable extraction of string marked for translation by xgettext. Source git-sh-i18n in git-s

[PATCH v4 23/38] i18n: bisect: mark strings for translation

2016-06-07 Thread Vasco Almeida
In the last message, involving Q_(), try to mark the message in such way that is suited for RTL (Right to Left) languages. Update test t6030-bisect-porcelain.sh to reflect the changes. Signed-off-by: Vasco Almeida --- bisect.c| 56 +---

[PATCH v4 15/38] i18n: rebase-interactive: mark here-doc strings for translation

2016-06-07 Thread Vasco Almeida
Use pipe to send gettext output to git stripspace instead of the original method of using shell here-document, because command substitution '$(...)' would not take place inside the here-documents. The exception is the case of the last here-document redirecting to cat, in which commands substitution

[PATCH v4 18/38] tests: use test_i18n* functions to suppress false positives

2016-06-07 Thread Vasco Almeida
The test functions test_i18ncmp and test_i18ngrep pretend success if run under GETTEXT_POISON. By using those functions to test output which is correctly marked as translatable, enables one to detect if the strings newly marked for translation are from plumbing output. If they are indeed from plumb

[PATCH v4 20/38] t9003: become resilient to GETTEXT_POISON

2016-06-07 Thread Vasco Almeida
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida --- t/t9003-help-autocorrect.sh | 4 ++-- 1 file chan

[PATCH v4 32/38] i18n: remote: mark URL fallback text for translation

2016-06-07 Thread Vasco Almeida
Marks fallback text for translation that may be displayed in git remote show output. Signed-off-by: Vasco Almeida --- builtin/remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index ae74da6..9f934cb 100644 --- a/builtin/remote.

[PATCH v4 09/38] i18n: rebase: fix marked string to use eval_gettext variant

2016-06-07 Thread Vasco Almeida
The string message marked for translation should use eval_gettext variant instead of the gettext one, since we want to dollar-substitute $head_name in the result. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b/gi

[PATCH v4 14/38] i18n: rebase-interactive: mark strings for translation

2016-06-07 Thread Vasco Almeida
Mark strings in git-rebase--interactive.sh for translation. There is no need to source git-sh-i18n since git-rebase.sh already does so. Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to enable extracting strings marked for translation by xgettext. Signed-off-by: Vasco Almeida

[PATCH v4 21/38] t4153: fix negated test_i18ngrep call

2016-06-07 Thread Vasco Almeida
The function test_i18ngrep fakes success when run under GETTEXT_POISON. Hence, running in the following manner will always fail under gettext poison: ! test_i18ngrep expected actual Use correct syntax: test_i18ngrep ! expected actual For other instance of this issue see 41ca19b ("tests:

[PATCH v4 01/38] i18n: builtin/remote.c: fix mark for translation

2016-06-07 Thread Vasco Almeida
The second string inside _() was not being extracted for translation by xgettext, meaning that, although the string was passed to gettext, there was no translation available. Mark each individual string instead of marking the result of ternary if. Signed-off-by: Vasco Almeida --- builtin/remote

[PATCH v4 25/38] i18n: notes: mark strings for translation

2016-06-07 Thread Vasco Almeida
Mark strings of messages for the user as translatable. Update tests t3310-notes-merge-manual-resolve.sh and t3320-notes-merge-worktrees.sh to reflect new translatable messages. Tests that grep for .git/NOTES_MERGE_WORKTREE reflect the translatable string "Automatic notes merge failed. Fix conflic

[PATCH v4 17/38] i18n: setup: mark strings for translation

2016-06-07 Thread Vasco Almeida
Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-pathspec.sh | 4 ++-- 3 files change

[PATCH v4 07/38] i18n: merge-octopus: mark messages for translation

2016-06-07 Thread Vasco Almeida
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index dc2fd1b..89e967a 100755 --- a/git-merge-octopus.s

[PATCH v4 06/38] i18n: sequencer: mark string for translation

2016-06-07 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 88a7c78..57b3671 100644 --- a/sequencer.c +++ b/sequencer.c @@ -225,7 +225,7 @@ static int fa

[PATCH v4 04/38] i18n: transport: mark strings for translation

2016-06-07 Thread Vasco Almeida
Mark one printf string and one error string for translation. Signed-off-by: Vasco Almeida --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/transport.c +++ b/transport.c @@ -59,

[PATCH v4 27/38] i18n: config: unfold error messages marked for translation

2016-06-07 Thread Vasco Almeida
Introduced in 473166b ("config: add 'origin_type' to config_source struct", 2016-02-19), Git can inform the user about the origin of a config error, but the implementation does not allow translators to translate the keywords 'file', 'blob, 'standard input', and 'submodule-blob'. Moreover, for the s

Re: [PATCH v2 00/13] Reference iterators

2016-06-07 Thread Michael Haggerty
On 06/04/2016 01:40 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> On 06/03/2016 11:33 PM, Junio C Hamano wrote: >>> [...] >>> Ah, that reminds me. What's the doneness of the dependent topic? >> [...] > > What I meant was the doneness of mh/split-under-lock actually. I don't know of

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-06-07 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 3:42 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +--shift-ita:: >> + By default entries added by "git add -N" appear as an existing >> + empty file in "git diff" and a new file in "git diff --cached". >> + This option makes the entry appear as

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-07 Thread Erwan Mathoniere
On 06/06/2016 17:54, Matthieu Moy wrote: Erwan Mathoniere writes: @@ -497,6 +504,10 @@ static void NORETURN die_no_merge_candidates(const char *repo, const char **refs fprintf(stderr, "\n"); fprintf_ln(stderr, _("If you wish to set tracking information for t

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-07 Thread Erwan Mathoniere
On 07/06/2016 09:06, Matthieu Moy wrote: Junio C Hamano writes: Matthieu Moy writes: +test_config_unchanged () { + git config --list --local >original + "$@" + git config --list --local >modified + test_cmp original modified +} The test passes if "$@" fails. You

[PATCH v4 35/38] i18n: submodule: join strings marked for translation

2016-06-07 Thread Vasco Almeida
Join strings marked for translation since that would facilitate and improve translations result. Signed-off-by: Vasco Almeida --- git-submodule.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 5b9674a..f72b237 10

[PATCH v4 38/38] i18n: branch: mark comment when editing branch description for translation

2016-06-07 Thread Vasco Almeida
When one issues git branch --edit-description branch_name, a edit with that message commented out is opened. Mark that message for translation in to order to be localized. Signed-off-by: Vasco Almeida --- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/

[PATCH v4 37/38] i18n: unmark die messages for translation

2016-06-07 Thread Vasco Almeida
These messages are relevant for the programmer only, not for the end user. Thus, they can be unmarked for translation, saving translator some work. Signed-off-by: Vasco Almeida --- git-bisect.sh | 2 +- wt-status.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-b

[PATCH v4 36/38] i18n: submodule: escape shell variables inside eval_gettext

2016-06-07 Thread Vasco Almeida
According to the gettext manual [1], references to shell variables inside eval_gettext call must be escaped so that eval_gettext receives the translatable string before the variable values are substituted into it. [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.ht

[PATCH v4 34/38] i18n: init-db: join message pieces

2016-06-07 Thread Vasco Almeida
Join message displayed during repository initialization in one entire sentence. That would improve translations since it's easier translate an entire sentence than translating each piece. Signed-off-by: Vasco Almeida --- builtin/init-db.c | 17 ++--- 1 file changed, 10 insertions(+),

Re: t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Pirate Praveen
On Tuesday 07 June 2016 04:00 PM, Johannes Schindelin wrote: > Hi Pirate Praveen, > > On Tue, 7 Jun 2016, Pirate Praveen wrote: > >> I'm trying to rebuild git 2.8.1 on debian jessie/stable and I get this >> error (tests upto this succeeds). >> >> not ok 32 - should avoid cleaning possible submodu

Re: Minor Bug in Renaming Branches

2016-06-07 Thread Stefan Beller
On Tue, Jun 7, 2016 at 12:40 AM, Eric Deplagne wrote: > On Tue, 07 Jun 2016 06:13:14 +0200, Torsten Bögershausen wrote: >> On 06/06/2016 09:35 PM, Stefan Beller wrote: >>> On Mon, Jun 6, 2016 at 12:17 PM, Torsten Bögershausen wrote: >>> A limitation is introduced by Mac OS and Windows:

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-07 Thread Erwan Mathoniere
On 06/06/2016 21:06, Junio C Hamano wrote: But I am unhappy with a more serious problem with the tests in this patch. They assume that "-u" option will forever be the only thing that is allowed to modify the configuration during "git pull -u". It should never make such an assumption. The onl

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Christian Couder
On Wed, Jun 1, 2016 at 12:31 AM, Jeff King wrote: > On Fri, May 20, 2016 at 02:39:06PM +0200, Christian Couder wrote: > >> I wonder if this mechanism could also be used or extended to clone and >> fetch an alternate object database. >> >> In [1], [2] and [3], and this was also discussed during the

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-07 Thread Erwan Mathoniere
On 06/06/2016 18:29, Philip Oakley wrote: + that each one tracks the remote branch pulled from. If a configuration + already exists, it is overwriten. For example, with `git pull -u origin + branch` the current branch will track `branch` from `origin`. ++ +If two or more branches are pulled on

[PATCH v3 0/6] send-email: cleaner tests and quote email

2016-06-07 Thread Tom Russello
The purpose of this series of patches is to implement a new "quote-email" feature integrated in the current `--in-reply-to` option. * The first 2 patches make the tests less dependent to `git send-email`'s exact output. * Third patch makes `git send-email` a bit less verbose. * Fourth pat

[PATCH v3 1/6] t9001: non order-sensitive file comparison

2016-06-07 Thread Tom Russello
Tests might fail if lines compared in text files don't have the same order. Signed-off-by: Samuel GROOT Signed-off-by: Tom RUSSELLO Signed-off-by: Matthieu MOY --- t/t9001-send-email.sh | 61 --- 1 file changed, 34 insertions(+), 27 deletions(-)

[PATCH v3 2/6] t9001: check email address is in Cc: field

2016-06-07 Thread Tom Russello
Check if the given utf-8 email address is in the Cc: field. Signed-off-by: Tom RUSSELLO Signed-off-by: Samuel GROOT Signed-off-by: Matthieu MOY --- t/t9001-send-email.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index

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

2016-06-07 Thread Tom Russello
We need a simple and generic way to parse an email file. Since it would be hard to include and maintain an external library, create an simple email parser subroutine to parse an email file. Signed-off-by: Samuel GROOT Signed-off-by: Tom RUSSELLO Signed-off-by: Matthieu MOY --- We chose to crea

[PATCH v3 3/6] t9001: shorten send-email's output

2016-06-07 Thread Tom Russello
Messages displayed by `send-email` should be shortened to avoid displaying unnecesseray informations. Signed-off-by: Samuel GROOT Signed-off-by: Tom RUSSELLO Signed-off-by: Matthieu MOY --- git-send-email.perl | 22 +-- t/t9001-send-email.sh | 58 +

[PATCH v3 6/6] send-email: add option --cite to quote the message body

2016-06-07 Thread Tom Russello
If used with `in-reply-to=`, cite the message body of the given email file. Otherwise, do nothing. If `--compose` is set, quote the message body in the cover letter. Else, imply `--annotate` by default and quote the message body below the triple-dash section in the first patch only. Signed-off-by

[PATCH v3 5/6] send-email: --in-reply-to= populates the fields

2016-06-07 Thread Tom Russello
Take an email message file, parse it and fill the "From", "To", "Cc", "In-reply-to", "References" fields appropriately. If `--compose` option is set, it will also fill the subject field with `Re: ['s subject]` in the introductory message. Signed-off-by: Tom RUSSELLO Signed-off-by: Samuel GROOT

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Christian Couder
On Wed, Jun 1, 2016 at 3:37 PM, Duy Nguyen wrote: > On Tue, May 31, 2016 at 8:18 PM, Christian Couder > wrote: I wonder if this mechanism could also be used or extended to clone and fetch an alternate object database. In [1], [2] and [3], and this was also discussed during the

Re: [PATCH v2] builtin/commit.c: memoize git-path for COMMIT_EDITMSG

2016-06-07 Thread Pranit Bauva
On Wed, May 25, 2016 at 12:49 AM, Pranit Bauva wrote: > This is a follow up commit for f932729c (memoize common git-path > "constant" files, 10-Aug-2015). > > The many function calls to git_path() are replaced by > git_path_commit_editmsg() and which thus eliminates the need to repeatedly > comput

[PATCH v2 0/3] unified auto CRLF handling, V2

2016-06-07 Thread tboegi
From: Torsten Bögershausen unified auto CRLF handling, V2 1/3 is 7/10 of the old 10/10 series 2/3 and 3/3 is a replacement for tb/convert-peek-in-index: Better commit message, added test case All in all we are getting closer. Most of the patches had been send & reviewed earlier, but

[PATCH v2 2/3] read-cache: factor out get_sha1_from_index() helper

2016-06-07 Thread tboegi
From: Torsten Bögershausen Factor out the retrieval of the sha1 for a given path in read_blob_data_from_index() into the function get_sha1_from_index(). This will be used in the next commit, when convert.c can do the analyze for "text=auto" without slurping the whole blob into memory at once. A

[PATCH v2 1/3] convert: unify the "auto" handling of CRLF

2016-06-07 Thread tboegi
From: Torsten Bögershausen Before this change, $ echo "* text=auto" >.gitattributes $ echo "* eol=crlf" >>.gitattributes would have the same effect as $ echo "* text" >.gitattributes $ git config core.eol crlf Since the 'eol' attribute had higher priority than 'text=auto', this may corrupt bina

[PATCH v2 3/3] Correct ce_compare_data() in a middle of a merge

2016-06-07 Thread tboegi
From: Torsten Bögershausen The following didn't work as expected: - In a middle of a merge - merge.renormalize is true, - .gitattributes = "* text=auto" - core.eol = crlf Merge a blob with CRLF "first line\r\nsame line\r\n" and a blob with LF "first line\nsame line\n". The expected result of th

Re: t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Stefan Beller
http://thread.gmane.org/gmane.comp.version-control.git/293025 TL;DR: don't run tests as root, or cherry-pick cadfbef98032fbc6874b5efd70d1e33dbeb4640d (Are you telling me that patch is faulty?) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@

Re: t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Stefan Beller
On Tue, Jun 7, 2016 at 8:43 AM, Stefan Beller wrote: > (Are you telling me that patch is faulty?) The patch is not part of v2.8.1 but part of v2.8.3, so take a later version, or cherry-pick that patch manually. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mes

Re: t7300-clean.sh fails "not ok 32 - should avoid cleaning possible submodules" on debian jessie

2016-06-07 Thread Pirate Praveen
On 2016, ജൂൺ 7 9:16:01 PM IST, Stefan Beller wrote: >On Tue, Jun 7, 2016 at 8:43 AM, Stefan Beller >wrote: >> (Are you telling me that patch is faulty?) > >The patch is not part of v2.8.1 but part of v2.8.3, >so take a later version, or cherry-pick that patch manually. Thanks! I have ignored t

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

2016-06-07 Thread Junio C Hamano
This is a tangent, but your series that ends at 4aa2c475 (grep: -W: don't extend context to trailing empty lines, 2016-05-28) does not seem to have much effect when viewing the change to refs.c this patch makes (it modifies a function in an early part, and then adds bunch of new functions at the en

Re: [PATCH 2/5] t1404: document function test_update_rejected

2016-06-07 Thread Johannes Sixt
Am 07.06.2016 um 13:50 schrieb Michael Haggerty: test_update_rejected () { + local prefix before pack create error && Do we want to add more of unportable 'local' declarations? prefix="$1" && before="$2" && pack="$3" && -- Hannes -- To unsubscribe from this

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

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > We want ref_stores to be polymorphic, so invent a base class of which > files_ref_store is a derived class. For now there is a one-to-one > relationship between ref_stores and submodules. The mention of "submodules" made me go "Huh?" but thinking about it for a second

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

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > resolve_ref_recursively() can handle references in arbitrary files > reference stores, so use it to resolve "gitlink" (i.e., submodule) > references. Aside from removing redundant code, this allows submodule > lookups to benefit from the much more robust code that we us

Re: [PATCH 17/38] resolve_gitlink_ref(): avoid memory allocation in many cases

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > If we don't have to strip trailing '/' from the submodule path, then > don't allocate and copy the submodule name. Makes sense. > int resolve_gitlink_ref(const char *path, const char *refname, unsigned char > *sha1) > { > - int len = strlen(path); > - struc

Re: [PATCH 21/38] refs: make pack_refs() virtual

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > Signed-off-by: Michael Haggerty > --- > refs.c | 7 +++ > refs/files-backend.c | 6 -- > refs/refs-internal.h | 4 > 3 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/refs.c b/refs.c > index 79ef443..f4f5f32 100644 > --- a/r

Re: [PATCH 23/38] refs: make peel_ref() virtual

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > For now it only supports the main reference store. Isn't this comment applicable to a handful of recent changes that made other things virtual, too? Just wondering if I am missing something very special with the peel_ref() thing to single it out. > > Signed-off-by: Mi

Re: [PATCH 34/38] refs: add method for delete_refs

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > From: David Turner > > In the file-based backend, delete_refs has some special optimization > to deal with packed refs. In other backends, we might be able to make > ref deletion faster by putting all deletions into a single > transaction. So we need a special backen

Re: [PATCH 37/38] refs: make lock generic

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > From: David Turner > > Instead of including a files-backend-specific struct ref_lock, change > the generic ref_update struct to include a void pointer that backends > can use for their own arbitrary data. Hmph. > @@ -3591,7 +3590,8 @@ static int lock_ref_for_update(s

Re: [PATCH 02/38] rename_ref_available(): add docstring

2016-06-07 Thread Junio C Hamano
Michael Haggerty writes: > From: David Turner > > Signed-off-by: David Turner > Signed-off-by: Junio C Hamano > Signed-off-by: Michael Haggerty > --- > refs/refs-internal.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/refs/refs-internal.h b/refs/refs-internal.h > index efe58

  1   2   >