Re: git merge-tree: bug report and some feature requests

2018-01-22 Thread Josh Bleecher Snyder
>> I'm experimenting with some new porcelain for interactive rebase. One >> goal is to leave the work tree untouched for most operations. It looks >> to me like 'git merge-tree' may be the right plumbing command for >> doing the merge part of the pick work of the todo list, one commit at >> a

Re: [PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

2018-01-22 Thread Jacob Keller
On Mon, Jan 22, 2018 at 4:59 PM, Jeff King wrote: > On Mon, Jan 22, 2018 at 07:54:18PM -0500, Eric Sunshine wrote: > >> On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: >> > This patch add explicit fallthrough compiler attribute >> > when needed on

Re: [PATCH] enable core.fsyncObjectFiles by default

2018-01-22 Thread Theodore Ts'o
On Mon, Jan 22, 2018 at 07:47:10PM -0500, Jeff King wrote: > > I think Ævar is talking about the case of: > > 1. You make 100 objects that aren't referenced. They're loose. > > 2. You run git-gc. They're still too recent to be deleted. > > Right now those recent loose objects sit loose,

Re: [PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread Duy Nguyen
On Tue, Jan 23, 2018 at 6:09 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh >> index af9b847761..d2a8e0312a 100755 >> --- a/t/t1700-split-index.sh >> +++ b/t/t1700-split-index.sh >>

Re: The original file that was split in 2 other files, is there a way in git to see what went where?

2018-01-22 Thread Aleksey Bykov
Hello, My problem: I am a code reviewer, I have a situation in GIT: - before: a.txt Then a developer decided to split the content of a.txt into 2 files and add a few changes all in one commit: - after: b.txt + few changes and c.txt + few changes Is there an easy way to see: 1. what came to

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Duy Nguyen
On Tue, Jan 23, 2018 at 6:52 AM, Jeff King wrote: > On Mon, Jan 22, 2018 at 07:31:54PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> Patches or cover letters generated by format-patch are meant to be >> exchanged as emails, most of the time. And since it's generally agreed >> that text

Re: [PATCH v2 07/14] match-trees: convert splice_tree to object_id

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 02:12:56PM +0100, Patryk Obara wrote: > >> @@ -197,26 +195,26 @@ static int splice_tree(const unsigned char *hash1, > >> if (strlen(name) == toplen && > >> !memcmp(name, prefix, toplen)) { > >> if (!S_ISDIR(mode)) > >> -

Re: [PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 07:54:18PM -0500, Eric Sunshine wrote: > On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: > > This patch add explicit fallthrough compiler attribute > > when needed on switch case statement eliminating > > the compile warning

Re: [PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

2018-01-22 Thread Eric Sunshine
On Mon, Jan 22, 2018 at 6:51 PM, Elia Pinto wrote: > This patch add explicit fallthrough compiler attribute > when needed on switch case statement eliminating > the compile warning [-Werror=implicit-fallthrough=]. > It does this by means of a macro that takes into account

Re: [PATCH v4 5/6] convert: add 'working-tree-encoding' attribute

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 01:35:25PM +0100, Lars Schneider wrote: > >> + enc = xcalloc(1, sizeof(struct convert_driver)); > > > > I think this should be "sizeof(struct encoding)" but I prefer > > "sizeof(*enc)" which prevents these kind of mistakes. > > Great catch! Thank you! > > Other code

Re: [PATCH] enable core.fsyncObjectFiles by default

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 01:09:03PM -0500, Theodore Ts'o wrote: > > Wouldn't it also make gc pruning more expensive? Now you can repack > > regularly and loose objects will be left out of the pack, and then just > > rm'd, whereas now it would entail creating new packs (unless the whole > > pack

Re: [PATCH] enable core.fsyncObjectFiles by default

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 04:09:23PM +0100, Ævar Arnfjörð Bjarmason wrote: > > Yes, a "cruft pack" that holds unreachable object has been discussed > > a few times recently on list, and I do agree that it is a desirable > > thing to have in the longer run. > > > > What's tricky is to devise a way

[RFC PATCH 1/1] Implement CMake build

2018-01-22 Thread Isaac Hier
Signed-off-by: Isaac Hier --- CMakeLists.txt | 1849 +++ cmake/GenerateCmdlist.cmake | 83 ++ cmake/fopen_dir_test.c | 11 + cmake/fstat_test.c | 37 + cmake/gmtime_test.c |7 +

[RFC PATCH 0/1] Implement CMake build

2018-01-22 Thread Isaac Hier
This patch adds a mostly complete (aside from building tests, documentation, installation, etc.) CMake build to the git project. I am not sure how much interest there is in a CMake build, so please send me feedback one way or another. Personally, I believe CMake will help with Windows builds and

Re: [PATCH v5] mru: Replace mru.[ch] with list.h implementation

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 07:37:01AM +, Eric Wong wrote: > > --- a/packfile.c > > +++ b/packfile.c > > @@ -859,9 +859,8 @@ static void prepare_packed_git_mru(void) > > { > > struct packed_git *p; > > > > - mru_clear(_git_mru); > > But the removed mru_clear needs to be replaced with: >

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Jeff King
On Tue, Jan 23, 2018 at 01:10:43AM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Jan 22 2018, Jeff King jotted: > > > On Mon, Jan 22, 2018 at 07:31:54PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> + opts.diffopt.stat_width = 70; > >> > >>diff_setup_done(); > > > > I wondered how this

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Jeff King jotted: > On Mon, Jan 22, 2018 at 07:31:54PM +0700, Nguyễn Thái Ngọc Duy wrote: >> +opts.diffopt.stat_width = 70; >> >> diff_setup_done(); > > I wondered how this should interact with any config, but I don't think > you can actually configure the

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Nguyễn Thái Ngọc Duy jotted: > diff --git a/builtin/log.c b/builtin/log.c > index 14fdf39165..6be79656c5 100644 > --- a/builtin/log.c > +++ b/builtin/log.c > @@ -1061,6 +1061,7 @@ static void make_cover_letter(struct rev_info *rev, int > use_stdout, > > memcpy(,

Re: [PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 11:51:18PM +, Elia Pinto wrote: > This patch add explicit fallthrough compiler attribute > when needed on switch case statement eliminating > the compile warning [-Werror=implicit-fallthrough=]. > It does this by means of a macro that takes into account > the versions

RE: [Nit] Lots of enumerated type warnings

2018-01-22 Thread Randall S. Becker
On January 22, 2018 6:44 PM, Junio C Hamano wrote: > > "Randall S. Becker" writes: > > > Here are a few examples, there are more: > > > > auto_crlf = git_config_bool(var, value); > > ^ > > The carets in your message do not align to what I think

Re: [PATCH] daemon: add --no-syslog to undo implicit --syslog

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Lucas Werkmeister jotted: > Several options imply --syslog, without there being a way to disable it > again. This commit adds that option. Just two options imply --syslog, --detach & --inetd, unless I've missed something, anyway 2 != several, so maybe just say "The --detach

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 07:31:54PM +0700, Nguyễn Thái Ngọc Duy wrote: > Patches or cover letters generated by format-patch are meant to be > exchanged as emails, most of the time. And since it's generally agreed > that text in mails should be wrapped around 70 columns or so, make sure > these

[PATCH] Fixes compile warning with -Wimplicit-fallthrough CFLAGS

2018-01-22 Thread Elia Pinto
This patch add explicit fallthrough compiler attribute when needed on switch case statement eliminating the compile warning [-Werror=implicit-fallthrough=]. It does this by means of a macro that takes into account the versions of the compilers that include that attribute. The fallthrough (or

Re: [PATCH v2 12/12] fetch: add a --fetch-prune option and fetch.pruneTags config

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Junio C. Hamano jotted: > Ævar Arnfjörð Bjarmason writes: > >> Add a --fetch-prune option to git-fetch, along with fetch.pruneTags >> config option. This allows for doing any of: >> >> git fetch -p -P >> git fetch --prune --prune-tags >> git

Re: [Nit] Lots of enumerated type warnings

2018-01-22 Thread Junio C Hamano
"Randall S. Becker" writes: > Here are a few examples, there are more: > > auto_crlf = git_config_bool(var, value); > ^ The carets in your message do not align to what I think they are trying to point at, but I think the above is pointing at the

Re: [PATCH] Use MOVE_ARRAY

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 03:26:59PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Most of these are "shift part of the array". I wonder if it would make > > sense to encapsulate that pattern in a helper, like: > > > > #define SHIFT_ARRAY(a, nr, pos, slots) \ > >

[PATCH] daemon: add --no-syslog to undo implicit --syslog

2018-01-22 Thread Lucas Werkmeister
Several options imply --syslog, without there being a way to disable it again. This commit adds that option. This is useful, for instance, when running `git daemon` as a systemd service with --inetd. systemd connects stderr to the journal by default, so logging to stderr is useful. On the other

Re: [PATCH] Use MOVE_ARRAY

2018-01-22 Thread Junio C Hamano
Jeff King writes: > Most of these are "shift part of the array". I wonder if it would make > sense to encapsulate that pattern in a helper, like: > > #define SHIFT_ARRAY(a, nr, pos, slots) \ > MOVE_ARRAY(a + pos + slots, a + pos, nr - pos - slots) > ... >

Re: [PATCH] Fix comma splices

2018-01-22 Thread Junio C Hamano
Jeff King writes: > (To be pedantic, these aren't comma splices. A comma splice joins two > independent clauses with a comma and _without_ a conjunction). Thanks for clearing up the "Huh?" I felt earlier when I threw the patch to "to look at later" bin after finding updated text

Re: [PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Patches or cover letters generated by format-patch are meant to be > exchanged as emails, most of the time. And since it's generally agreed > that text in mails should be wrapped around 70 columns or so, make sure > these diffstat follow the

Re: [PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh > index af9b847761..d2a8e0312a 100755 > --- a/t/t1700-split-index.sh > +++ b/t/t1700-split-index.sh > @@ -401,4 +401,23 @@ done <<\EOF > 0642 -rw-r---w- > EOF > >

Re: [PATCH] Fix comma splices

2018-01-22 Thread Jeff King
On Sun, Jan 21, 2018 at 10:19:04PM -0600, fel...@felipegasper.com wrote: > Subject: [PATCH] Fix comma splices in remote.c > [...] > @@ -2123,9 +2123,9 @@ int format_tracking_info(struct branch *branch, struct > strbuf *sb) > _(" (use \"git push\" to publish your

Re: [PATCH v2 07/12] git remote doc: correct dangerous lies about what prune does

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Junio C. Hamano jotted: > Ævar Arnfjörð Bjarmason writes: > >> +Deletes stale references associated with . By default stale >> +remote-tracking branches under , but depending on global >> +configuration and the configuration of the remote we might even

Re: [PATCH v2 04/12] fetch tests: double quote a variable for interpolation

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 22 2018, Junio C. Hamano jotted: > Ævar Arnfjörð Bjarmason writes: > >> If the $cmdline variable contains multiple arguments they won't be >> interpolated correctly since the body of the test is single quoted. I >> don't know what part of test-lib.sh is expanding

RE: [Nit] Lots of enumerated type warnings

2018-01-22 Thread Randall S. Becker
On January 22, 2018 5:41 PM, Junio C Hamano wrote: > "Randall S. Becker" writes: > > > I'm seeing an increase in the enumerated type warnings coming from my > > use of the c99 compiler for compiling git over time (loads more for > > 2.16.0 compared to 2.3.7 when I took it

Re: [PATCH] Use MOVE_ARRAY

2018-01-22 Thread Jeff King
On Mon, Jan 22, 2018 at 06:50:09PM +0100, SZEDER Gábor wrote: > Use the helper macro MOVE_ARRAY to move arrays. This is shorter and > safer, as it automatically infers the size of elements. > > Patch generated by Coccinelle and contrib/coccinelle/array.cocci in > Travis CI's static analysis

RE: [PATCH v2 0/6] Force pipes to flush immediately on NonStop platform

2018-01-22 Thread Randall S. Becker
On January 22, 2018 5:36 PM, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > On Fri, Jan 19, 2018 at 12:33:59PM -0500, randall.s.bec...@rogers.com > wrote: > >> From: "Randall S. Becker" > >> > >> * wrapper.c: called setbuf(stream,0) to force

Re: [Nit] Lots of enumerated type warnings

2018-01-22 Thread Junio C Hamano
"Randall S. Becker" writes: > I'm seeing an increase in the enumerated type warnings > coming from my use of the c99 compiler for compiling git over time (loads > more for 2.16.0 compared to 2.3.7 when I took it on). What exactly do these "warnings" complain about?

Re: [PATCH v2 0/6] Force pipes to flush immediately on NonStop platform

2018-01-22 Thread Junio C Hamano
Torsten Bögershausen writes: > On Fri, Jan 19, 2018 at 12:33:59PM -0500, randall.s.bec...@rogers.com wrote: >> From: "Randall S. Becker" >> >> * wrapper.c: called setbuf(stream,0) to force pipe flushes not enabled by >> default on the NonStop platform.

Re: [PATCH 2/8] sequencer: introduce the `merge` command

2018-01-22 Thread Junio C Hamano
Johannes Schindelin writes: > end_of_object_name = (char *) bol + strcspn(bol, " \t\n"); > + item->arg = end_of_object_name + strspn(end_of_object_name, " \t"); > + item->arg_len = (int)(eol - item->arg); > + > saved = *end_of_object_name; > +

Re: [PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread SZEDER Gábor
On Mon, Jan 22, 2018 at 8:46 PM, Eric Sunshine wrote: > On Mon, Jan 22, 2018 at 1:27 PM, SZEDER Gábor wrote: >> - The logs of OSX build jobs have CRCRLF line endings. However, the >> 'base64' util of OSX doesn't wrap its output at 76

Re: [PATCH 1/8] sequencer: introduce new commands to reset the revision

2018-01-22 Thread Junio C Hamano
Jacob Keller writes: > The code looks good, but I'm a little wary of adding bud which > hard-codes a specific label. I suppose it does grant a bit of > readability to the resulting script... ? It doesn't seem that > important compared to use using "reset onto"? At least

Re: [PATCH v2 12/12] fetch: add a --fetch-prune option and fetch.pruneTags config

2018-01-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Add a --fetch-prune option to git-fetch, along with fetch.pruneTags > config option. This allows for doing any of: > > git fetch -p -P > git fetch --prune --prune-tags > git fetch -p -P origin > git fetch --prune --prune-tags

RE

2018-01-22 Thread Mr Sheng Li Hung
I am Mr.Sheng Li Hung, from china I got your information while search for a reliable person, I have a very profitable business proposition for you and i can assure you that you will not regret been part of this mutual beneficial transaction after completion. Kindly get back to me for more details

Re: [PATCH] worktree: teach "add" to check out existing branches

2018-01-22 Thread Thomas Gummerer
On 01/22, Duy Nguyen wrote: > On Sun, Jan 21, 2018 at 7:02 PM, Thomas Gummerer wrote: > > [...] > > + > > If `` is omitted and neither `-b` nor `-B` nor `--detach` used, > > -then, as a convenience, a new branch based at HEAD is created > > automatically, > > -as if `-b

Re: [PATCH v2 07/12] git remote doc: correct dangerous lies about what prune does

2018-01-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > +Deletes stale references associated with . By default stale > +remote-tracking branches under , but depending on global > +configuration and the configuration of the remote we might even prune > +local tags An optional clarification

Re: [PATCH v2 04/12] fetch tests: double quote a variable for interpolation

2018-01-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > If the $cmdline variable contains multiple arguments they won't be > interpolated correctly since the body of the test is single quoted. I > don't know what part of test-lib.sh is expanding variables within > single-quoted strings,...

Re: [PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread Eric Sunshine
On Mon, Jan 22, 2018 at 1:27 PM, SZEDER Gábor wrote: > Subject: [PATCH] travis-ci: include the trash directories of failed tests in > the trace log > > The trash directory of a failed test might contain valuable > information about the cause of the failure, but we have no

Re: SQUASH convert: add tracing for 'working-tree-encoding' attribute

2018-01-22 Thread Eric Sunshine
On Mon, Jan 22, 2018 at 1:00 PM, wrote: > diff --git a/convert.c b/convert.c > @@ -1165,8 +1165,9 @@ static struct encoding *git_path_check_encoding(struct > attr_check_item *check) > - enc = xcalloc(1, sizeof(struct convert_driver)); > - enc->name =

Re: [PATCH v3] packed_ref_cache: don't use mmap() for small files

2018-01-22 Thread Junio C Hamano
Michael Haggerty writes: > `snapshot->buf` can still be NULL if the `packed-refs` file didn't exist > (see the earlier code path in `load_contents()`). So either that code > path *also* has to get the `xmalloc()` treatment, or my third patch is > still necessary. (My second

Re: [PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread SZEDER Gábor
On Thu, Jan 18, 2018 at 1:47 PM, Duy Nguyen wrote: > On Thu, Jan 18, 2018 at 6:36 PM, SZEDER Gábor wrote: >> This series, queued as 'nd/shared-index-fix', makes the 32 bit Linux >> build job fail on Travis CI. Unfortunately, all it can tell us about >>

Dearest

2018-01-22 Thread Asana Hajraf
Dearest, I am Mrs. Asana Hajraf and I am married to Mr. Hassan Hajraf from kuwait for 19 years without a child and my husband died in 2014. I am contacting you to let you know my desire to donate the sum of $4.5 million to charities in your country which I inherited from my late husband. Due

Re: [PATCH] enable core.fsyncObjectFiles by default

2018-01-22 Thread Theodore Ts'o
On Mon, Jan 22, 2018 at 04:09:23PM +0100, Ævar Arnfjörð Bjarmason wrote: > > What's tricky is to devise a way to allow us to salvage objects that > > are placed in a cruft pack because they are accessed recently, > > proving themselves to be no longer crufts. It could be that a good > > way to

Re: [PATCH/RFC 0/2] Automate updating git-completion.bash a bit

2018-01-22 Thread SZEDER Gábor
On Wed, Jan 17, 2018 at 10:34 AM, Duy Nguyen wrote: > Actually I forgot another option. What if we automate updating the > script at "compile" time instead of calling git at run time? E.g. with > something like below, a contributor could just run > > make update-completion

SQUASH convert: add tracing for 'working-tree-encoding' attribute

2018-01-22 Thread lars . schneider
From: Lars Schneider Hi Junio, this attached patch addresses Simon's review comments. Can you squash the patch if you apply "[PATCH v4 5/6] convert: add 'working-tree-encoding' attribute"?

Re: git merge-tree: bug report and some feature requests

2018-01-22 Thread Elijah Newren
On Sat, Jan 20, 2018 at 7:00 PM, Josh Bleecher Snyder wrote: > Hi, all. > > I'm experimenting with some new porcelain for interactive rebase. One > goal is to leave the work tree untouched for most operations. It looks > to me like 'git merge-tree' may be the right plumbing

[PATCH] Use MOVE_ARRAY

2018-01-22 Thread SZEDER Gábor
Use the helper macro MOVE_ARRAY to move arrays. This is shorter and safer, as it automatically infers the size of elements. Patch generated by Coccinelle and contrib/coccinelle/array.cocci in Travis CI's static analysis build job. Signed-off-by: SZEDER Gábor ---

Attention Email Id,Idd

2018-01-22 Thread Mr.Larry mark
Attention Email Id, We have deposited the check of your fund ($5.500`000`00USD) through Western Union department after our finally meeting regarding your fund, All you will do is to contact Western Union director Pastor Fred Martins,(mrlarymarkm...@gmail.com) He will give you direction on how

[ANNOUNCE] Git for Windows 2.16.1

2018-01-22 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.16.1 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.16.0(2) (January 18th 2018) This is a hotfix release, based on upstream Git's hotfix to address a possible segmentation fault

Dear Friend, Your Urgent Respond Is Needed,

2018-01-22 Thread Sherifar Abell
Dear Friend Please carefully read this Message and get back to me, if you can handle this deal, My name is Mrs. Sherifar Abell. I am a banker working with one of the well known Bank here in Burkina Faso as an Auditing Manager, the name of the bank will be mention to you in details when i receive

Re: [PATCH] enable core.fsyncObjectFiles by default

2018-01-22 Thread Ævar Arnfjörð Bjarmason
On Sat, Jan 20 2018, Junio C. Hamano jotted: > Theodore Ts'o writes: > >> I've never been fond of the "git repack -A" behavior >> where it can generate huge numbers of loose files. I'd much prefer it >> if the other objects ended up in a separate pack file, and then some

[PATCH 1/5] travis-ci: use 'set -x' for the commands under 'su' in the 32 bit Linux build

2018-01-22 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor --- ci/run-linux32-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh index c19c50c1c9..5a36a8d7c0 100755 --- a/ci/run-linux32-build.sh +++ b/ci/run-linux32-build.sh @@ -26,6 +26,7 @@

[PATCH 4/5] travis-ci: don't run the test suite as root in the 32 bit Linux build

2018-01-22 Thread SZEDER Gábor
Travis CI runs the 32 bit Linux build job in a Docker container, where all commands are executed as root by default. Therefore, ever since we added this build job in 88dedd5e7 (Travis: also test on 32-bit Linux, 2017-03-05), we have a bit of code to create a user in the container matching the ID

[PATCH 0/5] Travis CI: don't run the test suite as root in the 32 bit Linux build

2018-01-22 Thread SZEDER Gábor
The important one is patch 4, which fixes the issue of running the test suite as root, with a bit of sugar on top to make sure that a future "non-root" build job can cope with a root-written cache directory from the past. The rest is a collection of small cleanups and improvements to make the

[PATCH 3/5] travis-ci: don't repeat the path of the cache directory

2018-01-22 Thread SZEDER Gábor
Some of our 'ci/*' scripts repeat the name or full path of the Travis CI cache directory, and the following patches will add new places using that path. Use a variable to refer to the path of the cache directory instead, so it's hard-coded only in a single place. Pay extra attention to the 32

[PATCH 2/5] travis-ci: use 'set -e' in the 32 bit Linux build job

2018-01-22 Thread SZEDER Gábor
All 'ci/*' scripts use 'set -e' to break the build job if a command fails, except 'ci/run-linux32-build.sh' which relies on the && chain to do the same. This inconsistency among the 'ci/*' scripts is asking for trouble: I forgot about the && chain more than once while working on this patch

[PATCH 5/5] travis-ci: don't fail if user already exists on 32 bit Linux build job

2018-01-22 Thread SZEDER Gábor
The 32 bit Linux build job runs in a Docker container, which lends itself to running and debugging locally, too. Especially during debugging one usually doesn't want to start with a fresh container every time, to save time spent on installing a bunch of dependencies. However, that doesn't work

Re: [PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Patryk Obara
> Patches 1 and 2 should be sent separately though. I hoped they could be piggy-backed, but since there will be v3 of this patch series... I'll wait for Junio's opinion. > I look forward to seeing you deal with the object reading part … Yeah, even reading of loose objects does not work on my

Re: [PATCH v2 07/14] match-trees: convert splice_tree to object_id

2018-01-22 Thread Patryk Obara
On 22 January 2018 at 12:56, Duy Nguyen wrote: > On Mon, Jan 22, 2018 at 12:04:30PM +0100, Patryk Obara wrote: >> Convert the definition of static recursive splice_tree function to use >> struct object_id and adjust single caller. >> >> Signed-off-by: Patryk Obara

Re: [PATCH v2 05/14] sha1_file: convert hash_sha1_file to object_id

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 7:44 PM, Patryk Obara wrote: > On 22 January 2018 at 12:49, Duy Nguyen wrote: >> On Mon, Jan 22, 2018 at 12:04:28PM +0100, Patryk Obara wrote: >>> @@ -969,7 +969,7 @@ static int ident_to_worktree(const char *path, const >>> char

Re: [PATCH v2 05/14] sha1_file: convert hash_sha1_file to object_id

2018-01-22 Thread Patryk Obara
On 22 January 2018 at 12:49, Duy Nguyen wrote: > On Mon, Jan 22, 2018 at 12:04:28PM +0100, Patryk Obara wrote: >> @@ -969,7 +969,7 @@ static int ident_to_worktree(const char *path, const >> char *src, size_t len, >> >> /* step 4: substitute */ >>

Re: [PATCH v4 5/6] convert: add 'working-tree-encoding' attribute

2018-01-22 Thread Lars Schneider
> On 21 Jan 2018, at 15:22, Simon Ruderich wrote: > > On Sat, Jan 20, 2018 at 04:24:17PM +0100, lars.schnei...@autodesk.com wrote: >> +static struct encoding *git_path_check_encoding(struct attr_check_item >> *check) >> +{ >> +const char *value = check->value; >> +

[PATCH] format-patch: set diffstat width to 70 instead of default 80

2018-01-22 Thread Nguyễn Thái Ngọc Duy
Patches or cover letters generated by format-patch are meant to be exchanged as emails, most of the time. And since it's generally agreed that text in mails should be wrapped around 70 columns or so, make sure these diffstat follow the convention. I noticed this when I quoted a diffstat line [1].

Re: [PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 12:04:23PM +0100, Patryk Obara wrote: > sha1_file.c | 100 > ++ You have started the invasion to sha1_file.c. Victory is near! (*) 2018 will be the year of something-other-shan-sha1 :) I've read through the series

Re: [PATCH v2 10/14] notes: convert write_notes_tree to object_id

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 12:04:33PM +0100, Patryk Obara wrote: > @@ -1141,12 +1142,13 @@ int write_notes_tree(struct notes_tree *t, unsigned > char *result) > cb_data.next_non_note = t->first_non_note; > > /* Write tree objects representing current notes tree */ > - ret =

Re: [PATCH v2 07/14] match-trees: convert splice_tree to object_id

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 12:04:30PM +0100, Patryk Obara wrote: > Convert the definition of static recursive splice_tree function to use > struct object_id and adjust single caller. > > Signed-off-by: Patryk Obara > --- > match-trees.c | 42

Re: [PATCH v2 05/14] sha1_file: convert hash_sha1_file to object_id

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 12:04:28PM +0100, Patryk Obara wrote: > @@ -969,7 +969,7 @@ static int ident_to_worktree(const char *path, const char > *src, size_t len, > > /* step 4: substitute */ > strbuf_addstr(buf, "Id: "); > - strbuf_add(buf,

Re: [PATCH] worktree: teach "add" to check out existing branches

2018-01-22 Thread Duy Nguyen
On Sun, Jan 21, 2018 at 7:02 PM, Thomas Gummerer wrote: > Currently 'git worktree add ' creates a new branch named after the > basename of the path by default. If a branch with that name already > exists, the command refuses to do anything, unless the '--force' option > is

[PATCH v2 09/14] notes: convert combine_notes_* to object_id

2018-01-22 Thread Patryk Obara
Convert the definition and declarations of combine_notes_* functions to struct object_id and adjust usage of these functions. Signed-off-by: Patryk Obara --- notes.c | 46 +++--- notes.h | 25 +++-- 2 files

[PATCH v2 14/14] sha1_file: rename hash_sha1_file_literally

2018-01-22 Thread Patryk Obara
This function was already converted to use struct object_id earlier. --- builtin/hash-object.c | 3 ++- cache.h | 4 +++- sha1_file.c | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index

[PATCH v2 11/14] sha1_file: convert write_sha1_file to object_id

2018-01-22 Thread Patryk Obara
Convert the definition and declaration of write_sha1_file to struct object_id and adjust usage of this function. This commit also converts static function write_sha1_file_prepare, as it is closely related. Rename these functions to write_object_file and write_object_file_prepare respectively.

[PATCH v2 07/14] match-trees: convert splice_tree to object_id

2018-01-22 Thread Patryk Obara
Convert the definition of static recursive splice_tree function to use struct object_id and adjust single caller. Signed-off-by: Patryk Obara --- match-trees.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git

[PATCH v2 03/14] sha1_file: convert pretend_sha1_file to object_id

2018-01-22 Thread Patryk Obara
Convert the declaration and definition of pretend_sha1_file to use struct object_id and adjust all usages of this function. Rename it to pretend_object_file. Signed-off-by: Patryk Obara --- Documentation/technical/api-object-access.txt | 2 +- blame.c

[PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Patryk Obara
Compared to v1: Following brian's suggestion I renamed following functions and struct names to indicate, that they are no longer intended for sha1 algorithm only: struct sha1_stat -> struct oid_stat pretend_sha1_file-> pretend_object_file write_sha1_file ->

[PATCH v2 13/14] sha1_file: convert write_loose_object to object_id

2018-01-22 Thread Patryk Obara
Convert the definition and declaration of statis write_loose_object function to struct object_id. Signed-off-by: Patryk Obara --- sha1_file.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/sha1_file.c b/sha1_file.c

[PATCH v2 12/14] sha1_file: convert force_object_loose to object_id

2018-01-22 Thread Patryk Obara
Convert the definition and declaration of force_object_loose to struct object_id and adjust usage of this function. Signed-off-by: Patryk Obara --- builtin/pack-objects.c | 2 +- cache.h| 3 ++- sha1_file.c| 10 +- 3 files changed, 8

[PATCH v2 05/14] sha1_file: convert hash_sha1_file to object_id

2018-01-22 Thread Patryk Obara
Convert the declaration and definition of hash_sha1_file to use struct object_id and adjust all function calls. Rename this function to hash_object_file. Signed-off-by: Patryk Obara --- apply.c | 4 ++-- builtin/index-pack.c | 5 ++---

[PATCH v2 08/14] commit: convert commit_tree* to object_id

2018-01-22 Thread Patryk Obara
Convert the definitions and declarations of commit_tree and commit_tree_extended to use struct object_id and adjust all usages of these functions. Signed-off-by: Patryk Obara --- builtin/am.c | 4 ++-- builtin/commit-tree.c | 4 ++-- builtin/commit.c | 5

[PATCH v2 01/14] http-push: improve error log

2018-01-22 Thread Patryk Obara
When git push fails due to server-side WebDAV error, it's not easy to point to the main culprit. Additional information about exact cURL error and HTTP server response is helpful for debugging purpose. New error log helped me pinpoint failing test t5540-http-push-webdav to a missing Apache

[PATCH v2 10/14] notes: convert write_notes_tree to object_id

2018-01-22 Thread Patryk Obara
Convert the definition and declaration of write_notes_tree to struct object_id and adjust usage of this function. Additionally, improve style of small part of this function, as old formatting made it hard to understand at glance what this part of code is doing. Signed-off-by: Patryk Obara

[PATCH v2 02/14] clang-format: adjust penalty for return type line break

2018-01-22 Thread Patryk Obara
The penalty of 5 makes clang-format very eager to put even short type declarations (e.g. "extern int") into a separate line, even when breaking parameters list is sufficient. Signed-off-by: Patryk Obara --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 04/14] dir: convert struct sha1_stat to use object_id

2018-01-22 Thread Patryk Obara
Convert the declaration of struct sha1_stat. Adjust all usages of this struct and replace hash{clr,cmp,cpy} with oid{clr,cmp,cpy} wherever possible. Rename it to struct oid_stat. Remove macro EMPTY_BLOB_SHA1_BIN, as it's no longer used. Signed-off-by: Patryk Obara ---

[PATCH v2 06/14] cache: clear whole hash buffer with oidclr

2018-01-22 Thread Patryk Obara
As long as GIT_SHA1_RAWSZ is equal to GIT_MAX_RAWSZ there's no problem, but when new hashing algorithm will be in place this memset will clear only 20-byte prefix of hash buffer. Alternatively, hashclr implementation could be adjusted, but this function is almost removed from codebase already.

[PATCH 0/3] nd/shared-index-fix update

2018-01-22 Thread Nguyễn Thái Ngọc Duy
This only changes the last patch to correct the test prerequisite and a couple minor refinements. Interdiff: diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 5494389dbb..d2a8e0312a 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -401,7 +401,7 @@ done <<\EOF

[PATCH 2/3] read-cache.c: move tempfile creation/cleanup out of write_shared_index

2018-01-22 Thread Nguyễn Thái Ngọc Duy
For one thing, we have more consistent cleanup procedure now and always keep errno intact. The real purpose is the ability to break out of write_locked_index() early when mks_tempfile() fails in the next patch. It's more awkward to do it if this mks_tempfile() is still inside

[PATCH 3/3] read-cache: don't write index twice if we can't write shared index

2018-01-22 Thread Nguyễn Thái Ngọc Duy
In a0a967568e ("update-index --split-index: do not split if $GIT_DIR is read only", 2014-06-13), we tried to make sure we can still write an index, even if the shared index can not be written. We did so by just calling 'do_write_locked_index()' just before 'write_shared_index()'.

[PATCH 1/3] read-cache.c: change type of "temp" in write_shared_index()

2018-01-22 Thread Nguyễn Thái Ngọc Duy
This local variable 'temp' will be passed in from the caller in the next patch. To reduce patch noise, let's change its type now while it's still a local variable and get all the trival conversion out of the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio

Re: [PATCH] files_initial_transaction_commit(): only unlock if locked

2018-01-22 Thread Mathias Rav
2018-01-22 10:25 +0100 Michael Haggerty : > On 01/19/2018 11:14 PM, Junio C Hamano wrote: > > Jeff King writes: > > > >> On Thu, Jan 18, 2018 at 02:38:41PM +0100, Mathias Rav wrote: > >> > >>> Running git clone --single-branch --mirror -b TAGNAME

Re: [PATCH] files_initial_transaction_commit(): only unlock if locked

2018-01-22 Thread Michael Haggerty
On 01/19/2018 11:14 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Thu, Jan 18, 2018 at 02:38:41PM +0100, Mathias Rav wrote: >> >>> Running git clone --single-branch --mirror -b TAGNAME previously >>> triggered the following error message: >>> >>> fatal: multiple

Re: [PATCH/RFC] Merge most test helper programs into a new one "test-tool"

2018-01-22 Thread Duy Nguyen
Whoops, this patch is over 100KB and will likely be blocked by vger.kernel.org. I may need to split it and resend later, but I think the commit message is enough for discussion (the actual changes are not that interesting anyway). The commit is only available at

  1   2   >