Re: I suggest a new feature: One copy from files

2017-04-23 Thread Samuel Lijin
Looping the listserv back in, didn't realize this had gone off thread. I'm not sure what you mean by "update only the last change, and not record the old changes". update-index is, like most Git commands, per repo. On Mon, Apr 24, 2017 at 12:08 AM, Rm Beer wrote: > Yes, but

Re: [PATCH v6 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-23 Thread Junio C Hamano
Ben Peart writes: > Subject: [PATCH v6 3/8] convert: Split start_multi_file_filter into two > separate functions Two minor nits, because the capital after ":" looks ugly in shortlog output, and having () there makes it easier to notice that a function name is being

Re: [PATCH v6 1/8] pkt-line: add packet_read_line_gently()

2017-04-23 Thread Junio C Hamano
Ben Peart writes: > Add packet_read_line_gently() to enable reading a line without dying on > EOF. > > Signed-off-by: Ben Peart > --- > pkt-line.c | 14 +- > pkt-line.h | 10 ++ > 2 files changed, 23 insertions(+), 1 deletion(-) >

Re: I suggest a new feature: One copy from files

2017-04-23 Thread Samuel Lijin
...what? I'm sorry, I have absolutely no idea what you're asking. You're going to have to be a lot more specific with your description of the desired behavior because as is, I have no idea what purpose your .gitonecopy or .gitonelog would serve. I also have no idea what this has to do with the

Re: [PATCH] test-lib: abort when can't remove trash directory

2017-04-23 Thread Junio C Hamano
Junio C Hamano writes: >> That looks fine, assuming the answer to the "is the cwd important" >> question is "no". > > And I do think the answer would be "yes", unfortunately. There are > systems that do not even allow a file to be removed while it is > open, so... In

I suggest a new feature: One copy from files

2017-04-23 Thread Rm Beer
I have a several directories with binary files datas that is discard by .gitignore. I recommend make a new .gitonecopy or .gitonelog or something that take the directories with only 1 copy of last updated and not take history of files in the repository. Maybe anyone found other best method for

Re: [PATCH v4 0/9] Introduce timestamp_t for timestamps

2017-04-23 Thread Junio C Hamano
Johannes Schindelin writes: > Changes since v3: > > - fixed the fix in archive-zip.c that tried to report a too large > timestamp (and would have reported the uninitialized time_t instead) > > - adjusted the so-far forgotten each_reflog() function (that was >

Re: [PATCH v4 8/9] Use uintmax_t for timestamps

2017-04-23 Thread Junio C Hamano
Johannes Schindelin writes: > Previously, we used `unsigned long` for timestamps. This was only a good > choice on Linux, where we know implicitly that `unsigned long` is what is > used for `time_t`. > > However, we want to use a different data type for timestamps for

[PATCH] rebase -i: add config to abbreviate command name

2017-04-23 Thread Liam Beguin
Add the 'rebase.abbrevCmd' boolean config option to allow the user to abbreviate the default command name while editing the 'git-rebase-todo' file. Signed-off-by: Liam Beguin --- Notes: * This allows the lines to remain aligned when using single letter commands.

Re: [PATCH v4 4/9] Specify explicitly where we parse timestamps

2017-04-23 Thread Junio C Hamano
Johannes Schindelin writes: > Currently, Git's source code represents all timestamps as `unsigned > long`. In preparation for using a more appropriate data type, let's > introduce a symbol `parse_timestamp` (currently being defined to > `strtoul`) where appropriate,

Re: [PATCH v4 7/9] Abort if the system time cannot handle one of our timestamps

2017-04-23 Thread Junio C Hamano
Johannes Schindelin writes: > We are about to switch to a new data type for time stamps that is > definitely not smaller or equal, but larger or equal to time_t. > > So before using the system functions to process or format timestamps, > let's make extra certain that

Re: [PATCH] test-lib: abort when can't remove trash directory

2017-04-23 Thread Junio C Hamano
Jeff King writes: > On Sun, Apr 23, 2017 at 05:14:54PM -0700, Junio C Hamano wrote: > >> OK. I am wondering why we do not do >> >> rm -fr "$TRASH_DIRECTORY" >> >> and do this instead: >> >> cd "$(dirname "$remove_trash")" && >> rm -rf "$(basename

Re: [PATCH] doc: git-pull.txt use US spelling, fix minor typo

2017-04-23 Thread Junio C Hamano
René Genz writes: > --- Missing sign-off. Otherwise all good changes. Thanks. > Instead of using two command lines I could have replaced the comma with a > semicolon. > > I do not mind, if this patch is squashed into the other minor typo fixes of > mine: >

Re: [PATCH] doc: update SubmittingPatches

2017-04-23 Thread Junio C Hamano
René Genz writes: (updates for minor irritations skipped as I do not have strong opinions against them). > @@ -261,7 +261,7 @@ smaller project it is a good discipline to follow it. > The sign-off is a simple line at the end of the explanation for > the patch, which

Re: [PATCH] fix minor typing mistakes

2017-04-23 Thread Junio C Hamano
René Genz writes: > Thanks-to: Stefan Beller > --- It is nice to give credit to where credit is due (it is more common to say Helped-by: around here, though), but don't forget to sign off your patch yourself ;-) IOW Helped-by: Stefan Beller

Re: [GSoC][RFC/PATCH v2] submodule: port subcommand foreach from shell to C

2017-04-23 Thread Junio C Hamano
> +static void foreach_submodule(int argc, const char **argv, const char *path, > + const unsigned char *sha1, const char *prefix, > + int quiet, int recursive) > +{ I think that a reader would expect that a function whose name is

Re: [PATCH] Documentation/git-checkout: make doc. of checkout clearer

2017-04-23 Thread Junio C Hamano
Christoph Michelbach writes: >> Care to send in a patch to update the documentation? Thanks. The attached patch text appears linewrapped, but I think I'll be able to salvage, so forgetting about the formatting, here are some comments. > From: Christoph Michelbach

Re: [PATCH] test-lib: abort when can't remove trash directory

2017-04-23 Thread Jeff King
On Sun, Apr 23, 2017 at 05:14:54PM -0700, Junio C Hamano wrote: > OK. I am wondering why we do not do > > rm -fr "$TRASH_DIRECTORY" > > and do this instead: > > cd "$(dirname "$remove_trash")" && > rm -rf "$(basename "$remove_trash")" > > in the original. It feels

Re: [PATCH] git_fopen: fix a sparse 'not declared' warning

2017-04-23 Thread Junio C Hamano
Ramsay Jones writes: > Commit 8f4f6e53d2 ("config.mak.uname: set FREAD_READS_DIRECTORIES for > Linux and FreeBSD", 20-04-2017) caused sparse to issue a 'not declared, > should it be static?' warning on Linux. This is a result of the method > employed by

Re: [BUG] test suite broken with GETTEXT_POISON=YesPlease

2017-04-23 Thread Junio C Hamano
Michael J Gruber writes: > Ævar Arnfjörð Bjarmason venit, vidit, dixit 20.04.2017 23:58: >> As a refresh of everyone's memory (because mine needed it). This is a >> feature I added back in 2011 when the i18n support was initially >> added. >> >> There was concern at the time

Re: [PATCH] tests: fix tests broken under GETTEXT_POISON=YesPlease

2017-04-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > The GETTEXT_POISON=YesPlease compile-time testing option added in my > bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly > translator", 2011-02-22) has been slowly bitrotting as strings have > been marked for translation, and new

Re: [PATCH 00/15] Handle fopen() errors

2017-04-23 Thread Junio C Hamano
Jeff King writes: > On Fri, Apr 21, 2017 at 07:27:20PM +0700, Duy Nguyen wrote: > >> On Fri, Apr 21, 2017 at 6:52 PM, Junio C Hamano wrote: >> > Yes, but (1) we'd need to be careful about --quiet >> >> Yeah. It's a real pain point for making changes like this.

Re: What's cooking in git.git (Apr 2017, #04; Wed, 19)

2017-04-23 Thread Junio C Hamano
Johannes Schindelin writes: > Part of the reason is that you push out all of the branches in one go, > typically at the very end of your work day. The idea of Continuous > Integration is a little orthogonal to that style, suggesting to build & > test whenever new

Re: [PATCH] test-lib: abort when can't remove trash directory

2017-04-23 Thread Junio C Hamano
Jeff King writes: >> -test -d "$remove_trash" && >> +test -d "$remove_trash" || >> +error "Tests passed but trash directory already removed before >> test cleanup; aborting" > > I think I found out why this "test -d" was here in the first

[PATCH 50/53] diff-lib: convert do_diff_cache to struct object_id

2017-04-23 Thread brian m. carlson
This is needed to convert parse_tree_indirect. Signed-off-by: brian m. carlson --- builtin/am.c| 2 +- builtin/blame.c | 6 +++--- builtin/reset.c | 2 +- diff-lib.c | 12 ++-- diff.h | 2 +- 5 files changed, 12 insertions(+), 12

[PATCH 44/53] sha1_name: convert internals of peel_onion to object_id

2017-04-23 Thread brian m. carlson
Signed-off-by: brian m. carlson --- sha1_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index b7e09ac13..72e72ab9a 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -798,7 +798,7 @@ struct object

[PATCH 52/53] tree: convert parse_tree_indirect to struct object_id

2017-04-23 Thread brian m. carlson
Convert parse_tree_indirect to take a pointer to struct object_id. Update all the callers. This transformation was achieved using the following semantic patch and manual updates to the declaration and definition. Update builtin/checkout.c manually as well, since it uses a ternary expression not

[PATCH 53/53] object: convert parse_object* to take struct object_id

2017-04-23 Thread brian m. carlson
Make parse_object, parse_object_or_die, and parse_object_buffer take a pointer to struct object_id. Remove the temporary variables inserted earlier, since they are no longer necessary. Transform all of the callers using the following semantic patch: @@ expression E1; @@ - parse_object(E1.hash)

[PATCH 48/53] merge: convert checkout_fast_forward to struct object_id

2017-04-23 Thread brian m. carlson
Converting checkout_fast_forward is required to convert parse_tree_indirect. Signed-off-by: brian m. carlson --- builtin/merge.c | 4 ++-- builtin/pull.c | 4 ++-- cache.h | 4 ++-- merge.c | 8 sequencer.c | 2 +- 5 files changed, 11

[PATCH 42/53] revision: convert remaining parse_object callers to object_id

2017-04-23 Thread brian m. carlson
Signed-off-by: brian m. carlson --- revision.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/revision.c b/revision.c index f82c56e1f..80f74bb7b 100644 --- a/revision.c +++ b/revision.c @@ -177,23

[PATCH 49/53] builtin/ls-tree: convert to struct object_id

2017-04-23 Thread brian m. carlson
This is a prerequisite to convert do_diff_cache, which is required to convert parse_tree_indirect. Signed-off-by: brian m. carlson --- builtin/ls-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c

[PATCH 45/53] builtin/read-tree: convert to struct object_id

2017-04-23 Thread brian m. carlson
This is a caller of parse_tree_indirect, which must be converted in order to convert parse_object. Signed-off-by: brian m. carlson --- builtin/read-tree.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/read-tree.c

[PATCH 41/53] revision: rename add_pending_sha1 to add_pending_oid

2017-04-23 Thread brian m. carlson
Rename this function and convert it to take a pointer to struct object_id. This is a prerequisite for converting get_reference, which is needed to convert parse_object. Signed-off-by: brian m. carlson --- builtin/am.c | 2 +- builtin/checkout.c | 4 ++--

[PATCH 39/53] refs/files-backend: convert many internals to struct object_id

2017-04-23 Thread brian m. carlson
Convert many of the internals of the files backend to use struct object_id. Avoid converting public APIs to limit the scope of the changes. Convert one use of get_sha1_hex to parse_oid_hex, and rely on the fact that a strbuf will be NUL-terminated and that parse_oid_hex will fail on truncated

[PATCH 35/53] Convert the verify_pack callback to struct object_id

2017-04-23 Thread brian m. carlson
Make the verify_pack_callback take a pointer to struct object_id. Use a struct object_id to hold the pack checksum, even though it is not strictly an object ID. Doing so ensures resilience against future hash size changes, and allows us to remove hard-coded assumptions about how big the buffer

[PATCH 40/53] http-push: convert process_ls_object and descendants to object_id

2017-04-23 Thread brian m. carlson
Rename one function to reflect that it now uses struct object_id. This conversion is a prerequisite for converting parse_object. Note that while the use of a buffer that is exactly forty bytes long looks questionable, get_oid_hex reads exactly the right number of bytes and does not require the

[PATCH 43/53] upload-pack: convert remaining parse_object callers to object_id

2017-04-23 Thread brian m. carlson
Convert the remaining parse_object callers to struct object_id. Use named constants for several hard-coded values. In addition, rename got_sha1 to got_oid to reflect the new argument. Signed-off-by: brian m. carlson --- upload-pack.c | 50

[PATCH 47/53] sequencer: convert fast_forward_to to struct object_id

2017-04-23 Thread brian m. carlson
fast_forward_to is required for checkout_fast_fowrard, which is required for parse_tree_indirect. Signed-off-by: brian m. carlson --- sequencer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sequencer.c b/sequencer.c

[PATCH 38/53] refs: convert struct ref_update to use struct object_id

2017-04-23 Thread brian m. carlson
Convert struct ref_array_item to use struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct ref_update E1; @@ - E1.new_sha1 + E1.new_oid.hash @@ struct ref_update *E1; @@ - E1->new_sha1 + E1->new_oid.hash @@

[PATCH 46/53] builtin/ls-files: convert overlay_tree_on_cache to object_id

2017-04-23 Thread brian m. carlson
This is another caller of parse_tree_indirect. Signed-off-by: brian m. carlson --- builtin/ls-files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index d449e46db..948c7066c 100644 ---

[PATCH 32/53] Convert lookup_tree to struct object_id

2017-04-23 Thread brian m. carlson
Convert the lookup_tree function to take a pointer to struct object_id. The commit was created with manual changes to tree.c, tree.h, and object.c, plus the following semantic patch: @@ @@ - lookup_tree(EMPTY_TREE_SHA1_BIN) + lookup_tree(_tree_oid) @@ expression E1; @@ - lookup_tree(E1.hash) +

[PATCH 51/53] sequencer: convert do_recursive_merge to struct object_id

2017-04-23 Thread brian m. carlson
This conversion is required to convert parse_tree_indirect. Signed-off-by: brian m. carlson --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index dfa44afa7..ed48c4c29 100644 --- a/sequencer.c +++

[PATCH 37/53] ref-filter: convert some static functions to struct object_id

2017-04-23 Thread brian m. carlson
Among the converted functions is a caller of parse_object_buffer, which we will convert later. Signed-off-by: brian m. carlson --- ref-filter.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ref-filter.c b/ref-filter.c

[PATCH 29/53] Convert lookup_blob to struct object_id

2017-04-23 Thread brian m. carlson
Convert lookup_blob to take a pointer to struct object_id. The commit was created with manual changes to blob.c and blob.h, plus the following semantic patch: @@ expression E1; @@ - lookup_blob(E1.hash) + lookup_blob() @@ expression E1; @@ - lookup_blob(E1->hash) + lookup_blob(E1)

[PATCH 34/53] Convert lookup_tag to struct object_id

2017-04-23 Thread brian m. carlson
Convert lookup_tag to take a pointer to struct object_id. Signed-off-by: brian m. carlson --- builtin/describe.c | 6 +++--- builtin/pack-objects.c | 2 +- builtin/replace.c | 2 +- log-tree.c | 2 +- object.c | 2 +- sha1_name.c

[PATCH 36/53] Convert struct ref_array_item to struct object_id

2017-04-23 Thread brian m. carlson
Convert struct ref_array_item to use struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct ref_array_item E1; @@ - E1.objectname + E1.objectname.hash @@ struct ref_array_item *E1; @@ - E1->objectname +

[PATCH 28/53] Convert remaining callers of lookup_blob to object_id

2017-04-23 Thread brian m. carlson
All but a few callers of lookup_blob have been converted to struct object_id. Introduce a temporary, which will be removed later, into parse_object to ease the transition, and convert the remaining callers so that we can update lookup_blob to take struct object_id *. Signed-off-by: brian m.

[PATCH 25/53] Convert lookup_commit* to struct object_id

2017-04-23 Thread brian m. carlson
Convert lookup_commit, lookup_commit_or_die, lookup_commit_reference, and lookup_commit_reference_gently to take struct object_id arguments. Introduce a temporary in parse_object buffer in order to convert this function. This is required since in order to convert parse_object and

[PATCH 33/53] log-tree: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert the remaining functions to take pointers to struct object_id instead of pointers to unsigned char, and update the internals of these functions as well. Among these functions is a caller of lookup_tag, which we will convert shortly. Signed-off-by: brian m. carlson

[PATCH 27/53] builtin/unpack-objects: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert struct delta_info and struct object_info, as well as the various functions, to use struct object_id. Convert several hard-coded 20 values to GIT_SHA1_RAWSZ. Among the functions converted is a caller of lookup_blob, which we will convert shortly. Signed-off-by: brian m. carlson

[PATCH 31/53] builtin/reflog: convert tree_is_complete to take struct object_id

2017-04-23 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/reflog.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index 4831116ea..7866a0341 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -55,14 +55,14

[PATCH 30/53] tree: convert read_tree_1 to use struct object_id internally

2017-04-23 Thread brian m. carlson
Signed-off-by: brian m. carlson --- tree.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tree.c b/tree.c index 33fa7ee71..21fd80b80 100644 --- a/tree.c +++ b/tree.c @@ -58,7 +58,7 @@ static int read_tree_1(struct tree *tree, struct

[PATCH 22/53] sequencer: convert some functions to struct object_id

2017-04-23 Thread brian m. carlson
Convert update_squash_messages and is_index_unchanged to struct object_id. These are callers of lookup_commit and lookup_commit_reference, which we want to convert. Signed-off-by: brian m. carlson --- sequencer.c | 12 ++-- 1 file changed, 6 insertions(+),

[PATCH 07/53] branch: convert to struct object_id

2017-04-23 Thread brian m. carlson
This change is required to convert lookup_commit_reference later. Signed-off-by: brian m. carlson --- branch.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/branch.c b/branch.c index ad5a2299b..1758c9708 100644 --- a/branch.c

[PATCH 20/53] revision: convert prepare_show_merge to struct object_id

2017-04-23 Thread brian m. carlson
This is a caller of lookup_commit_or_die, which we will convert later on. Signed-off-by: brian m. carlson --- revision.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/revision.c b/revision.c index 2b56c3baf..945367034 100644 ---

[PATCH 12/53] submodule: convert merge_submodule to use struct object_id

2017-04-23 Thread brian m. carlson
This is a caller of lookup_commit_reference, which we will convert later. Signed-off-by: brian m. carlson --- merge-recursive.c | 8 submodule.c | 24 submodule.h | 8 3 files changed, 20 insertions(+), 20

[PATCH 16/53] builtin/verify-commit: convert to struct object_id

2017-04-23 Thread brian m. carlson
This is a prerequisite to convert to lookup_commit, which we will convert later. Signed-off-by: brian m. carlson --- builtin/verify-commit.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/verify-commit.c

[PATCH 26/53] pack: convert struct pack_idx_entry to struct object_id

2017-04-23 Thread brian m. carlson
Convert struct pack_idx_entry to use struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct pack_idx_entry E1; @@ - E1.sha1 + E1.oid.hash @@ struct pack_idx_entry *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by:

[PATCH 06/53] bundle: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert the bundle code, plus the sole external user of struct ref_list_entry, to use struct object_id. Include cache.h from within bundle.h to provide the definition. Convert some of the hash parsing code to use parse_oid_hex to avoid needing to hard-code constant values. Signed-off-by: brian

[PATCH 18/53] http-push: convert some static functions to struct object_id

2017-04-23 Thread brian m. carlson
Among the functions converted is a caller of lookup_commit_or_die, which we will convert later on. Signed-off-by: brian m. carlson --- http-push.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/http-push.c

[PATCH 24/53] Convert remaining callers of lookup_commit_reference* to object_id

2017-04-23 Thread brian m. carlson
There are a small number of remaining callers of lookup_commit_reference and lookup_commit_reference_gently that still need to be converted to struct object_id. Convert these. Signed-off-by: brian m. carlson --- notes-merge.c | 26 +-

[PATCH 17/53] tag: convert parse_tag_buffer to struct object_id

2017-04-23 Thread brian m. carlson
Specify some constants in terms of GIT_SHA1_HEXSZ, and convert a get_sha1_hex into parse_oid_hex to avoid needing to specify additional constants. Signed-off-by: brian m. carlson --- tag.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

[PATCH 23/53] builtin/tag: convert to struct object_id

2017-04-23 Thread brian m. carlson
Parts of this module call lookup_commit_reference, which we want to convert. The module is small and mostly self-contained, so convert the rest of it while we're at it. Signed-off-by: brian m. carlson --- builtin/tag.c | 66

[PATCH 10/53] fast-import: convert internal structs to struct object_id

2017-04-23 Thread brian m. carlson
Convert struct tree_entry_ms, struct branch, struct tag, and struct hash_list to use struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct tree_entry_ms E1; @@ - E1.sha1 + E1.oid.hash @@ struct tree_entry_ms *E1;

[PATCH 08/53] builtin/blame: convert static function to struct object_id

2017-04-23 Thread brian m. carlson
This function is a caller of lookup_commit_reference_gently, which we will convert later. Signed-off-by: brian m. carlson --- builtin/blame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index

[PATCH 11/53] fast-import: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert the remaining parts of fast-import.c to use struct object_id. Convert several instances of get_sha1_hex to parse_oid_hex to avoid needing to specify constants. Convert other hardcoded values to named constants. Finally, use the is_empty_tree_oid function instead of a direct comparison

[PATCH 15/53] reflog_expire: convert to struct object_id

2017-04-23 Thread brian m. carlson
Adjust the callback functions to take struct object_id * instead of unsigned char *, and modify related static functions accordingly. Introduce a temporary object_id instance into files_reflog_expire and copy the SHA-1 value passed in. This is necessary because the sha1 parameter can come

[PATCH 09/53] builtin/rev-parse: convert to struct object_id

2017-04-23 Thread brian m. carlson
Some of the functions converted are callers of lookup_commit_reference. However, the changes involved in converting the entire thing are not too large, so we might as well convert it all. Signed-off-by: brian m. carlson --- builtin/rev-parse.c | 56

[PATCH 21/53] shallow: convert shallow registration functions to object_id

2017-04-23 Thread brian m. carlson
Convert register_shallow and unregister_shallow to take struct object_id. register_shallow is a caller of lookup_commit, which we will convert later. It doesn't make sense for the registration and unregistration functions to have incompatible interfaces, so convert them both. Signed-off-by:

[PATCH 19/53] notes-utils: convert internals to struct object_id

2017-04-23 Thread brian m. carlson
Convert the internals of create_notes_comit and commit_notes to use struct object_id. Signed-off-by: brian m. carlson --- notes-utils.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/notes-utils.c b/notes-utils.c index

[PATCH 14/53] parse-options-cb: convert to struct object_id

2017-04-23 Thread brian m. carlson
This is a caller of lookup_commit_reference, which we will soon convert. Signed-off-by: brian m. carlson --- parse-options-cb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse-options-cb.c b/parse-options-cb.c index

[PATCH 13/53] notes-cache: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert as many instances of unsigned char [20] as possible, Update the callers of notes_cache_get and notes_cache_put to use the new interface. Among the functions updated are callers of lookup_commit_reference_gently, which we will soon convert. Signed-off-by: brian m. carlson

[PATCH 05/53] builtin/prune: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert the sole instance of unsigned char [20] to struct object_id. cmd_prune is a caller of parse_object, which we will convert later. Signed-off-by: brian m. carlson --- builtin/prune.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 00/53] object_id part 8

2017-04-23 Thread brian m. carlson
This is the eighth series of patches to convert unsigned char [20] to struct object_id. This series converts lookup_commit, lookup_blob, lookup_tree, lookup_tag, and finally parse_object to struct object_id. A small number of functions have temporaries inserted during the conversion in order to

[PATCH 03/53] Convert struct cache_tree to use struct object_id

2017-04-23 Thread brian m. carlson
Convert the sha1 member of struct cache_tree to struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct cache_tree E1; @@ - E1.sha1 + E1.oid.hash @@ struct cache_tree *E1; @@ - E1->sha1 + E1->oid.hash Fix up one

[PATCH 04/53] builtin/name-rev: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert all the uses of unsigned char [20] to struct object_id. Also, convert some hard-coded integers into constants. name_rev_line accepts a wide variety of free-form input and only interprets 40-character hex values, passing through everything else. Consequently, it is not a good candidate

[PATCH 01/53] fetch-pack: convert to struct object_id

2017-04-23 Thread brian m. carlson
Convert all uses of unsigned char [20] to struct object_id. Switch one use of get_sha1_hex to parse_oid_hex to avoid the need for a constant. This change is necessary in order to convert parse_object. Signed-off-by: brian m. carlson --- fetch-pack.c | 89

[PATCH 02/53] Clean up outstanding object_id transforms.

2017-04-23 Thread brian m. carlson
The semantic patch for standard object_id transforms found two outstanding places where we could make a transformation automatically. Apply these changes. Signed-off-by: brian m. carlson --- builtin/diff.c | 2 +- reflog-walk.c | 2 +- 2 files changed, 2

Re: [PATCH v2] archive-zip: Add zip64 headers when file size is too large for 32 bits

2017-04-23 Thread Johannes Sixt
Am 23.04.2017 um 16:51 schrieb Peter Krefting: Johannes Sixt: @@ -376,7 +397,7 @@ static int write_zip_entry(struct archiver_args *args, copy_le16(dirent.comment_length, 0); copy_le16(dirent.disk, 0); copy_le32(dirent.attr2, attr2); -copy_le32(dirent.offset, zip_offset); +

[PATCH] doc: git-pull.txt use US spelling, fix minor typo

2017-04-23 Thread René Genz
--- Instead of using two command lines I could have replaced the comma with a semicolon. I do not mind, if this patch is squashed into the other minor typo fixes of mine: 3c228f462d02e76956062b8d8572158cbcdbbc7b Documentation/git-pull.txt | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: minor typos in documentation

2017-04-23 Thread René Genz
Hi Stefan, I submitted the patch to the mailing list. Based on my experience I submitted another patch to improve the documentation. Thank you for guiding me. -- Kind regards, René

[PATCH] doc: update SubmittingPatches

2017-04-23 Thread René Genz
-use US English spelling -based on my own experience: * add commands used to contribute a patch * minor wording change for better readability Thanks-to: Stefan Beller --- Documentation/SubmittingPatches | 31 +-- 1 file changed, 25

Logical inconsistency in git reset

2017-04-23 Thread vvs
Dear list Like it was suggested on git-users list I'm forwarding the original message here. I found out that "git reset --hard" produced different outcome depending on current index content, i.e. when there is no entry for a file in working tree it actually changed that file. While on the

Re: [PATCH v2] archive-zip: Add zip64 headers when file size is too large for 32 bits

2017-04-23 Thread Peter Krefting
Johannes Sixt: Let's get the naming straight: There is no "zip64 local header". There is a "zip64 extra record" for the "zip local header". Indeed, sorry for the confusion. That's what I get for trying to write coherent email at half past midnight :-) The zip64 extra data record has an

git v2.13.0-rc0 test failures on cygwin

2017-04-23 Thread Ramsay Jones
Hi Junio, Adam, [Adam, if you are no longer the git package maintainer for cygwin, then please ignore this email and sorry for the noise!] On thursday evening, I ran the test-suite on the newly minted v2.13.0-rc0 release on cygwin, which unfortunately failed (the 'test-out' files are from the

[PATCH] fix minor typing mistakes

2017-04-23 Thread René Genz
Thanks-to: Stefan Beller --- Documentation/git-commit.txt| 4 ++-- Documentation/gitremote-helpers.txt | 2 +- ci/run-windows-build.sh | 2 +- diff.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v2] archive-zip: Add zip64 headers when file size is too large for 32 bits

2017-04-23 Thread Johannes Sixt
Am 23.04.2017 um 00:41 schrieb Peter Krefting: Indeed. Last time I implemented zip64 support it was on the reading side, and I remember this was a mess... It is indeed! static void set_zip_header_data_desc(struct zip_local_header *header, unsigned long

Re: [PATCH] archive-zip: Add zip64 headers when file size is too large for 32 bits

2017-04-23 Thread Johannes Sixt
Am 23.04.2017 um 08:42 schrieb Peter Krefting: René Scharfe: The offset is only needed in the ZIP64 extra record for the central header (in zip_dir) -- the local header has no offset field. Good point. The zip64 local header does have an offset field, though. I thought that was the

Re: [PATCH] archive-zip: Add zip64 headers when file size is too large for 32 bits

2017-04-23 Thread Peter Krefting
René Scharfe: The offset is declared as unsigned int, so will wrap on most platforms before reaching the clamp check. At least InfoZIP's unzip can handle that, but it's untidy. Right, that needs to be changed into unsigned long and clamped, just like the original and compressed file sizes

git log --ignore-space-change -L start,end:file does not ignore indentation changes

2017-04-23 Thread Дилян Палаузов
Hello, $ git version git version 2.12.2.89.g49800c940 $ git init Initialized empty Git repository in .git/ $ cat a.c int main() { int result; } $git add a.c $git commit -m I [master (root-commit) ef9ab63] I 1 file changed, 3 insertions(+) create mode 100644 a.c $cat a.c # now the