Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: +bisect_terms () { +test $# -eq 2 || +die You need to give me at least two arguments + +if ! test -s $GIT_DIR/BISECT_START +then +echo $1 $GIT_DIR/BISECT_TERMS +

[PATCH v2 00/19] Make git-am a builtin

2015-06-11 Thread Paul Tan
This is a re-roll of [v1]. Thanks Junio, Torsten, Jeff, Eric for the reviews last round. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/270048 git-am is a commonly used command for applying a series of patches from a mailbox to the current branch. Currently, it

Re: [PATCH] git-checkout.txt: Document

2015-06-11 Thread Ed Avis
I agree, the word 'revert' is already taken for the operation of creating a new commit which undoes some earlier commit. So 'revert' cannot be used for the operation of overwriting a working tree file with its contents from the repository. But just because 'revert' is not a good choice, doesn't

[PATCH] Documentation clarification on git-checkout regarding ours/theirs

2015-06-11 Thread Simon A. Eugster
From: Simon A. Eugster simon.eugs...@eps.ch Signed-off-by: Simon A. Eugster simon.eugs...@eps.ch --- Documentation/git-checkout.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index d263a56..5c3ef86

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]' +USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' I think this patch

Re: git difftool is not working as expected during MERGING

2015-06-11 Thread David Aguilar
On Wed, Jun 10, 2015 at 03:12:21PM +0200, Bossert, Andre wrote: Hello, i've tested git difftool with -t --ext-cmd and other options to see my diff with external tools, but it always show internal text-diff in console. The same tests with git mergetool working as expected. I've compared

[PATCH/WIP v2 07/19] am: extract patch, message and authorship with git-mailinfo

2015-06-11 Thread Paul Tan
For the purpose of applying the patch and committing the results, implement extracting the patch data, commit message and authorship from an e-mail message using git-mailinfo. git-mailinfo is run as a separate process, but ideally in the future, we should be be able to access its functionality

[PATCH/WIP v2 05/19] am: split out mbox/maildir patches with git-mailsplit

2015-06-11 Thread Paul Tan
git-am.sh supports mbox, stgit and mercurial patches. Re-implement support for splitting out mbox/maildirs using git-mailsplit, while also implementing the framework required to support other patch formats in the future. Re-implement support for the --patch-format option (since a5a6755 (git-am

[PATCH/WIP v2 00/19] Make git-am a builtin

2015-06-11 Thread Paul Tan
This is a re-roll of [v1]. Thanks Junio, Torsten, Jeff, Eric for the reviews last round. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/270048 git-am is a commonly used command for applying a series of patches from a mailbox to the current branch. Currently, it

[PATCH/WIP v2 13/19] am: implement --skip

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported resuming from a failed patch application by skipping the current patch. Re-implement this feature by introducing am_skip(). Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 121

[PATCH/WIP v2 18/19] cache-tree: introduce write_index_as_tree()

2015-06-11 Thread Paul Tan
A caller may wish to write a temporary index as a tree. However, write_cache_as_tree() assumes that the index was read from, and will write to, the default index file path. Introduce write_index_as_tree() which removes this limitation by allowing the caller to specify its own index_state and index

[PATCH/WIP v2 19/19] am: implement 3-way merge

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --3way option, and if set, would attempt to do a 3-way merge if the initial patch application fails. Re-implement this feature through the fall_back_threeway() function. Signed-off-by: Paul Tan pyoka...@gmail.com

[PATCH/WIP v2 08/19] am: apply patch with git-apply

2015-06-11 Thread Paul Tan
Implement applying the patch to the index using git-apply. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/builtin/am.c b/builtin/am.c index a1db474..b725a74

[PATCH/WIP v2 06/19] am: detect mbox patches

2015-06-11 Thread Paul Tan
Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and mercurial patches through heuristics. Re-implement support for autodetecting mbox/maildir files. Helped-by: Eric Sunshine sunsh...@sunshineco.com

[PATCH/WIP v2 01/19] wrapper: implement xopen()

2015-06-11 Thread Paul Tan
A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd 0) die_errno(_(Could not open '%s' for writing.), path); Implement a wrapper function xopen() that does the above so

[PATCH/WIP v2 04/19] am: implement patch queue mechanism

2015-06-11 Thread Paul Tan
git-am applies a series of patches. If the process terminates abnormally, we want to be able to resume applying the series of patches. This requires the session state to be saved in a persistent location. Implement the mechanism of a patch queue, represented by 2 integers -- the index of the

[PATCH/WIP v2 17/19] am: implement am --signoff

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --signoff option which will append a signoff at the end of the commit messsage. Re-implement this feature by calling append_signoff() if the option is set. Signed-off-by: Paul Tan pyoka...@gmail.com ---

[PATCH/WIP v2 11/19] am: refuse to apply patches if index is dirty

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am will refuse to apply patches if the index is dirty. Re-implement this behavior. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 46 ++ 1 file changed, 46 insertions(+)

[PATCH/WIP v2 12/19] am: implement --resolved/--continue

2015-06-11 Thread Paul Tan
Since 0c15cc9 (git-am: --resolved., 2005-11-16), git-am supported resuming from a failed patch application. The user will manually apply the patch, and the run git am --resolved which will then commit the resulting index. Re-implement this feature by introducing am_resolve(). Signed-off-by: Paul

[PATCH/WIP v2 09/19] am: commit applied patch

2015-06-11 Thread Paul Tan
Implement do_commit(), which commits the index which contains the results of applying the patch, along with the extracted commit message and authorship information. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 50 ++ 1 file

[PATCH/WIP v2 16/19] am: exit with user friendly message on patch failure

2015-06-11 Thread Paul Tan
Since ced9456 (Give the user a hint for how to continue in the case that git-am fails because it requires user intervention, 2006-05-02), git-am prints additional information on how the user can re-invoke git-am to resume patch application after resolving the failure. Re-implement this through the

[PATCH/WIP v2 15/19] am: implement quiet option

2015-06-11 Thread Paul Tan
Since 0e987a1 (am, rebase: teach quiet option, 2009-06-16), git-am supported the --quiet option and GIT_QUIET environment variable, and when told to be quiet, would only speak on failure. Re-implement this by introducing the say() function, which works like fprintf_ln(), but would only write to

[PATCH/WIP v2 10/19] am: refresh the index at start

2015-06-11 Thread Paul Tan
If a file is unchanged but stat-dirty, git-apply may erroneously fail to apply patches, thinking that they conflict with a dirty working tree. As such, since 2a6f08a (am: refresh the index at start and --resolved, 2011-08-15), git-am will refresh the index before applying patches. Re-implement

[PATCH/WIP v2 02/19] wrapper: implement xfopen()

2015-06-11 Thread Paul Tan
A common usage pattern of fopen() is to check if it succeeded, and die() if it failed: FILE *fp = fopen(path, w); if (!fp) die_errno(_(could not open '%s' for writing), path); Implement a wrapper function xfopen() for the above, so that we can save a few lines of

[PATCH/WIP v2 03/19] am: implement skeletal builtin am

2015-06-11 Thread Paul Tan
For the purpose of rewriting git-am.sh into a C builtin, implement a skeletal builtin/am.c that redirects to $GIT_EXEC_PATH/git-am if the environment variable _GIT_USE_BUILTIN_AM is not defined. Since in the Makefile git-am.sh takes precedence over builtin/am.c, $GIT_EXEC_PATH/git-am will contain

[PATCH/WIP v2 14/19] am: implement --abort

2015-06-11 Thread Paul Tan
Since 3e5057a (git am --abort, 2008-07-16), git-am supported the --abort option that will rewind HEAD back to the original commit. Re-implement this feature through am_abort(). Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), to prevent commits made

[PATCH] Fix power checking on OS X

2015-06-11 Thread Panagiotis Astithas
The output of pmset -g batt changed at some point from Currently drawing from 'AC Power' to the slightly different Now drawing from 'AC Power'. Starting the match from drawing makes the check work in both old and new versions of OS X. Signed-off-by: Panagiotis Astithas past...@gmail.com ---

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

2015-06-11 Thread Johannes Schindelin
Hi Mike, On 2015-06-11 16:02, Mike Rappazzo wrote: On Thu, Jun 11, 2015 at 9:40 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-06-11 03:30, Michael Rappazzo wrote: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index dc3133f..6d14315 100644 ---

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-11 Thread Ed Avis
I guess 'replace' would be a better word than 'restore' for the current behaviour. -- Ed Avis e...@waniasset.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: +bisect_terms () { + test $# -eq 2 || + die You need to give me at least two arguments + + if ! test -s $GIT_DIR/BISECT_START + then +

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Jeff King
On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: I see that do_fetch_pack checks server_supports(shallow). Is that enough to cover all fetch cases? And if it is, why does it not cover the matching clone cases? I think this replacement check would do if ((args-depth 0 ||

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-11 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: On 2015-06-10 17.05, Junio C Hamano wrote: -git-checkout - Checkout a branch or paths to the working tree +git-checkout - Switch branches or reverts changes in the working tree Two verbs in different moods; either switch branches or restore

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]'

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

2015-06-11 Thread Mike Rappazzo
On Thu, Jun 11, 2015 at 9:40 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Michael, On 2015-06-11 03:30, Michael Rappazzo wrote: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index dc3133f..6d14315 100644 --- a/git-rebase--interactive.sh +++

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

2015-06-11 Thread Johannes Schindelin
Hi Michael, On 2015-06-11 03:30, Michael Rappazzo wrote: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index dc3133f..6d14315 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -740,10 +740,19 @@ collapse_todo_ids() { # pick sha1

Re: [PATCH v2 1/2] t5520-pull: Simplify --rebase with dirty tree test

2015-06-11 Thread Paul Tan
On Sun, Jun 7, 2015 at 5:12 AM, Kevin Daudt m...@ikke.info wrote: @@ -278,25 +291,6 @@ test_expect_success 'rebased upstream + fetch + pull --rebase' ' ' -test_expect_success 'pull --rebase dies early with dirty working directory' ' - - git checkout to-rebase - git

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Duy Nguyen
On Thu, Jun 11, 2015 at 2:05 AM, Jeff King p...@peff.net wrote: On Wed, Jun 10, 2015 at 02:35:20PM -0400, Mike Edgar wrote: When the user passes --depth to git-clone the server's capabilities are not currently consulted. The client will send shallow requests even if the server does not

Re: [PATCH v2 2/2] pull: allow dirty tree when rebase.autostash enabled

2015-06-11 Thread Paul Tan
On Sun, Jun 7, 2015 at 5:12 AM, Kevin Daudt m...@ikke.info wrote: From: Kevin Daudt compufr...@gmail.com rebase learned to stash changes when it encounters a dirty work tree, but git pull --rebase does not. Only verify if the working tree is dirty when rebase.autostash is not enabled.

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Mike Hommey
On Thu, Jun 11, 2015 at 08:16:02AM -0700, Junio C Hamano wrote: Mike Hommey m...@glandium.org writes: I do agree that this is all confusing, but allow me to point out that it's already plenty confusing: namespace is a term that has been used to designate a generic kind of namespace *and*

[PATCH v2] Allow to control where the replace refs are looked for

2015-06-11 Thread Mike Hommey
It can be useful to have grafts or replace refs for specific use-cases while keeping the default view of the repository pristine (or with a different set of grafts/replace refs). It is possible to use a different graft file with GIT_GRAFT_FILE, but while replace refs are more powerful, they don't

RE: proxy_windows_386.exe Firewall Notification

2015-06-11 Thread BGaudreault Brian
Lol, sorry. I meant to post in the Vagrant forums. Too many projects going on at the same time! -Original Message- From: Konstantin Khomoutov [mailto:kostix+...@007spb.ru] Sent: Thursday, June 11, 2015 3:43 PM To: BGaudreault Brian Cc: git@vger.kernel.org Subject: Re:

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Junio C Hamano
Michael Edgar ad...@google.com writes: On Thu, Jun 11, 2015 at 10:32 AM, Jeff King p...@peff.net wrote: On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: I see that do_fetch_pack checks server_supports(shallow). Is that enough to cover all fetch cases? And if it is, why does it

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: On Thu, Jun 11, 2015 at 08:16:02AM -0700, Junio C Hamano wrote: Mike Hommey m...@glandium.org writes: I do agree that this is all confusing, but allow me to point out that it's already plenty confusing: namespace is a term that has been used to

Looking for feedback and help with a git-mirror for local usage

2015-06-11 Thread Bernd Naumann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have came up with an idea # Yep I know, exactly that kind of e-mail everyone wants to read ;) and I'm working currently on a shell-prototype to face the following situation and problem and need some feedback/advise: I often build in

Re: git_config_set(?) adding and removing creates extraneous lines

2015-06-11 Thread Matthieu Moy
Anish R Athalye aatha...@mit.edu writes: Now, when running `tail -n 3 .git/config`, you see: [branch master] [branch master] description = asdf\n Yes, this is a known bug that no one fixed yet. It was planned for Tanay's (Cc-ed) GSoC last year, but the project evolved in

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-11 Thread Scott Schmit
On Wed, Jun 10, 2015 at 08:05:32AM -0700, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: git checkout pathspec can be used to revert changes in the working tree. I somehow thought that concensus in the recent thread was that restore, not revert, is the more appropriate

git_config_set(?) adding and removing creates extraneous lines

2015-06-11 Thread Anish R Athalye
Hi all, This is a very minor bug I noticed (perhaps not even worth fixing because it’s not harmful), but I thought that I’d point it out. I found that if I used `git branch --edit-description` to add and remove descriptions a couple times, it would accumulate extra lines in my `.git/config`

Re: [PATCH] Fix power checking on OS X

2015-06-11 Thread Eric Sunshine
On Thu, Jun 11, 2015 at 10:37 AM, Panagiotis Astithas past...@gmail.com wrote: The output of pmset -g batt changed at some point from Currently drawing from 'AC Power' to the slightly different Now drawing from 'AC Power'. Starting the match from drawing makes the check work in both old and

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

2015-06-11 Thread Michael Rappazzo
Difference between v3 and v4 of this patch: - cleaned up changes in rearrange_squash() function - consolidated autosquash test Michael Rappazzo (1): git-rebase--interactive.sh: add config option for custom instruction format Documentation/git-rebase.txt | 7 +++

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

2015-06-11 Thread Michael Rappazzo
A config option 'rebase.instructionFormat' can override the default 'oneline' format of the rebase instruction list. Since the list is parsed using the left, right or boundary mark plus the sha1, they are prepended to the instruction format. Signed-off-by: Michael Rappazzo rappa...@gmail.com ---

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: - # start_bad_good is used to detect if we did a - # 'git bisect start bad_rev good_rev' - start_bad_good=0 + # terms_defined is used to detect if we did a + # 'git bisect start bad_rev good_rev' or if the

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Gabriel
Hi Johannes, I tried following your instructions but I can locate the sentence where the bad translation is. Please see here: http://stackoverflow.com/questions/30783818/find-instance-of-string-in-git-core-with-git-grep Any advice? Cheers, Gabriel El jue, 11 de jun 2015 a las 12:10 ,

Re: [PATCH] Documentation clarification on git-checkout regarding ours/theirs

2015-06-11 Thread Junio C Hamano
Simon A. Eugster simon...@gmail.com writes: From: Simon A. Eugster simon.eugs...@eps.ch Signed-off-by: Simon A. Eugster simon.eugs...@eps.ch --- Documentation/git-checkout.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: I do agree that this is all confusing, but allow me to point out that it's already plenty confusing: namespace is a term that has been used to designate a generic kind of namespace *and* refs/namespaces. See for example:

Re: [PATCH v2 2/7] bisect: replace hardcoded bad|good by variables

2015-06-11 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: - if (!strcmp(refname, bad)) { + char good_prefix[256]; + strcpy(good_prefix, name_good); + strcat(good_prefix, -); You are silently adding a restriction here: name_good must be small enough to fit in a 256-bytes

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

2015-06-11 Thread Michael Haggerty
I visually inspected patches 1 and 2 without finding any problems. Regarding this patch, I saw a few functions where you could convert local variables to struct object_id and then change function calls like hashcpy() to oidcpy(). See below. I'm not sure if it makes sense to do that in this same

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Junio C Hamano
Gabriel gabrielper...@gmail.com writes: Hi Johannes, I tried following your instructions but I can locate the sentence where the bad translation is. Please see here: http://stackoverflow.com/questions/30783818/find-instance-of-string-in-git-core-with-git-grep Any advice? Perhaps you are

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Gabriel
I think I've found where this issue is located: https://translations.launchpad.net/ubuntu/quantal/+source/git/+pots/git/es/+filter?person=franciscomol I'll try to fix it over there. Cheers, Gabriel El jue, 11 de jun 2015 a las 12:47 , Junio C Hamano gits...@pobox.com escribió: Gabriel

[PATCH v7 0/12] Create ref-filter from for-each-ref

2015-06-11 Thread Karthik Nayak
The previous version of this patch can be found here: http://thread.gmane.org/gmane.comp.version-control.git/270922 Changes found in this version: *Various changes to the 'filter_refs()' function. *Split 'for-each-ref: clean up code' into two commits. *Other small changes. --

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

2015-06-11 Thread Michael Haggerty
On 06/09/2015 06:28 PM, brian m. carlson wrote: 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

[PATCH v7 01/12] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-11 Thread Karthik Nayak
Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path() which when given an array of patterns and the refname checks if the refname

[PATCH v7 03/12] for-each-ref: change comment in ref_sort

2015-06-11 Thread Karthik Nayak
The comment in 'ref_sort' hasn't been changed 9f613dd. Change the comment to reflect changes made in the code since 9f613dd. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com ---

[PATCH v7 04/12] for-each-ref: rename 'refinfo' to 'ref_array_item'

2015-06-11 Thread Karthik Nayak
Rename 'refinfo' to 'ref_array_item' as a preparatory step for introduction of new structures in the forthcoming patch. Re-order the fields in 'ref_array_item' so that refname can be eventually converted to a FLEX_ARRAY. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by:

[PATCH v7 06/12] for-each-ref: introduce 'ref_array_clear()'

2015-06-11 Thread Karthik Nayak
Introduce and implement 'ref_array_clear()' which will free all allocated memory for 'ref_array'. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- builtin/for-each-ref.c | 21

[PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
Introduce 'ref_filter_cbdata' which will hold 'ref_filter' (conditions to filter the refs on) and 'ref_array' (the array of ref_array_items). Modify the code to use these new structures. This is a preparatory patch to eventually move code from 'for-each-ref' to 'ref-filter' and make it publicly

[PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
Introduce filter_refs() which will act as an API for filtering a set of refs. Based on the type of refs the user has requested, we iterate through those refs and apply filters as per the given ref_filter structure and finally store the filtered refs in the ref_array structure. Currently this will

[PATCH v7 12/12] ref-filter: make 'ref_array_item' use a FLEX_ARRAY for refname

2015-06-11 Thread Karthik Nayak
This would remove the need of using a pointer to store refname. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- ref-filter.c | 7 --- ref-filter.h | 2 +- 2 files changed, 5

[PATCH v7 09/12] ref-filter: add 'ref-filter.h'

2015-06-11 Thread Karthik Nayak
This is step one of creating a common library for 'for-each-ref', 'branch -l' and 'tag -l'. This creates a header file with the functions and data structures that ref-filter will provide. We move the data structures created in for-each-ref to this header file. Mentored-by: Christian Couder

[PATCH v7 08/12] for-each-ref: rename variables called sort to sorting

2015-06-11 Thread Karthik Nayak
Rename all the variables called sort to sorting to match the function/structure name changes made in the previous patch. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com ---

[PATCH v7 07/12] for-each-ref: rename some functions and make them public

2015-06-11 Thread Karthik Nayak
Rename some of the functions and make them publicly available. This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to other commands via public APIs. Functions renamed are: parse_atom()-

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

2015-06-11 Thread Phil Hord
On Tue, Jun 9, 2015 at 2:40 PM, Jens Lehmann jens.lehm...@web.de wrote: 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 phil.h...@gmail.com wrote: On Fri, Jun 5, 2015, 2:58 AM lucamilanesio luca.milane...@gmail.com

[PATCH v7 02/12] for-each-ref: clean up code

2015-06-11 Thread Karthik Nayak
In 'grab_single_ref()' remove the extra count variable 'cnt' and use the variable 'grab_cnt' of structure 'grab_ref_cbdata' directly instead. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

Re: [PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: + filter_refs(array, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN, filter); I think it is more common to have options at the end, so I'd write it as filter_refs(array, filter, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN); (changing the

Re: [PATCH v7 0/12] Create ref-filter from for-each-ref

2015-06-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: The previous version of this patch can be found here: http://thread.gmane.org/gmane.comp.version-control.git/270922 Changes found in this version: *Various changes to the 'filter_refs()' function. *Split 'for-each-ref: clean up code' into

Re: [PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
On 06/11/2015 10:30 PM, Matthieu Moy wrote: I think it is more common to have options at the end, so I'd write it as filter_refs(array, filter, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN); (changing the declaration too, obviously) I really like the way cmd_for_each_ref looks like now.

[PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
Introduce filter_refs() which will act as an API for filtering a set of refs. Based on the type of refs the user has requested, we iterate through those refs and apply filters as per the given ref_filter structure and finally store the filtered refs in the ref_array structure. Currently this will

Re: [PATCH/WIP v2 04/19] am: implement patch queue mechanism

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan pyoka...@gmail.com wrote: git-am applies a series of patches. If the process terminates abnormally, we want to be able to resume applying the series of patches. This requires the session state to be saved in a persistent location. Implement the

[PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Augie Fackler
When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. This is made a little complicated by the fact that in some cases (like cloning from smart-http, but not from a local repo) the fetch code reads the

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: +struct ref_filter_cbdata { + struct ref_array array; + struct ref_filter filter; +}; I didn't notice this at first, but why introduce the structure like this when you are going to turn it into pointers later in PATCH 7: Karthik Nayak

Re: [PATCH/WIP v2 05/19] am: split out mbox/maildir patches with git-mailsplit

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan pyoka...@gmail.com wrote: git-am.sh supports mbox, stgit and mercurial patches. Re-implement support for splitting out mbox/maildirs using git-mailsplit, while also implementing the framework required to support other patch formats in the future.

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
On 06/11/2015 11:11 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +struct ref_filter_cbdata { +struct ref_array array; +struct ref_filter filter; +}; I didn't notice this at first, but why introduce the structure like this when you are going to turn it into

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Michael Edgar
On Thu, Jun 11, 2015 at 10:32 AM, Jeff King p...@peff.net wrote: On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: I see that do_fetch_pack checks server_supports(shallow). Is that enough to cover all fetch cases? And if it is, why does it not cover the matching clone cases? I

Re: [PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 10:44 AM, Augie Fackler au...@google.com wrote: When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. This is made a little complicated by the fact that in some cases (like

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-11 Thread Junio C Hamano
Ed Avis e...@waniasset.com writes: I guess 'replace' would be a better word than 'restore' for the current behaviour. Hmm, but wouldn't replace have the same issue as overwrite, namely, 'replace with what?'. -- To unsubscribe from this list: send the line unsubscribe git in the body of a

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

2015-06-11 Thread Jens Lehmann
Am 11.06.2015 um 18:11 schrieb Phil Hord: On Tue, Jun 9, 2015 at 2:40 PM, Jens Lehmann jens.lehm...@web.de wrote: 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 phil.h...@gmail.com wrote: On Fri, Jun 5, 2015, 2:58

[PATCH v2] fetch-pack: optionally save packs to disk

2015-06-11 Thread Augie Fackler
When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. This is made a little complicated by the fact that in some cases (like cloning from smart-http, but not from a local repo) the fetch code reads the

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On 06/11/2015 11:11 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +struct ref_filter_cbdata { +struct ref_array array; +struct ref_filter filter; +}; I didn't notice this at first, but why introduce the

proxy_windows_386.exe Firewall Notification

2015-06-11 Thread BGaudreault Brian
Hello, when connecting to a Vagrant Shared VM via SSH, I'm getting a Windows Firewall prompt about 'proxy_windows_386.exe' (in C:\Program Files\hashicorp\vagrant\embedded\gems\gems\vagrant-share-1.1.0\localbin\), which looks like a malware-type name. Here's the message: Windows Security

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
On 06/12/2015 12:43 AM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: On 06/11/2015 11:11 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: +struct ref_filter_cbdata { +struct ref_array array; +struct ref_filter filter; +}; I didn't notice

Bug report: Unhandled Exception

2015-06-11 Thread Gary England
Hello, Using git version 1.9.2-preview20140411, in Git Bash for Windows, performing a git pull --rebase, received an unhandled exception. Here is the stack trace: MSYS-1.0.12 Build:2012-07-05 14:56 Exception: STATUS_ACCESS_VIOLATION at eip=00418DAA eax=680A38E4 ebx=685704CC ecx=00542E38

Re: [PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Junio C Hamano
Augie Fackler au...@google.com writes: @@ -708,9 +708,8 @@ static int get_pack(struct fetch_pack_args *args, cmd.argv = argv; av = argv; *hdr_arg = 0; + struct pack_header header; decl-after-stmt here... if (!args-keep_pack unpack_limit) { -

Re: proxy_windows_386.exe Firewall Notification

2015-06-11 Thread Konstantin Khomoutov
On Thu, 11 Jun 2015 17:46:58 + BGaudreault Brian bgaudrea...@edrnet.com wrote: Hello, when connecting to a Vagrant Shared VM via SSH, I'm getting a Windows Firewall prompt about 'proxy_windows_386.exe' (in C:\Program Files\hashicorp\vagrant\embedded\gems\gems\vagrant-share-1.1.0

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: ... but after PATCH 7, filter and array are passed to ref_filter so you don't have this overhead anyway. Makes sense. Yes, there we wouldn't have a ref_cbdata in 'for-each-ref'. But this would be taken care of in 'filter_refs()'. Makes sense. Not

Re: [PATCH 0/8] object_id part 2

2015-06-11 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: brian m. carlson sand...@crustytoothpaste.net writes: On Wed, Jun 10, 2015 at 11:51:14PM +, brian m. carlson wrote: On Wed, Jun 10, 2015 at 03:50:32PM -0700, Junio C Hamano wrote: brian m. carlson sand...@crustytoothpaste.net writes: Convert