On Mon, Apr 23 2018, Eric Sunshine wrote:
> On Sun, Apr 22, 2018 at 9:17 PM, Taylor Blau wrote:
> One important issue I noticed is that patch 3/7 neglects to update
> grep.c:init_grep_defaults() to initialize opt.color_columnno.
I think this is fine for fields that are 0 by default, since the s
On Mon, Apr 23, 2018 at 3:27 AM, Ævar Arnfjörð Bjarmason
wrote:
> On Mon, Apr 23 2018, Eric Sunshine wrote:
>> One important issue I noticed is that patch 3/7 neglects to update
>> grep.c:init_grep_defaults() to initialize opt.color_columnno.
>
> I think this is fine for fields that are 0 by defau
On Mon, Apr 23 2018, Taylor Blau wrote:
> For your consideration: https://github.com/ttaylorr/git/compare/tb/grep-colno
Looks good to me aside from two minor issues I noticed:
* In "grep.c: display column number of first match" you use a comment
style we don't normally use, i.e. /**\n not /
Junio C Hamano writes:
> Nguyễn Thái Ngọc Duy writes:
>
> > +category_list () {
> > + command_list "$1" | awk '{print $2;}' | sort | uniq
> > +}
>
> Piping output of awk to sort/uniq, instead of processing all inside
> awk within the END block of the script, means that we are wasting
> two
> Junio C Hamano writes:
>
> > Nguyễn Thái Ngọc Duy writes:
> >
> > > +category_list () {
> > > + command_list "$1" | awk '{print $2;}' | sort | uniq
> > > +}
> >
> > Piping output of awk to sort/uniq, instead of processing all inside
> > awk within the END block of the script, means that we
Hi Philip,
On Sun, 22 Apr 2018, Philip Oakley wrote:
> is this part of your series "argv_array: offer to split a string by
> whitespace"?
>
> https://public-inbox.org/git/capig+ctdbttuefymkntm773ebge14tpic4g4xefusvwsypd...@mail.gmail.com/
>
> - Original Message - From:
> Sent: Saturday
On Sat, Apr 21, 2018 at 6:54 PM, Nguyễn Thái Ngọc Duy wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy
Oh, look, an empty commit message! :)
So what does this option do and why use it in the completion script?
Hi Philip,
On Sun, 22 Apr 2018, Philip Oakley wrote:
> From: "Johannes Schindelin"
> > This patch is part of the effort to reimplement `--preserve-merges` with
> > a substantially improved design, a design that has been developed in the
> > Git for Windows project to maintain the dozens of Windo
Hi Phillip,
On Sat, 21 Apr 2018, Phillip Wood wrote:
> On 21/04/18 11:33, Johannes Schindelin wrote:
> > This patch is part of the effort to reimplement `--preserve-merges` with
> > a substantially improved design, a design that has been developed in the
> > Git for Windows project to maintain th
Hi Phillip,
On Sun, 22 Apr 2018, Phillip Wood wrote:
> On 21/04/18 16:56, Phillip Wood wrote:
> > On 21/04/18 11:33, Johannes Schindelin wrote:
> >> This patch is part of the effort to reimplement `--preserve-merges` with
> >> a substantially improved design, a design that has been developed in t
On 4/20/2018 1:26 PM, Elijah Newren wrote:
On Fri, Apr 20, 2018 at 10:02 AM, Elijah Newren wrote:
On Fri, Apr 20, 2018 at 6:36 AM, Ben Peart wrote:
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -37,6 +37,11 @@ merge.renameLimit::
during a merge; if no
On 4/22/2018 8:07 AM, Eckhard Maaß wrote:
On Fri, Apr 20, 2018 at 11:34:25AM -0700, Elijah Newren wrote:
Sorry, I think I wasn't being clear. The documentation for the config
options for e.g. diff.renameLimit, fetch.prune, log.abbrevCommit, and
merge.ff all mention the equivalent command line
On 4/20/2018 2:34 PM, Elijah Newren wrote:
Hi Ben,
On Fri, Apr 20, 2018 at 10:59 AM, Ben Peart wrote:
On 4/20/2018 1:02 PM, Elijah Newren wrote:
On Fri, Apr 20, 2018 at 6:36 AM, Ben Peart
wrote:
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -37,6 +37,11 @
On Sat, Apr 21, 2018 at 6:54 PM, Nguyễn Thái Ngọc Duy wrote:
> This is useful for git-completion.bash because it needs this set of
> commands. Right now we have to maintain a separate command category in
> there.
I don't really understand this paragraph, in particular its second
sentence. I woul
Christian Couder writes:
> On Sat, Apr 21, 2018 at 5:13 AM, Junio C Hamano wrote:
>
>> @@ -388,6 +389,9 @@ int cmd_gc(int argc, const char **argv, const char
>> *prefix)
>> if (argc > 0)
>> usage_with_options(builtin_gc_usage, builtin_gc_options);
>>
>> + if (prune
Taylor Blau writes:
>> It seems that these two used to be "even when it is configured not
>> to show linenumber, with -n it is shown and without -n it is not,
>> when the new --column-number feature forces the command to show the
>> "filename plus colon plus location info plus coon" header. I'm
On 4/21/2018 4:44 PM, Jakub Narebski wrote:
Jakub Narebski writes:
Derrick Stolee writes:
On 4/11/2018 3:32 PM, Jakub Narebski wrote:
What would you suggest as a good test that could imply performance? The
Google Colab notebook linked to above includes a function to count
number of commits (
Taylor Blau writes:
> For now, the Message-ID that I was referring to is:
> 20180410001826.GB67209@syl.local. [1]
Thanks.
On 04/17/2018 02:39 PM, Ben Peart wrote:
On 4/17/2018 12:34 PM, Jameson Miller wrote:
100K
Test baseline [4] block_allocation
0002.1: read_cache/discard_cache 1 times
I am Flordevilla Pingkian,Please reconfirm this massage and get back
to me.via (flord_p...@usa.com)
Regards segt Flordevilla
On 4/18/2018 5:02 PM, Jakub Narebski wrote:
Here I can offer only the cursory examination, as I don't know this area
of code in question.
Derrick Stolee writes:
A commit A can reach a commit B only if the generation number of A
is larger than the generation number of B. This condition allows
On 4/18/2018 6:15 PM, Jakub Narebski wrote:
Derrick Stolee writes:
The containment algorithm for 'git branch --contains' is different
from that for 'git tag --contains' in that it uses is_descendant_of()
instead of contains_tag_algo(). The expensive portion of the branch
algorithm is computing
On 4/18/2018 7:19 PM, Jakub Narebski wrote:
Derrick Stolee writes:
[...]
[...], and this saves time during 'git branch --contains' queries
that would otherwise walk "around" the commit we are inspecting.
If I understand the code properly, what happens is that we can now
short-circuit if all
Hello,
A coworker of mine was trying to use git difftool in a repository with
submodules and we found that it only shows the change in the subproject commit
hash. The option to show the changes in the contents of the submodules exists
for git diff. Can this be added to difftool as well?
Thank
On 4/18/2018 8:02 PM, Jakub Narebski wrote:
Derrick Stolee writes:
Most code paths load commits using lookup_commit() and then
parse_commit(). In some cases, including some branch lookups, the commit
is parsed using parse_object_buffer() which side-steps parse_commit() in
favor of parse_commit
On 4/18/2018 8:04 PM, Jakub Narebski wrote:
Derrick Stolee writes:
-- >8 --
This is the one of several "small" patches that follow the serialized
Git commit graph patch (ds/commit-graph) and lazy-loading trees
(ds/lazy-load-trees).
As described in Documentation/technical/commit-graph.txt, th
On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck wrote:
> On 2018-04-18 21:51, SZEDER Gábor wrote:
>>
>> On Tue, Apr 10, 2018 at 10:28 PM, Florian Gamböck wrote:
>>>
>>> Adding external subcommands to Git is as easy as to put an executable
>>> file git-foo into PATH. Packaging such subcommands fo
On 23/04/18 13:20, Johannes Schindelin wrote:
Hi Phillip,
On Sat, 21 Apr 2018, Phillip Wood wrote:
On 21/04/18 11:33, Johannes Schindelin wrote:
This patch is part of the effort to reimplement `--preserve-merges` with
a substantially improved design, a design that has been developed in the
Gi
On 4/21/2018 12:23 AM, Junio C Hamano wrote:
Elijah Newren writes:
+merge.renames::
+ Whether and how Git detects renames. If set to "false",
+ rename detection is disabled. If set to "true", basic rename
+ detection is enabled. This is the default.
One can already cont
On 04/18/2018 12:49 AM, Junio C Hamano wrote:
Jameson Miller writes:
This patch series improves the performance of loading indexes by
reducing the number of malloc() calls. ...
Jameson Miller (5):
read-cache: teach refresh_cache_entry to take istate
Add an API creating / discarding ca
Hello all,
We are seeing intermittent errors with Git 2.16.2.windows.1 on Windows 7
connecting to TFS 2017 (running in a Jenkins slave process):
ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException:
Command "C:\tools\Git\bin\git.exe fetch --tags --progress
https://inte
Hi, Eric,
On Sun, Apr 22, 2018 at 12:37 AM, Eric Sunshine wrote:
> On Sun, Apr 22, 2018 at 1:15 AM, Igor Korot wrote:
>> MyMac:git-2.17.0 igorkorot$ cat config.mak
>> NO_GETTEXT=Yes
>> NO_OPENSSL=Yes
>>
>> MyMac:dbhandler igorkorot$ /Users/igorkorot/git-2.17.0/git pull
>> fatal: unable to access
Hi, Brian,
On Sun, Apr 22, 2018 at 12:49 PM, brian m. carlson
wrote:
> On Sun, Apr 22, 2018 at 12:10:20AM -0700, Perry Hutchison wrote:
>> Eric Sunshine wrote:
>> > On Sun, Apr 22, 2018 at 1:15 AM, Igor Korot wrote:
>> > > MyMac:git-2.17.0 igorkorot$ cat config.mak
>> > > NO_GETTEXT=Yes
>> > >
On 04/20/2018 01:49 PM, Stefan Beller wrote:
base-commit: cafaccae98f749ebf33495aec42ea25060de8682
I couldn't quite figure out what these five patches were based on,
even with this line. Basing on and referring to a commit that is
not part of our published history with "base-commit" is not a
On Mon, Apr 23, 2018 at 12:31 PM, Igor Korot wrote:
> 1. Is the file name "config.mak" or "config.make"?
"config.mak"
> 2. Do I have to do "make clean" or just remove the line and o "make"?
"make clean" would not hurt.
Hi,
On Sun, Apr 22, 2018 at 5:38 AM, Duy Nguyen wrote:
>> - there's a better, more performant fix or there is some way to actually
>> share a split_index between two independent index_state objects.
>
> A cleaner way of doing this would be something to the line [1]
>
> move_index_extens
On 04/20/2018 07:34 PM, Jonathan Tan wrote:
On Tue, 17 Apr 2018 16:34:39 +
Jameson Miller wrote:
Jameson Miller (5):
read-cache: teach refresh_cache_entry to take istate
Add an API creating / discarding cache_entry structs
mem-pool: fill out functionality
Allocate cache entri
On Mon, Apr 23, 2018 at 9:44 AM, Jameson Miller
wrote:
> I would be interested to understand how the
> mem_pool would fit your needs, and if it is sufficient or needs modification
> for your use cases.
>
>> [1] proof of concept in patches nearby
>> https://public-inbox.org/git/20180206001749.21894
On 04/20/2018 07:21 PM, Jonathan Tan wrote:
On Tue, 17 Apr 2018 16:34:42 +
Jameson Miller wrote:
@@ -19,8 +19,27 @@ struct mem_pool {
/* The total amount of memory allocated by the pool. */
size_t pool_alloc;
+
+ /*
+* Array of pointers to "custom size" memor
On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren wrote:
> Additional testing:
>
> * I've re-merged all ~13k merge commits in git.git with both
> git-2.17.0 and this version of git, comparing the results to each
> other in detail. (Including stdout & stderr, as well as the output
> of
On 2018-04-23 17:12, SZEDER Gábor wrote:
On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck
wrote:
On 2018-04-18 21:51, SZEDER Gábor wrote:
Would it be possible to use _xfunc() instead to plug that hole? It
seems the be tricky, because that function not only sources but also
_calls_ the comple
On Mon, Apr 23, 2018 at 7:09 PM, Elijah Newren wrote:
> Hi,
>
> On Sun, Apr 22, 2018 at 5:38 AM, Duy Nguyen wrote:
>>> - there's a better, more performant fix or there is some way to actually
>>> share a split_index between two independent index_state objects.
>>
>> A cleaner way of doing t
On Mon, Apr 23, 2018 at 11:13:41AM -0500, Jason B. Nance wrote:
> Hello all,
>
> We are seeing intermittent errors with Git 2.16.2.windows.1 on Windows
> 7 connecting to TFS 2017 (running in a Jenkins slave process):
>
> ERROR: Error cloning remote repo 'origin'
> hudson.plugins.git.GitEx
Hi,
Antonio Ospite wrote:
> vcsh[1] uses bare git repositories and detached work-trees to manage
> *distinct* sets of configuration files directly into $HOME.
Cool! I like the tooling you're creating for this, though keep in mind
that Git has some weaknesses as a tool for deployment.
In partic
On Mon, 23 Apr 2018 13:27:09 -0400
Jameson Miller wrote:
> > This seems overly complicated - the struct mem_pool already has a linked
> > list of pages, so couldn't you create a custom page and insert it behind
> > the current front page instead whenever you needed a large-size page?
>
> Yes - t
Hi Junio,
On Thu, Apr 19, 2018 at 8:05 PM, Junio C Hamano wrote:
>> On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren wrote:
>>> This series is a reboot of the directory rename detection series that was
>>> merged to master and then reverted due to the final patch having a buggy
>>> can-skip-updat
On Mon, Apr 23, 2018 at 10:37 AM, Duy Nguyen wrote:
>>> [1] To me the second parameter should be src_index, not dst_index.
>>> We're copying entries from _source_ index to "result" and we should
>>> also copy extensions from the source index. That line happens to work
>>> only when dst_index is th
On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin
wrote:
> Eric Sunshine pointed out that I had such a commit message in
> https://public-inbox.org/git/CAPig+cRrS0_nYJJY=o6cbov630snqhpv5qgrqdd8mw-syzn...@mail.gmail.com/
> and I went on a hunt to figure out how the heck this happened.
>
> Turns
On 04/23/2018 01:49 PM, Jonathan Tan wrote:
On Mon, 23 Apr 2018 13:27:09 -0400
Jameson Miller wrote:
This seems overly complicated - the struct mem_pool already has a linked
list of pages, so couldn't you create a custom page and insert it behind
the current front page instead whenever you n
On 04/23, Eric Sunshine wrote:
> On Sun, Apr 15, 2018 at 4:29 PM, Thomas Gummerer wrote:
> > Currently 'git worktree add' produces output like the following:
> >
> > Preparing ../foo (identifier foo)
> > HEAD is now at 26da330922
> > [...]
> > Instead of this message, print a message that
On 04/16, Junio C Hamano wrote:
> Thomas Gummerer writes:
>
> > Currently 'git worktree add' produces output like the following:
> >
> > Preparing ../foo (identifier foo)
> > HEAD is now at 26da330922
> >
> > The '../foo' is the path where the worktree is created, which the user
> > has
Hi Johannes,
On Fri, Apr 20, 2018 at 3:21 PM, Johannes Schindelin
wrote:
> @@ -250,27 +257,38 @@ static void import_object(struct object_id *oid, enum
> object_type type,
> - if (strbuf_read(&result, cmd.out, 41) < 0)
> - die_errno("unable to read from mktree"
On Sat, Apr 21, 2018 at 2:43 AM, Johannes Schindelin
wrote:
> It is fragile, as there is no way for the revision machinery to say "but
> now I want to traverse the graph ignoring the graft file" e.g. when
> pushing commits to a remote repository (which, as a consequence, can
> miss commits).
>
> A
Hi Oshaben!
On Mon, Apr 23, 2018 at 7:49 AM, Oshaben Nicholas
wrote:
> Hello,
>
> A coworker of mine was trying to use git difftool in a repository with
> submodules and we found that it only shows the change in the subproject
> commit hash. The option to show the changes in the contents of the
Thanks Eric and Junio for the review the suggestions in the last
round.
Previous rounds are at <20180121120208.12760-1-t.gumme...@gmail.com>,
<20180204221305.28300-1-t.gumme...@gmail.com>,
<20180317220830.30963-1-t.gumme...@gmail.com>,
<2018031719.4940-1-t.gumme...@gmail.com>,
<20180325134947.
There are two members of 'struct add_opts', which are only used inside
the 'add()' function, but being part of 'struct add_opts' they are
needlessly also passed to the 'add_worktree' function.
Make them local to the 'add()' function to make it clearer where they
are used.
Signed-off-by: Thomas Gu
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 given.
However we can do a little better than that, and check the branch out if
it is n
Factor out a dwim_branch function, which takes care of the dwim'ery in
'git worktree add '. It's not too much code currently, but we're
adding a new kind of dwim in a subsequent patch, at which point it makes
more sense to have it as a separate function.
Factor it out now to reduce the patch nois
Currently 'git worktree add' produces output like the following:
Preparing ../foo (identifier foo)
HEAD is now at 26da330922
The '../foo' is the path where the worktree is created, which the user
has just given on the command line. The identifier is an internal
implementation detail, wh
On 23/04/18 19:11, Stefan Beller wrote:
On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin
wrote:
Eric Sunshine pointed out that I had such a commit message in
https://public-inbox.org/git/CAPig+cRrS0_nYJJY=o6cbov630snqhpv5qgrqdd8mw-syzn...@mail.gmail.com/
and I went on a hunt to figure out
Thank you Andreas,
Is there a way to use git bash completion with "M-x shell"?
Marko
On Mon, Apr 16, 2018 at 11:25 AM, Andreas Schwab wrote:
> On Apr 16 2018, Marko Vasic wrote:
>
>> Git bash completion script works perfectly under the terminal,
>> however, it does not work in Emacs (neither s
On 2018-04-23 18:53, Eric Sunshine wrote:
On Mon, Apr 23, 2018 at 12:31 PM, Igor Korot wrote:
1. Is the file name "config.mak" or "config.make"?
"config.mak"
I am confused, I have these file in my tree:
config.mak.in config.mak.uname Makefile
Setting options is documentend in Makefile
On Fri, Apr 13, 2018 at 07:01:29PM +0200, Michał Górny wrote:
> Currently git does not control mtimes of files being checked out. This
> means that the only assumption you could make is that all files created
> or modified within a single checkout action will have mtime between
> start time and en
From: "Johannes Schindelin" : Monday, April 23,
2018 1:03 PM
Subject: Re: [PATCH v8 06/16] sequencer: introduce the `merge` command
Hi Philip,
[...]
> label onto
>
> # Branch abc
> reset onto
Is this reset strictly necessary. We are already there @head.
No, this is not strictly necess
Hi Git community,
This year we'll participate once again in Google Summer or Code!
We'll have 3 students and 3 mentors, which is more than in recent years.
Paul-Sebastian Ungureanu mentored by DScho, wants to convert git-stash
into a builtin.
Alban Gruin and Pratik Karki want to convert parts of
On Mon, Apr 23, 2018 at 3:58 PM, Totsten Bögershausen wrote:
> On 2018-04-23 18:53, Eric Sunshine wrote:
>> On Mon, Apr 23, 2018 at 12:31 PM, Igor Korot wrote:
>>> 1. Is the file name "config.mak" or "config.make"?
>>
>> "config.mak"
>
> I am confused, I have these file in my tree:
> config.mak.i
Eric,
On Mon, Apr 23, 2018 at 4:04 PM, Eric Sunshine wrote:
> On Mon, Apr 23, 2018 at 3:58 PM, Totsten Bögershausen wrote:
>> On 2018-04-23 18:53, Eric Sunshine wrote:
>>> On Mon, Apr 23, 2018 at 12:31 PM, Igor Korot wrote:
1. Is the file name "config.mak" or "config.make"?
>>>
>>> "config
On Mon, Apr 23, 2018 at 09:15:09AM -0400, Ben Peart wrote:
> In commit 2a2ac926547 when merge.renamelimit was added, it was decided to
> have separate settings for merge and diff to give users the ability to
> control that behavior. In this particular case, it will default to the
> value of diff.r
Derrick Stolee writes:
> On 4/18/2018 7:19 PM, Jakub Narebski wrote:
>> Derrick Stolee writes:
>>
> [...]
>>> [...], and this saves time during 'git branch --contains' queries
>>> that would otherwise walk "around" the commit we are inspecting.
>>>
>> If I understand the code properly, what happ
Teach ls-remote to optionally accept server options by specifying them
on the cmdline via '-o' or '--server-option'. These server options are
sent to the remote end when querying for the remote end's refs using
protocol version 2.
If communicating using a protocol other than v2 the provided optio
Introduce the "server-option" capability to protocol version 2. This
enables future clients the ability to send server specific options in
command requests when using protocol version 2.
Signed-off-by: Brandon Williams
---
Documentation/technical/protocol-v2.txt | 10 ++
serve.c
Teach fetch to optionally accept server options by specifying them on
the cmdline via '-o' or '--server-option'. These server options are
sent to the remote end when performing a fetch communicating using
protocol version 2.
If communicating using a protocol other than v2 the provided options are
Building on top of protocol version 2 this series adds the ability to
optionally send server specific options when using protocol v2. This
resembles the "push-options" feature except server options are sent as
capability lines during a command request allowing for all current and
future commands to
On 04/23, Brandon Williams wrote:
> Building on top of protocol version 2 this series adds the ability to
> optionally send server specific options when using protocol v2. This
> resembles the "push-options" feature except server options are sent as
> capability lines during a command request allow
Hi,
Johannes Sixt wrote:
> Am 05.12.2017 um 22:35 schrieb Junio C Hamano:
> > Dan Jacques writes:
>>> Thanks for checking! The patch that you quoted above looks like it's from
>>> this "v4" thread; however, the patch that you are diffing against in your
>>> latest reply seems like it is from an
Ben Peart writes:
>> I also had to wonder how "merge -s resolve" faired, if the project
>> is not interested in renamed paths at all.
>>
>
> To be clear, it isn't that we're not interested in detecting renamed
> files and paths. We're just opposed to it taking an hour to figure
> that out!
Yeah
Junio noticed that this variable is not quoted correctly when it is
passed to sed. As a shell-quoted string, it should be inside
single-quotes like $(perllibdir_relative_SQ), not outside them like
$INSTLIBDIR.
In fact, this substitution variable is not used. Simplify by removing
it.
Reported-by
f6a0ad4b (Makefile: generate Perl header from template file,
2018-04-10) moved code for generating the 'use lib' lines at the top
of perl scripts from the $(SCRIPT_PERL_GEN) rule to a separate
GIT-PERL-HEADER rule.
This rule first populates INSTLIBDIR and then substitutes it into the
GIT-PERL-HEAD
Igor Korot wrote:
> This laptop is old and doesn't have too big of a hard drive.
> And I'm trying to create a big program
Building OpenSSL via homebrew or MacPorts would likely take less
space than building all of git that way, but if even that is
too much perhaps it is time to consider moving th
In various places throughout the codebase, we need to read data into a
struct object_id from a pack or other unsigned char buffer. Add an
inline function that does this based on the current hash algorithm in
use, and use it in several places.
Signed-off-by: brian m. carlson
---
cache-tree.c |
This is the thirteenth series of patches to convert to struct object_id
and the_hash_algo.
The series adds an oidread function to read object IDs from a buffer,
removes unused structure members (which therefore don't require
conversion), converts various functions to struct object_id, and
improves
Adjust struct index_state to use struct object_id instead of unsigned
char [20].
Signed-off-by: brian m. carlson
---
cache.h | 2 +-
read-cache.c | 16
t/helper/test-dump-split-index.c | 2 +-
unpack-trees.c | 2 +
Convert the code that looks up cached objects to use struct object_id.
Adjust the lookup for empty trees to use the_hash_algo. Note that we
don't need to be concerned about the hard-coded object ID in the
empty_tree object since we never use it.
Signed-off-by: brian m. carlson
---
sha1_file.c |
Convert the various functions for freshening objects and
has_loose_object_nonlocal to use struct object_id.
Signed-off-by: brian m. carlson
---
builtin/pack-objects.c | 2 +-
cache.h| 2 +-
sha1_file.c| 36 ++--
3 files changed, 20 in
The interactive add script hard-codes the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value when used
and cache it for any future uses.
Signed-off-by: brian m. carlson
---
git-add--interactive.perl | 11 +--
1 file changed, 9 insertions(+), 2 del
The tree member of struct object_context is unused except in one place
where we write to it. Since there are no users of this member, remove
it.
Signed-off-by: brian m. carlson
---
cache.h | 1 -
sha1_name.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/cache.h b/cache.h
index 4bca17
There really isn't any case in which we want to expose the constants for
empty trees and blobs outside of using the hash algorithm abstraction.
Make these constants static and stop exposing the defines in cache.h.
Remove the constants which are no longer in use.
Signed-off-by: brian m. carlson
--
Instead of using hard-coded instances of the constant 20, use
the_hash_algo to look up the correct constant.
Signed-off-by: brian m. carlson
---
builtin/pack-objects.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/builtin/pack-objects.c b/bu
Convert the exclude_sha1 member of struct untracked_cache_dir and rename
it to exclude_oid. Eliminate several hard-coded integral constants, and
update a function name that referred to SHA-1.
Signed-off-by: brian m. carlson
---
dir.c| 23 ---
To avoid dependency on a particular hash algorithm, convert a use of
EMPTY_TREE_SHA1_HEX to use the_hash_algo->empty_tree instead. Since
both branches now use oid_to_hex, condense the if statement into a
ternary.
Signed-off-by: brian m. carlson
---
merge.c | 5 +
1 file changed, 1 insertion
Convert struct llist_item and the rest of the linked list code to use
struct object_id. Add a use of GIT_MAX_HEXSZ to avoid a dependency on a
hard-coded constant.
Signed-off-by: brian m. carlson
---
builtin/pack-redundant.c | 50 +---
1 file changed, 26 inser
To ensure that we are hash algorithm agnostic, use the_hash_algo to look
up the object ID for the empty tree instead of using the empty_tree_oid
variable.
Signed-off-by: brian m. carlson
---
sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
Use the_hash_algo to find the right size for parsing pack names.
Signed-off-by: brian m. carlson
---
http.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/http.c b/http.c
index 3034d10b68..ec70676748 100644
--- a/http.c
+++ b/http.c
@@ -2047,7 +2047,8 @@ int http
Several of our shell scripts hard-code the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value on
startup of the script. For performance, store the value in a variable
and reuse it throughout the life of the script.
Signed-off-by: brian m. carlson
---
git
The sha1 member in struct pack_entry is unused except for one instance
in which we store a value in it. Since nobody ever reads this value,
don't bother to compute it and remove the member from struct pack_entry.
Signed-off-by: brian m. carlson
---
cache.h| 1 -
packfile.c | 1 -
2 files ch
Convert find_pack_entry and the static function fill_pack_entry to take
pointers to struct object_id.
Signed-off-by: brian m. carlson
---
packfile.c | 12 ++--
packfile.h | 2 +-
sha1_file.c | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/packfile.c b/pac
The head member of struct pack_info is completely unused and the
nr_heads member is used only in one place, which is an assignment.
Since these structure members are not useful, remove them.
Signed-off-by: brian m. carlson
---
server-info.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/s
Replace two uses of the hard-coded constant 40 with references to
the_hash_algo.
Signed-off-by: brian m. carlson
---
revision.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index ce0e7b71f2..daf7fe6ff4 100644
--- a/revision.c
+++ b/revision.c
@
Convert several uses of EMPTY_TREE_SHA1_HEX to use oid_to_hex and
the_hash_algo to avoid a dependency on a given hash algorithm.
Signed-off-by: brian m. carlson
---
submodule.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/submodule.c b/submodule.c
index 9a50168b23..2
Use the GIT_SHA1_RAWSZ and GIT_SHA1_HEXSZ macros instead of hard-coding
the constants 20 and 40. Switch one use of 20 with a format specifier
for a hex value to use the hex constant instead, as the original appears
to have been a typo.
At this point, avoid converting the hard-coded use of SHA-1 t
1 - 100 of 179 matches
Mail list logo