Re: [PATCH v1] Travis: also test on 32-bit Linux

2017-03-09 Thread Jeff King
On Fri, Mar 10, 2017 at 01:14:45AM +0100, René Scharfe wrote: > > 3. There were a number of alloc-and-copy instances. The copy part is > > the same as (2) above, but you have to repeat the size, which is > > potentially error-prone. I wonder if we would want something like: > > > >

Re: [PATCH GSoC] Allow "-" as a short-hand for "@{-1}" in branch deletions

2017-03-09 Thread Shuyang Shi
Hi Stefan, Really appreciate your help on this, but I guess I am cancelling this patch for Siddharth's. Thanks, Shuyang 史舒扬 Shuyang Shi Undergraduate Department of CS, School of EECS, Peking University Email: shuyang...@gmail.com Mobile: +86-18301336991 On Fri, Mar 10, 2017 at 1:47 AM, Stefan B

Re: [PATCH GSoC] Allow "-" as a short-hand for "@{-1}" in branch deletions

2017-03-09 Thread Shuyang Shi
Hey Siddharth, It is good to know that you have been working on this, and sorry for this "bump". Although I see "git branch -d -" not so dangerous, it is okay for me that we keep it out of the shorthand range. And your work is awesome. Thanks, Shuyang 史舒扬 Shuyang Shi Undergraduate Department of

Re: [PATCH v2 GSoC RFC] diff: allow "-" as a short-hand for "last branch"

2017-03-09 Thread Siddharth Kannan
On Fri, Mar 10, 2017 at 04:52:07AM +, mash wrote: > Maybe you can reuse the diff tests. I'll do another microproject then. Yeah, definitely. If there are more tests required, then I will reuse your ones! > > mash > > The original message doesn't seem to cc the mailing list: Thanks! It was r

[PATCH v2 GSoC RFC] diff: allow "-" as a short-hand for "last branch"

2017-03-09 Thread Siddharth Kannan
Hey, I have already worked on this, and I made the change inside sha1_name.c. The final version of my patch is here[1]. > Handling the dash in sha1_name:get_sha1_basic is not an issue but > git > was designed with the dash in mind for options not for this weird > short-hand so as long as there's

RE: [PATCH v2 GSoC RFC] diff: allow "-" as a short-hand for "last branch"

2017-03-09 Thread mash
> From the discussion over the different versions of my patch, I get > the feeling that enabling this shorthand for all the commands is the > direction that git wants to move in. Interesting. > Sorry about the time you spent on this patch. Don't worry about it. I just seem to be too stupid to se

Re: [PATCH GSoC] Allow "-" as a short-hand for "@{-1}" in branch deletions

2017-03-09 Thread Siddharth Kannan
Hey Shuyang, On Thu, Mar 09, 2017 at 09:47:12AM -0800, Stefan Beller wrote: > > The "-" shorthand that stands for "the branch we were previously on", > > like we did for "git merge -" sometime after we introduced "git checkout -". > > Now I am introducing this shorthand to branch delete, i.e. > > "

Re: [media] omap3isp: Correctly set IO_OUT_SEL and VP_CLK_POL for CCP2 mode

2017-03-09 Thread Fengguang Wu
On Fri, Mar 03, 2017 at 10:48:38PM +0100, Pavel Machek wrote: Hi! [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.10 next-20170303] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] Yes, the patch is against Sakar

Re: Possible bug: git pull --rebase discards local commits

2017-03-09 Thread Igor Djordjevic
Hi Junio, On 23/08/2016 21:28, Junio C Hamano wrote: > Joshua Phillips writes: > > I've found a case where git pull --rebase discards commits in my branch > > if the remote-tracking branch was rewound (and the remote tracking > > branch's reflog contains my branch's latest commit). This is due to

Re: [PATCH v1] Travis: also test on 32-bit Linux

2017-03-09 Thread René Scharfe
Am 05.03.2017 um 12:36 schrieb Jeff King: > I grepped for 'memcpy.*sizeof' and found one other case that's not a > bug, but is questionable. > > Of the "good" cases, I think most of them could be converted into > something more obviously-correct, which would make auditing easier. The > three main

Re: [PATCH v1] Travis: also test on 32-bit Linux

2017-03-09 Thread René Scharfe
Am 05.03.2017 um 12:36 schrieb Jeff King: I grepped for 'memcpy.*sizeof' and found one other case that's not a bug, but is questionable. Of the "good" cases, I think most of them could be converted into something more obviously-correct, which would make auditing easier. The three main cases I sa

[PATCH] blame: move blame_entry duplication to add_blame_entry()

2017-03-09 Thread René Scharfe
All callers of add_blame_entry() allocate and copy the second argument. Let the function do it for them, reducing code duplication. Signed-off-by: Rene Scharfe --- builtin/blame.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/builtin/blame.c b/bui

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > +static void submodule_reset_index(const char *path) > +{ > + struct child_process cp = CHILD_PROCESS_INIT; > + prepare_submodule_repo_env_no_git_dir(&cp.env_array); > + > + cp.git_cmd = 1; > + cp.no_stdin = 1; > + cp.dir = path; > + > + argv

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > +/** > + * Moves a submodule at a given path from a given head to another new head. > + * For edge cases (a submodule coming into existence or removing a submodule) > + * pass NULL for old or new respectively. > + */ > +int submodule_move_head(const char *path, > +

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > In later patches we introduce the options and flag for commands > that modify the working directory, e.g. git-checkout. > > This piece of code will be used universally for > all these working tree modifications as it > * supports dry run to answer the question: >

Re: [PATCH 07/17] connect_work_tree_and_git_dir: safely create leading directories

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > In a later patch we'll use connect_work_tree_and_git_dir when the > directory for the gitlink file doesn't exist yet. This patch makes > connect_work_tree_and_git_dir safe to use for both cases of > either the git dir or the working dir missing. > > To do so, we ne

Re: [PATCH v3 2/2] submodule--helper.c: remove duplicate code

2017-03-09 Thread Valery Tolstov
As remainder. It is better if only [PATCH v3 2/2] is taken, on top the patch from here https://public-inbox.org/git/20170309221543.15897-8-sbel...@google.com/ The [PATCH v3 1/2] is just a copy of latter.

Re: [PATCH 2/2] pathspec: allow escaped query values

2017-03-09 Thread Jonathan Tan
On 03/09/2017 01:07 PM, Brandon Williams wrote: diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh index b5e5a0607..585d17bad 100755 --- a/t/t6135-pathspec-with-attrs.sh +++ b/t/t6135-pathspec-with-attrs.sh @@ -178,4 +178,13 @@ test_expect_success 'abort on asking for wr

[PATCH v5 11/11] t1309: document cases where we would want early config not to die()

2017-03-09 Thread Johannes Schindelin
Jeff King came up with a couple examples that demonstrate how the new read_early_config() that looks harder for the current .git/ directory could die() in an undesirable way. Let's add those cases to the test script, to document what we would like to happen when early config encounters problems.

[PATCH v5 10/11] setup_git_directory_gently_1(): avoid die()ing

2017-03-09 Thread Johannes Schindelin
This function now has a new caller in addition to setup_git_directory(): the newly introduced discover_git_directory(). That function wants to discover the current .git/ directory, and in case of a corrupted one simply pretend that there is none to be found. Example: if a stale .git file exists in

[PATCH v5 09/11] Test read_early_config()

2017-03-09 Thread Johannes Schindelin
So far, we had no explicit tests of that function. Signed-off-by: Johannes Schindelin --- t/helper/test-config.c | 15 +++ t/t1309-early-config.sh | 50 + 2 files changed, 65 insertions(+) create mode 100755 t/t1309-early-config.sh d

[PATCH v5 06/11] Make read_early_config() reusable

2017-03-09 Thread Johannes Schindelin
The pager configuration needs to be read early, possibly before discovering any .git/ directory. Let's not hide this function in pager.c, but make it available to other callers. Signed-off-by: Johannes Schindelin --- cache.h | 1 + config.c | 31 +++ pager.c | 31

[PATCH v5 07/11] read_early_config(): avoid .git/config hack when unneeded

2017-03-09 Thread Johannes Schindelin
So far, we only look whether the startup_info claims to have seen a git_dir. However, do_git_config_sequence() (and consequently the git_config_with_options() call used by read_early_config() asks the have_git_dir() function whether we have a .git/ directory, which in turn also looks at git_dir an

[PATCH v5 08/11] read_early_config(): really discover .git/

2017-03-09 Thread Johannes Schindelin
Earlier, we punted and simply assumed that we are in the top-level directory of the project, and that there is no .git file but a .git/ directory so that we can read directly from .git/config. However, that is not necessarily true. We may be in a subdirectory. Or .git may be a gitfile. Or the envi

[PATCH v5 05/11] Introduce the discover_git_directory() function

2017-03-09 Thread Johannes Schindelin
We modified the setup_git_directory_gently_1() function earlier to make it possible to discover the GIT_DIR without changing global state. However, it is still a bit cumbersome to use if you only need to figure out the (possibly absolute) path of the .git/ directory. Let's just provide a convenien

[PATCH v5 04/11] setup_git_directory_1(): avoid changing global state

2017-03-09 Thread Johannes Schindelin
For historical reasons, Git searches for the .git/ directory (or the .git file) by changing the working directory successively to the parent directory of the current directory, until either anything was found or until a ceiling or a mount point is hit. Further global state may be changed in case a

[PATCH v5 03/11] Prepare setup_discovered_git_directory() the root directory

2017-03-09 Thread Johannes Schindelin
Currently, the offset parameter (indicating what part of the cwd parameter corresponds to the current directory after discovering the .git/ directory) is set to 0 when we are running in the root directory. However, in the next patches we will avoid changing the current working directory while sear

[PATCH v5 02/11] setup_git_directory(): use is_dir_sep() helper

2017-03-09 Thread Johannes Schindelin
It is okay in practice to test for forward slashes in the output of getcwd(), because we go out of our way to convert backslashes to forward slashes in getcwd()'s output on Windows. Still, the correct way to test for a dir separator is by using the helper function we introduced for that very purpo

[PATCH v5 01/11] t7006: replace dubious test

2017-03-09 Thread Johannes Schindelin
The idea of the test case "git -p - core.pager is not used from subdirectory" was to verify that the setup_git_directory() function had not been called just to obtain the core.pager setting. However, we are about to fix the early config machinery so that it *does* work, without messing up the glob

[PATCH v5 00/11] Fix the early config

2017-03-09 Thread Johannes Schindelin
These patches are an attempt to make Git's startup sequence a bit less surprising. The idea here is to discover the .git/ directory gently (i.e. without changing the current working directory, nor any global variables), and to use it to read the .git/config file early, before we actually called se

Re: [PATCH 1/2] pathspec: allow querying for attributes

2017-03-09 Thread Jonathan Tan
On 03/09/2017 01:07 PM, Brandon Williams wrote: diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index fc9320e59..5c32d1905 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -384,6 +384,26 @@ full pathname may have spe

[PATCH 06/17] make is_submodule_populated gently

2017-03-09 Thread Stefan Beller
We need the gentle version in a later patch. As we have just one caller, migrate the caller. Signed-off-by: Stefan Beller --- builtin/grep.c | 2 +- submodule.c| 7 ++- submodule.h| 8 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/builtin/grep.c b/builtin/g

[PATCH 02/17] lib-submodule-update.sh: do not use ./. as submodule remote

2017-03-09 Thread Stefan Beller
Adding the repository itself as a submodule does not make sense in the real world. In our test suite we used to do that out of convenience in some tests as the current repository has easiest access for setting up 'just a submodule'. However this doesn't quite test the real world, so let's do not f

[RFCv8 PATCH 00/17] Checkout aware of Submodules!

2017-03-09 Thread Stefan Beller
previous work: https://public-inbox.org/git/20170306205919.9713-1-sbel...@google.com/ v8: * Thanks Ramsay; another variable is static now! * Thanks Junio; fixed typos (in comments and commit messages)! * dropped the patch touching read-cache.c; I realized it is bogus after inspecting it and

[PATCH 15/17] entry.c: create submodules when interesting

2017-03-09 Thread Stefan Beller
When a submodule is introduced with a new revision we need to create the submodule in the worktree as well. As 'submodule_move_head' handles edge cases, all we have to do is call it from within the function that creates new files in the working tree for workingtree operations. Signed-off-by: Stefa

[PATCH 11/17] update submodules: move up prepare_submodule_repo_env

2017-03-09 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29 +

[PATCH 14/17] unpack-trees: check if we can perform the operation for submodules

2017-03-09 Thread Stefan Beller
In a later patch we'll support submodule entries to be in sync with the tree in working tree changing commands, such as checkout or read-tree. When a new submodule entry changes in the tree, we need to check if there are conflicts (directory/file conflicts) for the tree. Add this check for submodu

[PATCH 04/17] lib-submodule-update.sh: replace sha1 by hash

2017-03-09 Thread Stefan Beller
Cleaning up code by generalising it. Currently the mailing list discusses yet again how to migrate away from sha1. Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-upda

[PATCH 09/17] update submodules: add a config option to determine if submodules are updated

2017-03-09 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller --- submodule.c | 6 ++ submodule.h | 1 + 2 files changed, 7

[PATCH 13/17] unpack-trees: pass old oid to verify_clean_submodule

2017-03-09 Thread Stefan Beller
The check (which uses the old oid) is yet to be implemented, but this part is just a refactor, so it can go separately first. Signed-off-by: Stefan Beller --- unpack-trees.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c ind

[PATCH 17/17] builtin/read-tree: add --recurse-submodules switch

2017-03-09 Thread Stefan Beller
A new known failure mode is introduced[1], which is actually not a failure but a feature in read-tree. Unlike checkout for which the recursive submodule tests were originally written, read-tree does warn about ignored untracked files that would be overwritten. For the sake of keeping the test libra

[PATCH 03/17] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-09 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..00128f28b5 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@ -193,6 +193,11 @@ test_s

[PATCH 08/17] update submodules: add submodule config parsing

2017-03-09 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 05/17] lib-submodule-update.sh: define tests for recursing into submodules

2017-03-09 Thread Stefan Beller
Currently lib-submodule-update.sh provides 2 functions test_submodule_switch and test_submodule_forced_switch that are used by a variety of tests to ensure that submodules behave as expected. The current expected behavior is that submodules are not touched at all (see 42639d2317a for the exact setu

[PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. This piece of code will be used universally for all these working tree modifications as it * supports dry run to answer the question: "Is it safe to change the submodule to this

[PATCH 10/17] submodules: introduce check to see whether to touch a submodule

2017-03-09 Thread Stefan Beller
In later patches we introduce the --recurse-submodule flag for commands that modify the working directory, e.g. git-checkout. It is potentially expensive to check if a submodule needs an update, because a common theme to interact with submodules is to spawn a child process for each interaction. S

[PATCH 16/17] builtin/checkout: add --recurse-submodules switch

2017-03-09 Thread Stefan Beller
This exposes a flag to recurse into submodules in builtin/checkout making use of the code implemented in prior patches. A new failure mode is introduced in the submodule update library, as the directory/submodule conflict is not solved in prior patches. Signed-off-by: Stefan Beller --- Document

[PATCH 07/17] connect_work_tree_and_git_dir: safely create leading directories

2017-03-09 Thread Stefan Beller
In a later patch we'll use connect_work_tree_and_git_dir when the directory for the gitlink file doesn't exist yet. This patch makes connect_work_tree_and_git_dir safe to use for both cases of either the git dir or the working dir missing. To do so, we need to call safe_create_leading_directories[

[PATCH 01/17] lib-submodule-update.sh: reorder create_lib_submodule_repo

2017-03-09 Thread Stefan Beller
Redraw the ASCII art describing the setup using more space, such that it is easier to understand. The leaf commits are now ordered the same way the actual code is ordered. Add empty lines to the setup code separating each of the leaf commits, each starting with a "checkout -b". Signed-off-by: St

Re: [GSoC] Git patch flow

2017-03-09 Thread Brandon Williams
On 03/10, Valery Tolstov wrote: > In Documentation/SubmittingPatches it is said: > > > (4) The list forms consensus that the last round of your patch is > > good. Send it to the maintainer and cc the list. > > https://public-inbox.org/git/20170309181837.gf153...@google.com/T/ > > I assume that m

[GSoC] Git patch flow

2017-03-09 Thread Valery Tolstov
In Documentation/SubmittingPatches it is said: > (4) The list forms consensus that the last round of your patch is > good. Send it to the maintainer and cc the list. https://public-inbox.org/git/20170309181837.gf153...@google.com/T/ I assume that my patch is at stage 4 now. Now I need to do wha

Re: What's cooking in git.git (Mar 2017, #03; Wed, 8)

2017-03-09 Thread Johannes Schindelin
Hi Junio, On Wed, 8 Mar 2017, Junio C Hamano wrote: > * jk/http-auth (2017-02-27) 2 commits > (merged to 'next' on 2017-03-02 at 87f81b4395) > + http: add an "auto" mode for http.emptyauth > + http: restrict auth methods to what the server advertises > > Reduce authentication round-trip ove

Re: Git attributes are read from head branch instead of given branch when using git archive

2017-03-09 Thread Brandon Williams
On 03/09, Aalex Gabi wrote: > Hello, > > git archive --remote="URL" branchname > branchname.tar.gz is not > reading .gitattributes file from the given branch but from HEAD. More > specifically export-ignore lines in the target branch are ignored. > > The remote is using git protocol and it's serv

[PATCH] gitk: blame older file in case of copied and renamed files

2017-03-09 Thread Max Kirillov
If file was renamed or copied, and in the same time edited, attempt to run "Show origin of this line" or "Run gui blame on this line" would result in error "fatal: no such path FILE in HASH". Reason is that it tried to use the newer filename, while it should use the older one. Since ctext_file_nam

Re: [PATCH 0/2] bringing attributes to pathspecs

2017-03-09 Thread Stefan Beller
On Thu, Mar 9, 2017 at 1:07 PM, Brandon Williams wrote: > This small series extends the pathspec magic to allow users to specify > attributes that files must have in order for a pathspec to 'match' a file. > > One potential use for this is to allow a repository to specify attributes for > a > set

[PATCH 1/2] pathspec: allow querying for attributes

2017-03-09 Thread Brandon Williams
The pathspec mechanism is extended via the new ":(attr:eol=input)pattern/to/match" syntax to filter paths so that it requires paths to not just match the given pattern but also have the specified attrs attached for them to be chosen. Based on a patch by Stefan Beller Signed-off-by: Brandon Willia

[PATCH 2/2] pathspec: allow escaped query values

2017-03-09 Thread Brandon Williams
In our own .gitattributes file we have attributes such as: *.[ch] whitespace=indent,trail,space When querying for attributes we want to be able to ask for the exact value, i.e. git ls-files :(attr:whitespace=indent,trail,space) should work, but the commas are used in the attr magic to i

[PATCH 0/2] bringing attributes to pathspecs

2017-03-09 Thread Brandon Williams
This small series extends the pathspec magic to allow users to specify attributes that files must have in order for a pathspec to 'match' a file. One potential use for this is to allow a repository to specify attributes for a set of files. The user can then specify that attribute as a pathspec to

Git attributes are read from head branch instead of given branch when using git archive

2017-03-09 Thread Aalex Gabi
Hello, git archive --remote="URL" branchname > branchname.tar.gz is not reading .gitattributes file from the given branch but from HEAD. More specifically export-ignore lines in the target branch are ignored. The remote is using git protocol and it's served by Gitlab. I use git version 2.11.0. I

Re: [PATCH v2] ref-filter: Add --no-contains option to tag/branch/for-each-ref

2017-03-09 Thread Christian Couder
On Thu, Mar 9, 2017 at 9:02 PM, Ævar Arnfjörð Bjarmason wrote: > > diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt > index 525737a5d8..4938496194 100644 > --- a/Documentation/git-tag.txt > +++ b/Documentation/git-tag.txt > @@ -12,7 +12,7 @@ SYNOPSIS > 'git tag' [-a | -s | -u ]

[PATCH v2 GSoC RFC] diff: allow "-" as a short-hand for "last branch"

2017-03-09 Thread mash
Just like "git merge -" is a short-hand for "git merge @{-1}" to conveniently merge the previous branch, "git diff -" is a short-hand for "git diff @{-1}" to conveniently diff against the previous branch. Allow the usage of "-" in the dot dot notation to allow the use of "git diff -..HEAD^" as a s

Re: RFC v3: Another proposed hash function transition plan

2017-03-09 Thread Jonathan Nieder
Hi, Shawn Pearce wrote: > On Mon, Mar 6, 2017 at 4:17 PM, Jonathan Nieder wrote: >> Alongside the packfile, a sha3 repository stores a bidirectional >> mapping between sha3 and sha1 object names. The mapping is generated >> locally and can be verified using "git fsck". Object lookups use this >>

Re: [PATCH 00/10] RFC Partial Clone and Fetch

2017-03-09 Thread Jonathan Tan
Overall, this fetch/clone approach seems reasonable to me, except perhaps some unanswered questions (some of which are also being discussed elsewhere): - does the server need to tell us of missing blobs? - if yes, does the server need to tell us their file sizes? - do we need to store the lis

Re: [PATCH] t2027: avoid using pipes

2017-03-09 Thread Christian Couder
On Thu, Mar 9, 2017 at 8:03 PM, Prathamesh Chavan wrote: > From: Prathamesh > > Whenever a git command is present in the upstream of a pipe, its failure > gets masked by piping and hence it should be avoided for testing the > upstream git command. By writing out the output of the git command to >

[PATCH v2] ref-filter: Add --no-contains option to tag/branch/for-each-ref

2017-03-09 Thread Ævar Arnfjörð Bjarmason
Change the tag, branch & for-each-ref commands to have a --no-contains option in addition to their longstanding --contains options. The use-case I have for this is to find the last-good rollout tag given a known-bad . Right now, given a hypothetically bad commit v2.10.1-3-gcf5c7253e0, you can find

[gsoc] regarding microproject

2017-03-09 Thread sourav mondal
hello, I want "add more built in patterns for userdiff " as my microproject. Hopefully I'll add some patterns for well known languages. thanks & regards, sourav

[RFC PATCH] help: add optional instructions for reporting bugs

2017-03-09 Thread Stefan Beller
Git is distributed in various ways by various organizations. The Git community prefers to have bugs reported on the mailing list, whereas other organizations may rather want to have filed a bug in a bug tracker or such. The point of contact is different by organization as well. When reporting bug

[PATCH] t2027: avoid using pipes

2017-03-09 Thread Prathamesh Chavan
From: Prathamesh Whenever a git command is present in the upstream of a pipe, its failure gets masked by piping and hence it should be avoided for testing the upstream git command. By writing out the output of the git command to a file, we can test the exit codes of both the commands as a failure

Re: RFC v3: Another proposed hash function transition plan

2017-03-09 Thread Shawn Pearce
On Mon, Mar 6, 2017 at 4:17 PM, Jonathan Nieder wrote: > Linus Torvalds wrote: >> On Fri, Mar 3, 2017 at 5:12 PM, Jonathan Nieder wrote: > >>> This document is still in flux but I thought it best to send it out >>> early to start getting feedback. >> >> This actually looks very reasonable if you

Re: [PATCH 04/10] upload-pack: add partial (sparse) fetch

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 01:34:32PM -0500, Jeff Hostetler wrote: > > > + partial = PKT-LINE("partial-by-size" SP magnitude) / > > > +PKT-LINE("partial-special) > > > + > > > > I probably would have added this as a capability coming back from the > > client, since it onl

[PATCH] t2027: avoid using pipes

2017-03-09 Thread Prathamesh Chavan
From: Prathamesh Whenever a git command is present in the upstream of a pipe, its failure gets masked by piping and hence it should be avoided for testing the upstream git command. By writing out the output of the git command to a file, we can test the exit codes of both the commands as a failure

Re: [PATCH] repack: Add options to preserve and prune old pack files

2017-03-09 Thread Martin Fick
On Thursday, March 09, 2017 10:50:21 AM jmel...@codeaurora.org wrote: > On 2017-03-07 13:33, Junio C Hamano wrote: > > James Melvin writes: > >> These options are designed to prevent stale file handle > >> exceptions during git operations which can happen on > >> users of NFS repos when repacking

Re: [PATCH 06/10] rev-list: add --allow-partial option to relax connectivity checks

2017-03-09 Thread Jeff Hostetler
On 3/9/2017 2:56 AM, Jeff King wrote: On Wed, Mar 08, 2017 at 03:10:54PM -0500, Jeff Hostetler wrote: Even though I do very much like the basic "high level" premise to omit often useless large blobs that are buried deep in the history we would not necessarily need from the initial cloning and

Re: [PATCH 04/10] upload-pack: add partial (sparse) fetch

2017-03-09 Thread Jeff Hostetler
On 3/9/2017 2:48 AM, Jeff King wrote: On Wed, Mar 08, 2017 at 05:37:59PM +, Jeff Hostetler wrote: diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt index c59ac99..0032729 100644 --- a/Documentation/technical/pack-protocol.txt +++ b/Documen

Re: [PATCH 02/10] pack-objects: add --partial-by-size=n --partial-special

2017-03-09 Thread Jeff Hostetler
On 3/9/2017 2:31 AM, Jeff King wrote: On Wed, Mar 08, 2017 at 05:37:57PM +, Jeff Hostetler wrote: From: Jeff Hostetler Teach pack-objects to omit blobs from the generated packfile. When the --partial-by-size=n[kmg] argument is used, only blobs smaller than the requested size are includ

Re: [PATCH v2 03/11] submodule deinit: use most reliable url

2017-03-09 Thread Brandon Williams
On 03/08, Stefan Beller wrote: > On Wed, Mar 8, 2017 at 5:23 PM, Brandon Williams wrote: > > The user could have configured the submodule to have a different URL > > from the one in the superproject's config. To account for this read > > what the submodule has configured for remote.origin.url and

Re: git commit --interactive patch-mode no longer allows selecting files

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 06:48:58PM +0100, Jörn Hees wrote: > i'm not entirely sure if this is a bug or intended (couldn't find it in the > changelogs though)... > > Before 2.12.0 a `git commit --int` / `git add --int` followed by [p] > for patch-mode, would allow a numeric selection of the files

Re: [PATCH v2 0/2] Remove duplicate code from module_clone()

2017-03-09 Thread Brandon Williams
On 03/09, Valery Tolstov wrote: > > The usual protocol would be to rebase off of Stefan's series and build > > on that (assuming you have a dependency against his series), indicating > > that you are doing as such in your cover letter. > > So, should I send only my patch, or current format (patch

Re: [PATCH v3 2/2] submodule--helper.c: remove duplicate code

2017-03-09 Thread Brandon Williams
On 03/09, Valery Tolstov wrote: > Remove code fragment from module_clone that duplicates functionality > of connect_work_tree_and_git_dir in dir.c > > Signed-off-by: Valery Tolstov Looks good. -- Brandon Williams

git commit --interactive patch-mode no longer allows selecting files

2017-03-09 Thread Jörn Hees
Hi, i'm not entirely sure if this is a bug or intended (couldn't find it in the changelogs though)... Before 2.12.0 a `git commit --int` / `git add --int` followed by [p] for patch-mode, would allow a numeric selection of the files to patch hunks for (this behavior is well documented all over

Re: [PATCH 03/10] pack-objects: test for --partial-by-size --partial-special

2017-03-09 Thread Johannes Sixt
Am 08.03.2017 um 18:37 schrieb Jeff Hostetler: +test_expect_success 'setup' ' + perl -e "print \"a\" x 11;" > a && + perl -e "print \"a\" x 1100;"> b && + perl -e "print \"a\" x 110;" > c && If the file contents do not matter, you can have the same without perl l

Re: [PATCH v2 07/11] submodule update: add `--init-active` switch

2017-03-09 Thread Brandon Williams
On 03/08, Stefan Beller wrote: > On Wed, Mar 8, 2017 at 5:23 PM, Brandon Williams wrote: > > The new switch `--init-active` initializes the submodules which are > > configured in `submodule.active` instead of those given as > > command line arguments before updating. In the first implementation th

Re: [PATCH v2 10/11] submodule--helper init: set submodule..active

2017-03-09 Thread Brandon Williams
On 03/08, Stefan Beller wrote: > On Wed, Mar 8, 2017 at 5:23 PM, Brandon Williams wrote: > > When initializing a submodule set the submodule..active config to > > true to indicate that the submodule is active. > > So by this patch an init of a submodule performs both > a "regular init" (copy URL

Re: [PATCH] repack: Add options to preserve and prune old pack files

2017-03-09 Thread jmelvin
On 2017-03-07 13:33, Junio C Hamano wrote: James Melvin writes: These options are designed to prevent stale file handle exceptions during git operations which can happen on users of NFS repos when repacking is done on them. The strategy is to preserve old pack files around until the next repac

Re: [PATCH GSoC] Allow "-" as a short-hand for "@{-1}" in branch deletions

2017-03-09 Thread Stefan Beller
Welcome to the Git community! On Wed, Mar 8, 2017 at 7:31 PM, Shuyang Shi wrote: > The "-" shorthand that stands for "the branch we were previously on", > like we did for "git merge -" sometime after we introduced "git checkout -". > Now I am introducing this shorthand to branch delete, i.e. > "g

Re: [PATCH 2/2] Fix callsites of real_pathdup() that wanted it to die on error

2017-03-09 Thread René Scharfe
Am 09.03.2017 um 12:24 schrieb Johannes Schindelin: While I would have agreed earlier that René's patch looks less intrusive, I have to point out that there would not have been any possible regression if the original patch had introduced the die_on_error parameter. It would have made the contract

Re: diff.ignoreSubmoudles config setting broken?

2017-03-09 Thread Sebastian Schuberth
On Wed, Mar 8, 2017 at 9:54 PM, Junio C Hamano wrote: > Between these two: > > git -c diff.ignoresubmodules=all diff > git diff --ignore-submodules=all > > one difference is that the latter disables reading extra config from > .gitmodules (!) while the former makes the command hon

Re: [PATCH 01/10] pack-objects: eat CR in addition to LF after fgets.

2017-03-09 Thread Jeff Hostetler
On 3/9/2017 2:01 AM, Jeff King wrote: On Wed, Mar 08, 2017 at 05:37:56PM +, Jeff Hostetler wrote: From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/pack-objects.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 03:52:09PM +0100, Ævar Arnfjörð Bjarmason wrote: > - filter->with_commit_tag_algo = 1; > + if ((filter->merge_commit + filter->with_commit + > filter->no_commit) > 1) > + filter->with_commit_tag_algo = 0; > + else > + filter->wi

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 9, 2017 at 1:51 PM, Jeff King wrote: > On Thu, Mar 09, 2017 at 01:12:08PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> > I'm almost certain this is because the contains_tag_algo one doesn't >> > clean up the flag bits it sets on the commit objects. So running it >> > twice in the same pr

[PATCH 4/4] ref-filter: use separate cache for contains_tag_algo

2017-03-09 Thread Jeff King
The algorithm which powers "tag --contains" uses the TMP_MARK and UNINTERESTING bits, but never cleans up after itself. As a result, stale UNINTERESTING bits may impact later traversals (like "--merged"). We could fix this by clearing the bits after we're done with the --contains traversal. That w

[PATCH 3/4] ref-filter: die on parse_commit errors

2017-03-09 Thread Jeff King
The tag-contains algorithm quietly returns "does not contain" when parse_commit() fails. But a parse failure is an indication that the repository is corrupt. We should die loudly rather than producing a bogus result. Signed-off-by: Jeff King --- ref-filter.c | 4 +--- 1 file changed, 1 insertion

[PATCH 2/4] ref-filter: use contains_result enum consistently

2017-03-09 Thread Jeff King
Commit cbc60b672 (git tag --contains: avoid stack overflow, 2014-04-24) adapted the -1/0/1 contains status into a tri-state enum. However, some of the code still used the numeric values, or assumed that no/yes correspond to C's boolean true/false. Let's switch to using the symbolic values everywhe

[PATCH 1/4] ref-filter: move ref_cbdata definition into ref-filter.c

2017-03-09 Thread Jeff King
This is an implementation detail of how filter_refs() works, and does not need to be exposed to the outside world. This will become more important in future patches as we add new private data types to it. Signed-off-by: Jeff King --- ref-filter.c | 5 + ref-filter.h | 5 - 2 files change

[PATCH 0/4] fix object flag pollution in "tag --contains"

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 07:51:32AM -0500, Jeff King wrote: > Looking at this, I'm pretty sure that using "--contains" with "--merged" > has similar problems, as they both use the UNINTERESTING bit. So even > without your patch, there is a lurking bug. I wasn't able to come up with a simple case t

Re: [GSOC] Regarding microprojects for gsoc 2017

2017-03-09 Thread Christian Couder
On Thu, Mar 9, 2017 at 2:14 PM, Avinash Tiwary wrote: > [GSOC] > Sir, i am interested in git projects and i want to complete one of the git > microprojects. But i am unable to figure out which git repo they are talking > about. Since , there is no link provided. Please help On the microproject pa

Re: [PATCH] branch: honor --abbrev/--no-abbrev in --list mode

2017-03-09 Thread Jakub Narębski
W dniu 08.03.2017 o 23:16, Junio C Hamano pisze: > diff --git a/builtin/branch.c b/builtin/branch.c > index cbaa6d03c0..537c47811a 100644 > --- a/builtin/branch.c > +++ b/builtin/branch.c > @@ -335,9 +335,18 @@ static char *build_format(struct ref_filter *filter, int > maxwidth, const char *r >

Re: [PATCH] branch & tag: Add a --no-contains option

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 01:12:08PM +0100, Ævar Arnfjörð Bjarmason wrote: > > I'm almost certain this is because the contains_tag_algo one doesn't > > clean up the flag bits it sets on the commit objects. So running it > > twice in the same process is going to give you nonsense results. > > Yeah i

Re: [PATCH v2] t2027: avoid using pipes

2017-03-09 Thread Christian Couder
On Thu, Mar 9, 2017 at 10:53 AM, Prathamesh Chavan wrote: > Whenever a git command is present in the upstream of a pipe, its failure > gets masked by piping and hence it should be avoided for testing the > upstream git command. By writing out the output of the git command to > a file, we can test

Re: [PATCH v5 07/24] files-backend: add and use files_refname_path()

2017-03-09 Thread Michael Haggerty
On 02/22/2017 03:04 PM, Nguyễn Thái Ngọc Duy wrote: > Keep repo-related path handling in one place. This will make it easier > to add submodule/multiworktree support later. > > This automatically adds the "if submodule then use the submodule version > of git_path" to other call sites too. But it d

  1   2   >