Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-09 Thread Karthik Nayak
On 06/10/2015 12:37 AM, Junio C Hamano wrote: Karthik Nayak writes: >>> @@ -54,7 +59,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix) >>>/* for warn_ambiguous_refs */ >>>git_config(git_default_config, NULL); >>> >>> -memset(&ref_cbdata, 0, sizeof(r

Re: [PATCH v2 17/19] pull --rebase: exit early when the working directory is dirty

2015-06-09 Thread Kevin Daudt
On Wed, Jun 03, 2015 at 12:27:16PM +0200, Kevin Daudt wrote: > On Wed, Jun 03, 2015 at 02:49:01PM +0800, Paul Tan wrote: > > Re-implement the behavior introduced by f9189cf (pull --rebase: exit > > early when the working directory is dirty, 2008-05-21). > > When the option rebase.autoStash is set,

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Shawn Pearce
On Fri, Jun 5, 2015 at 5:29 AM, Jeff King wrote: > > However, some code paths make a large number of > has_sha1_file checks which are _not_ expected to return 1. > The collision test in index-pack.c is such a case. On a > local system, this can cause a performance slowdown of > around 5%. But on a

Re: On undoing a forced push

2015-06-09 Thread Duy Nguyen
On Tue, Jun 9, 2015 at 10:00 PM, brian m. carlson wrote: > On Tue, Jun 09, 2015 at 07:12:21PM +0700, Duy Nguyen wrote: >> diff --git a/transport.c b/transport.c >> index f080e93..6bd6a64 100644 >> --- a/transport.c >> +++ b/transport.c >> @@ -657,16 +657,17 @@ static void print_ok_ref_status(struc

Using clean/smudge scripts from repository

2015-06-09 Thread Bob Bell
I'm setting up a clean/smudge filter for a repository. In local testing it seemed to work well. To allow for the clean/smudge scripts to be updated as the source changes, I put the clean/smudge scripts into the repository, and configured the filter in my ~/.gitconfig file to be simply "./filt

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > +enum rebase_type { > + REBASE_INVALID = -1, > + REBASE_FALSE = 0, > + REBASE_TRUE, > + REBASE_PRESERVE > +}; > + > +/** > + * Parses the value of --rebase, branch.*.rebase or pull.rebase. If value is > a > + * false value, returns REBASE_FALSE. If value is a t

Re: [PATCH v2 13/19] pull: implement pulling into an unborn branch

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > /** > + * "Pulls into void" by branching off merge_head. > + */ > +static int pull_into_void(unsigned char merge_head[GIT_SHA1_RAWSZ], > + unsigned char curr_head[GIT_SHA1_RAWSZ]) > +{ It is not wrong per-se, but is rather unusual (and misleading) to specify the a

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > @@ -422,6 +423,14 @@ int cmd_pull(int argc, const char **argv, const char > *prefix) > > parse_repo_refspecs(argc, argv, &repo, &refspecs); > > + git_config(git_default_config, NULL); > + > + if (read_cache_unmerged()) > + die_resolve_conflict("Pu

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Junio C Hamano
Mike Rappazzo writes: > I have since reworked this script to support the short hash in the > custom format as a special case: I thought that we always give short form when presenting it to the end user to edit, but for internal bookkeeping purposes we make sure that we use the full SHA-1, so tha

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-09 Thread Junio C Hamano
Louis-Alexandre Stuber writes: > Matthieu Moy wrote: > >> I think you would want to error out if errno is not ENOENT. > > > Junio C Hamano wrote: > >> We might want to see why fopen() failed here. If it is because the >> file did not exist, great. But otherwise? > > > This file is always suppos

Re: [PATCH v2 04/19] pull: implement skeletal builtin pull

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > +int cmd_pull(int argc, const char **argv, const char *prefix) > +{ > + if (!getenv("_GIT_USE_BUILTIN_PULL")) { > + const char *path = mkpath("%s/git-pull", git_exec_path()); > + > + if (sane_execvp(path, (char**) argv) < 0) Style: "(char **)argv".

Re: [PATCH v2 10/19] pull: support pull.ff config

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > > * Yup, I did mean strcmp(value, "only") I may be missing some backstory behind this comment; in the patch, I instead see !strcmp(value, "only") and I think it makes sense. > + if (git_config_get_value("pull.ff", &value)) > + return; > + switch (

Re: [PATCH v2 09/19] pull: error on no merge candidates

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > /** > + * Appends merge candidates from FETCH_HEAD that are not marked not-for-merge > + * into merge_heads. > + */ Hmph, I vaguely recall doing that in C elsewhere already, even though I do not remember where offhand... > +static void get_merge_heads(struct sha1_array *merg

Re: [PATCH v2 06/19] pull: pass verbosity, --progress flags to fetch and merge

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > Re-implement support for this flag by introducing the option callback > handler parse_opt_passthru(). This callback is used to pass the > "--progress" or "--no-progress" command-line switch to git-fetch and > git-merge. Forgot to rephrase? parse-opt-passthru() is a good name

Re: [PATCH v2 05/19] pull: implement fetch + merge

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > +/** > + * Parses argv into [ [...]], returning their values in > `repo` > + * as a string and `refspecs` as a null-terminated array of strings. If > `repo` > + * is not provided in argv, it is set to NULL. > + */ > +static void parse_repo_refspecs(int argc, const char **argv

Re: On undoing a forced push

2015-06-09 Thread Duy Nguyen
On Tue, Jun 9, 2015 at 11:29 PM, Johannes Schindelin wrote: > Sorry to chime in so late in the discussion, but I think that the > `--force-with-lease` option is what you are looking for. It allows you to > force-push *but only* if the forced push would overwrite the ref we expect, > i.e. (simpl

Re: [PATCH v2 02/19] parse-options-cb: implement parse_opt_pass_argv_array()

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > Certain git commands, such as git-pull, are simply wrappers around other > git commands like git-fetch, git-merge and git-rebase. As such, these > wrapper commands will typically need to "pass through" command-line > options of the commands they wrap. > > Implement the parse_op

Re: Fw: sort of a bug report - git rebase dropping empty commits

2015-06-09 Thread Hin-Tak Leung
Argh, thanks a lot! Should have read the man page better. OTOH, I expect 'git commit --allow-empty' being needed, but 'git rebase --keep-empty' comes somewhat as a surprise - I wasn't expecting git rebase to commit each in turn, but of course that's what it does. On 7 May 2015 at 01:47, Mikael Ma

Re: [PATCH v2 01/19] parse-options-cb: implement parse_opt_pass_strbuf()

2015-06-09 Thread Junio C Hamano
Paul Tan writes: > diff --git a/parse-options-cb.c b/parse-options-cb.c > index be8c413..5b1dbcf 100644 > --- a/parse-options-cb.c > +++ b/parse-options-cb.c > @@ -134,3 +134,32 @@ int parse_opt_noop_cb(const struct option *opt, const > char *arg, int unset) > { > return 0; > } > + > +/*

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-09 Thread Louis-Alexandre Stuber
Matthieu Moy wrote: > I think you would want to error out if errno is not ENOENT. Junio C Hamano wrote: > We might want to see why fopen() failed here. If it is because the > file did not exist, great. But otherwise? This file is always supposed to exist when the function is called unless t

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Mike Rappazzo
I have since reworked this script to support the short hash in the custom format as a special case: -git rev-list $merges_option --pretty=oneline --reverse --left-right --topo-order \ +format=$(git config --get rebase.instructionFormat) +no_format=$? +if test ${no_format} -ne 0 +then + format="%H

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Junio C Hamano
Johannes Schindelin writes: > Besides, are you sure you don't want to substitute an empty > rebase.instructionFormat' by '%s'? I would have expected to read > ${format:-%s}` (note the colon), but then, this was Junio's > suggestion... That was me simply being sloppy myself, expecting people not

Re: [PATCH 2/4] bisect: replace hardcoded "bad|good" by variables

2015-06-09 Thread Junio C Hamano
Matthieu Moy writes: > Antoine Delaite writes: > >> --- a/git-bisect.sh >> +++ b/git-bisect.sh >> @@ -32,6 +32,8 @@ OPTIONS_SPEC= >> >> _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' >> _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" >> +NAME_BAD="bad" >> +NAME_GOOD="good" > > I would have

Re: git lock files (Was: GIT for Microsoft Access projects)

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 11:21 AM, wrote: > Thanks folks, I am digesting all you have said. I did not intend to answer your original question, but to start a discussion on the feasibility of a dedicated "git lock" command. There are lots of things which are checked in alongside the code (The code

Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-09 Thread Junio C Hamano
Karthik Nayak writes: >>> @@ -54,7 +59,6 @@ int cmd_for_each_ref(int argc, const char **argv, const >>> char *prefix) >>> /* for warn_ambiguous_refs */ >>> git_config(git_default_config, NULL); >>> >>> - memset(&ref_cbdata, 0, sizeof(ref_cbdata)); >> >> I cannot quite see how this chan

Re: [PATCH 00/13] Improve "refs" module encapsulation

2015-06-09 Thread Junio C Hamano
Michael Haggerty writes: > Add functions to the reference API to > > * Delete a bunch of references at once, but *without* failing the > whole transaction if one of the deletions fails. This functionality > is used by `git remote remove` and `git remote prune`. > > * Create initial references

[PATCH v7 5/5] clean: improve performance when removing lots of directories

2015-06-09 Thread Erik Elfström
"git clean" uses resolve_gitlink_ref() to check for the presence of nested git repositories, but it has the drawback of creating a ref_cache entry for every directory that should potentially be cleaned. The linear search through the ref_cache list causes a massive performance hit for large number o

Re: format-patch and submodules

2015-06-09 Thread Jens Lehmann
Am 05.06.2015 um 01:20 schrieb Christopher Dunn: (Seen in git versions: 2.1.0 and 1.9.3 et al.) $ git format-patch --stdout X^..X | git apply check - fatal: unrecognized input This fails when the commit consists of nothing but a submodule change (as in 'git add submodule foo'), but it passes wh

Re: [PATCH] git-completion.tcsh: fix redirect with noclobber

2015-06-09 Thread Junio C Hamano
Ariel Faigon writes: > tcsh users who happen to have 'set noclobber' elsewhere in their > ~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and > the tcsh completion file doesn't get generated/updated. > > Adding a `!` in the redirect works correctly for both clobber (default) > and '

Re: git lock files (Was: GIT for Microsoft Access projects)

2015-06-09 Thread Konstantin Khomoutov
On Tue, 9 Jun 2015 13:21:44 -0500 wrote: > Thanks folks, I am digesting all you have said. > > Now the command line I can do (I'm a programmer) but the secretary > here I doubt. > > So is there at GUI interface for this? Does it work on Windows > systems? That's why I asked whether the thing y

[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-09 Thread Remi Lespinet
Remove leading and trailing whitespaces when sanitizing addresses so that git send-email give the same output when passing arguments like " j...@example.com " or "\t j...@example.com " as with "j...@example.com". The next commit will introduce a test for this aswell. Signed-off-by: Remi Lespine

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-09 Thread Remi Lespinet
As alias file formats supported by git send-email doesn't take whitespace into account, it is useless to consider whitespaces in alias name. remove leading and trailing whitespace before expanding allow to recognize strings like " alias" or "alias\t" passed by --to, --cc, --bcc options or by the gi

Re: [PATCH 05/13] delete_refs(): improve error message

2015-06-09 Thread Junio C Hamano
Michael Haggerty writes: > Change the error message from > > Could not remove branch %s > > to > > Could not remove reference %s > > This change makes sense even for the existing caller, which uses the > function to delete remote-tracking branches. I am 80% convinced ;-) The existing ca

Re: How to compile without iconv?

2015-06-09 Thread Torsten Bögershausen
On 2015-06-09 16.07, Sascha Ziemann wrote: > I tried to compile git 2.4.3 on Solaris 10. I used the following > configuration: > > $ ./configure --without-iconv > > $ grep -i iconv config.status > ac_cs_config="'--without-iconv'" > set X /bin/bash './configure' '--without-iconv' > $ac_configu

Re: Submodules as first class citizens (was Re: Moving to subtrees for plugins?)

2015-06-09 Thread Jens Lehmann
Am 07.06.2015 um 08:26 schrieb Stefan Beller: On 06.06.2015 12:53, Luca Milanesio wrote: On 6 Jun 2015, at 18:49, Phil Hord wrote: On Fri, Jun 5, 2015, 2:58 AM lucamilanesio wrote: Ideally, as a "git clone --recursive" already exists, I would like to see a "git diff --recursive" that goes thr

Re: [PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Junio C Hamano
Matthieu Moy writes: > Guillaume Pagès writes: > >> Signed-off-by: Guillaume Pagès >> --- >> t/t7512-status-help.sh | 28 ++-- >> wt-status.c| 5 - > > Are there any change since the last version? Please, help reviewers by > anticipating this question an

[PATCH v7 0/5] Improving performance of git clean

2015-06-09 Thread Erik Elfström
Here is a reroll of this series (after much delay). Changes in v7: * changed order of file size and file open error check in read_gitfile * resolved conflicts with nd/multiple-work-trees. This removed the need for is_git_directory_gently that was added in v6 and simplified some error cases. E

[PATCH v7 3/5] t7300: add tests to document behavior of clean and nested git

2015-06-09 Thread Erik Elfström
Signed-off-by: Erik Elfström --- t/t7300-clean.sh | 142 +++ 1 file changed, 142 insertions(+) diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 99be5d9..fbfdf2d 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -455,6 +455,148 @@ te

[PATCH v7 2/5] setup: sanity check file size in read_gitfile_gently

2015-06-09 Thread Erik Elfström
read_gitfile_gently will allocate a buffer to fit the entire file that should be read. Add a sanity check of the file size before opening to avoid allocating a potentially huge amount of memory if we come across a large file that someone happened to name ".git". The limit is set to a sufficiently u

[PATCH v7 4/5] p7300: add performance tests for clean

2015-06-09 Thread Erik Elfström
The tests are run in dry-run mode to avoid having to restore the test directories for each timed iteration. Using dry-run is an acceptable compromise since we are mostly interested in the initial computation of what to clean and not so much in the cleaning it self. Signed-off-by: Erik Elfström --

[PATCH v7 1/5] setup: add gentle version of read_gitfile

2015-06-09 Thread Erik Elfström
read_gitfile will die on most error cases. This makes it unsuitable for speculative calls. Extract the core logic and provide a gentle version that returns NULL on failure. The first usecase of the new gentle version will be to probe for submodules during git clean. Helped-by: Junio C Hamano Hel

Re: git lock files (Was: GIT for Microsoft Access projects)

2015-06-09 Thread hackerp
Thanks folks, I am digesting all you have said. Now the command line I can do (I'm a programmer) but the secretary here I doubt. So is there at GUI interface for this? Does it work on Windows systems? Thanks, Paul Stefan Beller wrote: > Just because Git allows distributed workflows, does

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-09 Thread Antoine Delaite
Hi, Thanks for the review, Junio C Hamano writes: >> /* >> + * The terms used for this bisect session are stocked in >> + * BISECT_TERMS: it can be bad/good or new/old. >> + * We read them and stock them to adapt the messages >> + * accordingly. Default is bad/good. >> + */ > >s/stock/store/ p

Re: [PATCH v2 2/2] object name: introduce '^{/!-}' notation

2015-06-09 Thread Will Palmer
On Mon, Jun 8, 2015 at 5:39 PM, Junio C Hamano wrote: > Will Palmer writes: >> diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh >> index e0fe102..8a5983f 100755 >> --- a/t/t1511-rev-parse-caret.sh >> +++ b/t/t1511-rev-parse-caret.sh >> @@ -19,13 +19,17 @@ test_expect_success '

[PATCH v3 4/7] send-email: refactor address list process

2015-06-09 Thread Remi Lespinet
Simplify code by creating a funct (comma separated, with aliases ...) into a simple list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-send-email.perl b/git-send-emai

[PATCH v3 3/7] t9001-send-email: refactor header variable fields replacement

2015-06-09 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING This is a preparatory for the next commit. Signed-

[PATCH v3 2/7] send-email: allow aliases in patch header and command script outputs

2015-06-09 Thread Remi Lespinet
Interpret aliases in: - Header fields of patches generated by git format-patch (using --to, --cc, --add-header for example) or manually modified. Example of fields in header: To: alias1 Cc: alias2 Cc: alias3 - Outputs of command scripts specified by --cc-cmd and

[PATCH v3 5/7] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-09 Thread Remi Lespinet
From: Jorge Juan Garcia Garcia Accept a list of emails separated by commas in flags --cc, --to and --bcc. Multiple addresses can already be given by using these options multiple times, but it is more convenient to allow cutting-and-pasting a list of addresses from the header of an existing e-mai

[PATCH v3 1/7] t9001-send-email: move script creation in a setup test

2015-06-09 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. This will be used in the next commit. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH 0/7] changes from last version

2015-06-09 Thread Remi Lespinet
CHANGES (since last submitted version) 1/7 : identical to previous 1/5 2/7 : identical to previous 2/5 3/7 : identical to previous 3/5 4/7 : Modification previously done by 5/5 (refactoring address process) 5/7 : identical modulo a minor change at hunk @@ -1023,8 +1009,13 @@ in the function

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 01:24:36PM -0400, Jeff King wrote: > I tested this on my system, and confirmed that for a "git clone > --no-local --bare git.git": > > 1. It cuts the number of openat/getdents/close syscalls by several > orders of magnitude. > > 2. The overall time drops from ~11

[PATCH] git-completion.tcsh: fix redirect with noclobber

2015-06-09 Thread Ariel Faigon
tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and the tcsh completion file doesn't get generated/updated. Adding a `!` in the redirect works correctly for both clobber (default) and 'set noclobber' users. Helped-by:

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Jeff King
On Fri, Jun 05, 2015 at 08:29:21AM -0400, Jeff King wrote: > On Fri, Jun 05, 2015 at 08:18:17AM -0400, Jeff King wrote: > > > 1. Devise some torture to tests to see whether my patch series is in > > fact racy on Linux. > > > > 2. Assuming it is, scrap it and make a has_sha1_file_quick()

git lock files (Was: GIT for Microsoft Access projects)

2015-06-09 Thread Stefan Beller
Just because Git allows distributed workflows, doesn't mean we should only focus on being distributed IMHO. The question for content not being mergable easily pops up all the time. (Game/Graphics designers, documents, all this binary stuff, where there is no good merge driver). I could imagine a

Re: On undoing a forced push

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 9:29 AM, Johannes Schindelin wrote: > Hi, > > On 2015-06-09 16:06, Sitaram Chamarty wrote: >> On 06/09/2015 05:42 PM, Duy Nguyen wrote: >>> From a thread on Hacker News. It seems that if a user does not have >>> access to the remote's reflog and accidentally forces a push to

Re: [PATCH 01/13] delete_ref(): move declaration to refs.h

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 3:10 AM, Michael Haggerty wrote: > On 06/08/2015 06:43 PM, Stefan Beller wrote: >> On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty >> wrote: >>> [...] >>> +/* >>> + * Delete the specified reference. If old_sha1 is non-NULL and not >>> + * NULL_SHA1, then verify that the c

[PATCH 6/8] parse_fetch: convert to use struct object_id

2015-06-09 Thread brian m. carlson
Convert the parse_fetch function to use struct object_id. Switch from get_sha1_hex to parse_oid_hex to avoid hard-coding constants. Remove the strlen check as parse_oid_hex will fail safely on receiving a too-short NUL-terminated string. Signed-off-by: brian m. carlson --- remote-curl.c | 13 +

[PATCH 4/8] Add a utility function to make parsing hex values easier.

2015-06-09 Thread brian m. carlson
get_oid_hex is already available for parsing hex object IDs into struct object_id, but parsing code still must hard-code the number of bytes read. Introduce parse_oid_hex, which accepts an optional length, and also returns the number of bytes parsed on success, or 0 on failure. This makes it easie

[PATCH 5/8] add_sought_entry_mem: convert to struct object_id

2015-06-09 Thread brian m. carlson
Convert this function to use struct object_id. Use parse_oid_hex to avoid having to hard-code the number of bytes to be parsed. Signed-off-by: brian m. carlson --- builtin/fetch-pack.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/fetch-pack.c b/builti

[PATCH 3/8] Convert struct ref to use object_id.

2015-06-09 Thread brian m. carlson
Use struct object_id in three fields in struct ref and convert all the necessary places that use it. Signed-off-by: brian m. carlson --- builtin/clone.c| 16 +++--- builtin/fetch-pack.c | 4 ++-- builtin/fetch.c| 50 +-- builtin/

[PATCH 2/8] sha1_file: introduce has_object_file helper.

2015-06-09 Thread brian m. carlson
Add has_object_file, which is a wrapper around has_sha1_file, but for struct object_id. Signed-off-by: brian m. carlson --- cache.h | 3 +++ sha1_file.c | 5 + 2 files changed, 8 insertions(+) diff --git a/cache.h b/cache.h index 571c98f..fa1f067 100644 --- a/cache.h +++ b/cache.h @@ -9

[PATCH 7/8] ref_newer: convert to use struct object_id

2015-06-09 Thread brian m. carlson
Convert ref_newer and its caller to use struct object_id instead of unsigned char *. Signed-off-by: brian m. carlson --- builtin/remote.c | 2 +- http-push.c | 4 ++-- remote.c | 8 remote.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/buil

[PATCH 0/8] object_id part 2

2015-06-09 Thread brian m. carlson
This is another series of conversions to struct object_id. This series converts more of the refs code and struct object to use struct object_id. It introduces two additional helper functions. One is has_object_file, which is the equivalent of has_sha1_file. The name was chosen to be slightly mo

[PATCH 1/8] refs: convert some internal functions to use object_id

2015-06-09 Thread brian m. carlson
Convert several internal functions in refs.c to use struct object_id, and use the GIT_SHA1_HEXSZ constants in parse_ref_line. Signed-off-by: brian m. carlson --- refs.c | 104 - 1 file changed, 52 insertions(+), 52 deletions(-) dif

Re: On undoing a forced push

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 16:06, Sitaram Chamarty wrote: > On 06/09/2015 05:42 PM, Duy Nguyen wrote: >> From a thread on Hacker News. It seems that if a user does not have >> access to the remote's reflog and accidentally forces a push to a ref, >> how does he recover it? In order to force push again to r

Re: [PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Matthieu Moy
Guillaume Pagès writes: > Signed-off-by: Guillaume Pagès > --- > t/t7512-status-help.sh | 28 ++-- > wt-status.c| 5 - Are there any change since the last version? Please, help reviewers by anticipating this question and versionning your patches ([PATCH

Re: On undoing a forced push

2015-06-09 Thread brian m. carlson
On Tue, Jun 09, 2015 at 07:12:21PM +0700, Duy Nguyen wrote: > diff --git a/transport.c b/transport.c > index f080e93..6bd6a64 100644 > --- a/transport.c > +++ b/transport.c > @@ -657,16 +657,17 @@ static void print_ok_ref_status(struct ref *ref, int > porcelain) > "[new branc

Re: [PATCH 1/4] status: factor two rebase-related messages together

2015-06-09 Thread Matthieu Moy
Guillaume Pagès writes: > Signed-off-by: Guillaume Pagès > --- > wt-status.c | 31 +++ > 1 file changed, 15 insertions(+), 16 deletions(-) > > diff --git a/wt-status.c b/wt-status.c > index 33452f1..c239132 100644 > --- a/wt-status.c > +++ b/wt-status.c > @@ -1025,6

Re: On undoing a forced push

2015-06-09 Thread Sitaram Chamarty
On 06/09/2015 07:55 PM, Jeff King wrote: > On Tue, Jun 09, 2015 at 07:36:20PM +0530, Sitaram Chamarty wrote: > >>> This patch prints the latest SHA-1 before the forced push in full. He >>> then can do >>> >>> git push +: >>> >>> He does not even need to have the objects that refers >>> to. W

[PATCH 4/4] status: add new tests for status during rebase -i

2015-06-09 Thread Guillaume Pagès
Expand test coverage with one or more than two commands done and with zero, one or more than two commands remaining. Signed-off-by: Guillaume Pagès --- t/t7512-status-help.sh | 87 ++ 1 file changed, 87 insertions(+) diff --git a/t/t7512-status-he

[PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Guillaume Pagès
Signed-off-by: Guillaume Pagès --- t/t7512-status-help.sh | 28 ++-- wt-status.c| 5 - 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 68ad2d7..190656d 100755 --- a/t/t7512-status-help.

[PATCH 3/4] status: give more information during rebase -i

2015-06-09 Thread Guillaume Pagès
git status gives more information during rebase -i, about the list of command that are done during the rebase. It displays the two last commands executed and the two next lines to be executed. It also gives hints to find the whole files in .git directory. Signed-off-by: Guillaume Pagès --- t/t75

[PATCH 1/4] status: factor two rebase-related messages together

2015-06-09 Thread Guillaume Pagès
Signed-off-by: Guillaume Pagès --- wt-status.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/wt-status.c b/wt-status.c index 33452f1..c239132 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1025,6 +1025,19 @@ static int split_commit_in_progre

Re: gitscm vs. git-scm

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 03:08:46PM +0200, Matthieu Moy wrote: > I guess gitscm.com should just redirect to git-scm.com (sending the > Location: field, and/or with stg like > http://git-scm.com"; /> We (the git project) don't own gitscm.com. I don't recognize the name on the whois: $ whois gits

Re: On undoing a forced push

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 07:36:20PM +0530, Sitaram Chamarty wrote: > > This patch prints the latest SHA-1 before the forced push in full. He > > then can do > > > > git push +: > > > > He does not even need to have the objects that refers > > to. We could simply push an empty pack and the t

How to compile without iconv?

2015-06-09 Thread Sascha Ziemann
I tried to compile git 2.4.3 on Solaris 10. I used the following configuration: $ ./configure --without-iconv $ grep -i iconv config.status ac_cs_config="'--without-iconv'" set X /bin/bash './configure' '--without-iconv' $ac_configure_extra_args --no-create --no-recursion OLD_ICONV=Unfortunate

Re: On undoing a forced push

2015-06-09 Thread Sitaram Chamarty
On 06/09/2015 05:42 PM, Duy Nguyen wrote: > From a thread on Hacker News. It seems that if a user does not have > access to the remote's reflog and accidentally forces a push to a ref, > how does he recover it? In order to force push again to revert it > back, he would need to know the remote's old

Re: GIT for Microsoft Access projects

2015-06-09 Thread Sitaram Chamarty
On 06/08/2015 09:44 PM, Konstantin Khomoutov wrote: > On Mon, 8 Jun 2015 9:45:17 -0500 > wrote: > > [...] >> My question is, will GIT work with MS access forms, queries, tables, >> modules, etc? > [...] > > Git works with files. So in principle it will work with *files* > containing your MS acc

Re: gitscm vs. git-scm

2015-06-09 Thread Michael J Gruber
Matthieu Moy venit, vidit, dixit 09.06.2015 15:08: > Michael J Gruber writes: > >> Hi there, >> >> I (mis-) remembered the git site address and noticed that gitscm.com >> returns empty while git-scm.com is our beloved home. I thought, though, >> that we have a couple domains with redirects but I

Re: On undoing a forced push

2015-06-09 Thread Matthieu Moy
Duy Nguyen writes: > From a thread on Hacker News. It seems that if a user does not have > access to the remote's reflog and accidentally forces a push to a ref, > how does he recover it? In order to force push again to revert it > back, he would need to know the remote's old SHA-1. Local reflog

Re: gitscm vs. git-scm

2015-06-09 Thread Matthieu Moy
Michael J Gruber writes: > Hi there, > > I (mis-) remembered the git site address and noticed that gitscm.com > returns empty while git-scm.com is our beloved home. I thought, though, > that we have a couple domains with redirects but I may be misremembering > that also. Or DNS is "hicking up".

Re: [msysGit] Re: Release candidate of Git for Windows 2.x is out

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 14:10, QbProg wrote: > I reproduce it using the windows command prompt (cmd.exe) using any > repository. I tryed with bash and it works correctly. Please note that you removed enough context that the mail does not make sense anymore if read individually. At this point it migh

gitscm vs. git-scm

2015-06-09 Thread Michael J Gruber
Hi there, I (mis-) remembered the git site address and noticed that gitscm.com returns empty while git-scm.com is our beloved home. I thought, though, that we have a couple domains with redirects but I may be misremembering that also. Or DNS is "hicking up". Cheers, Michael -- To unsubscribe from

Re: [RFC/PATCH 7/9] parse-options.h: add macros for '--contains' option

2015-06-09 Thread Karthik Nayak
On 06/09/2015 01:02 AM, Junio C Hamano wrote: Karthik Nayak writes: +#define OPT_CONTAINS(filter, h) \ + { OPTION_CALLBACK, 0, "contains", (filter), N_("commit"), (h), \ + PARSE_OPT_LASTARG_DEFAULT, \ + parse_opt_with_commit, (intptr_t) "HEAD" \ + } +#define OPT_WIT

Re: [PATCH 2/4] bisect: replace hardcoded "bad|good" by variables

2015-06-09 Thread Matthieu Moy
Christian Couder writes: > "old/new" is not more generic than "good/bad". I disagree with this. In any case, we're looking for a pair of commits where one is a direct parent of the other. So in the end, there's always the old behavior and the new behavior in the end. In natural language, I can

Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:50 AM, Junio C Hamano wrote: Karthik Nayak writes: +int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset) +{ + struct ref_filter *rf = opt->value; + unsigned char sha1[20]; + + rf->merge = opt->long_name[0] == 'n' + ?

On undoing a forced push

2015-06-09 Thread Duy Nguyen
>From a thread on Hacker News. It seems that if a user does not have access to the remote's reflog and accidentally forces a push to a ref, how does he recover it? In order to force push again to revert it back, he would need to know the remote's old SHA-1. Local reflog does not help because remote

Re: [msysGit] Re: Release candidate of Git for Windows 2.x is out

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 10:43, Qb wrote: > I'm trying the release candidate on Win 8.1. Everything's working now, but > when I clone a repository > > git clone http://./name.git CustomFolder > > it creates CustomFolder with the checkout files, but the .git folder is > created inside CustomFolde

Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:42 AM, Junio C Hamano wrote: Is this intended? I would have expected if I did git for-each-ref --points-at master I would get refs/heads/master and any other refs that exactly points at that commit. Thats to be changed, thanks! FIELD NAMES --- diff -

Re: [PATCH 07/13] prune_remote(): use delete_refs()

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 12:50:13PM +0200, Michael Haggerty wrote: > The new code (in delete_refs()) allows delete_ref() to emit its error, > but then follows it up with > > error(_("could not remove reference %s"), refname) > > The "could not remove reference" error originally came from a si

Re: [RFC/PATCH 1/9] tag: libify parse_opt_points_at()

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:30 AM, Junio C Hamano wrote: This feels way too specialized to live as part of parse_options infrastructure. The existing caller(s) may want to use this callback for parsing "points-at" option they have, but is that the only plausible use of this callback? It looks to be usabl

Re: [PATCH 07/13] prune_remote(): use delete_refs()

2015-06-09 Thread Michael Haggerty
On 06/08/2015 07:12 PM, Jeff King wrote: > On Mon, Jun 08, 2015 at 09:57:04AM -0700, Stefan Beller wrote: > >> On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty >> wrote: >>> This will result in errors being emitted for references that can't be >>> deleted, but that is a good thing. >> >> This so

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Mike Rappazzo
I see your point, and I'll explore that avenue. Personally, I like the idea that one could also use the short hash if the custom instruction started with "%h ", but I see the value in leaving the variable blank. After running the tests with a custom format enabled, I did find that autosquash does

Re: [PATCH 06/13] delete_refs(): convert error message to lower case

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:51 PM, Stefan Beller wrote: > On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty wrote: >> This string is going to have to be re-internationalized anyway because >> of the previous commit. So while we're at it, we might as well convert >> it to lower case as per our usual practice.

Re: [PATCH 03/13] delete_ref(): handle special case more explicitly

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:48 PM, Stefan Beller wrote: > On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty wrote: >> delete_ref() uses a different convention for its old_sha1 parameter >> than, say, ref_transaction_delete(): NULL_SHA1 means not to check the >> old value. Make this fact a little bit clearer i

Re: [PATCH 01/13] delete_ref(): move declaration to refs.h

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:43 PM, Stefan Beller wrote: > On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty wrote: >> [...] >> +/* >> + * Delete the specified reference. If old_sha1 is non-NULL and not >> + * NULL_SHA1, then verify that the current value of the reference is >> + * old_sha1 before deleting it.

Re: [PATCH 2/5] am: teach StGit patch parser how to read from stdin

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 3:57 AM, Junio C Hamano wrote: > Paul Tan writes: > >> git-mailsplit, which splits mbox patches, will read the patch from stdin >> when the filename is "-" or there are no files listed on the >> command-line. >> >> To be consistent with this behavior, teach the StGit patch

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-08 23:00, Michael Rappazzo wrote: > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index dc3133f..b92375e 100644 > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.sh > @@ -977,7 +977,9 @@ else > revisions=$onto...$orig_head > sho

Re: [PATCH 1/1]: git-completion.tcsh fails w/ noclobber

2015-06-09 Thread Christian Couder
The subject is better but still not quite there. I suggest: [PATCH] git-completion.tcsh: fix redirect with noclobber On Tue, Jun 9, 2015 at 1:01 AM, Ariel Faigon wrote: > tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or > ~/.cshrc startup files get a 'File exist' er

Re: [PATCH 5/6] am --abort: support aborting to unborn branch

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 4:10 AM, Junio C Hamano wrote: > Paul Tan writes: > >> When git-am is first run on an unborn branch, no ORIG_HEAD is created. >> As such, any applied commits will remain even after a git am --abort. > > I think this answered my question on 4/6; that may indicate that > thes

  1   2   >