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:
> >
> >
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
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
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
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
> 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
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.
> > "
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
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
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
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
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
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
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,
> +
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:
>
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
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.
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +
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
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
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
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
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
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
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
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
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
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
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
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[
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
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
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
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
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
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
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
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
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
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
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
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 ]
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
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
>>
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
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
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>
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
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
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 - 100 of 117 matches
Mail list logo