Create a sample of a script for a pre-push hook. The main purpose is to
illustrate how a script may parse the information which is supplied to
such a hook. The script may also be useful to some people as-is for
avoiding to push commits which are marked as a work in progress.
Signed-off-by: Aaron
Add support for a pre-push hook which can be used to determine if the
set of refs to be pushed is suitable for the target repository. The
hook is run with two arguments specifying the name and location of the
destination repository.
Information about what is to be pushed is provided by sending li
Create find_hook() function to determine if a given hook exists and is
executable. If it is, the path to the script will be returned,
otherwise NULL is returned.
This encapsulates the tests that are used to check for the existence of
a hook in one place, making it easier to modify those checks if
Main changes since the initial version:
* The first patch converts the existing hook callers to use the new
find_hook() function.
* Information about what is to be pushed is now sent over a pipe rather
than passed as command-line parameters.
Aaron Schrab (3):
hooks: Add function to chec
2013/1/12 Pete Wyckoff :
> sh...@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500:
>> 2013/1/12 Pete Wyckoff :
>> > sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:
>> >> I'm in a situation where I don't have P4 admin rights to use the
>> >> --preserve-user option of git-p4. However, I would like
On 01/12/2013 08:23 PM, John Keeping wrote:
> Although 2to3 will fix most issues in Python 2 code to make it run under
> Python 3, it does not handle the new strict separation between byte
> strings and unicode strings. There is one instance in
> git_remote_helpers where we are caught by this.
>
On Sat, Jan 12, 2013 at 10:30 PM, Ping Yin wrote:
> Following setup works for me in ubuntu (10.04,11.04) for a long time
>
> alias gtlg='git log'
> complete -o default -o nospace -F _git_log gtlg
>
> However, in debian (testing, wheezy), it doesn't work
>
> $ gtlg or
> gtlg or-bash: [: 1: unary o
'git subtree merge' will fail if the argument of '--prefix' has a slash
appended.
Signed-off-by: Techlive Zheng
---
contrib/subtree/git-subtree.sh | 2 +-
contrib/subtree/t/t7900-subtree.sh | 19 +++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/contrib/subt
Use %B rather than %s%n%n%b to handle the special case of a commit that
only has a subject line. We don't want to introduce a newline after the
subject, causing generation of a new hash.
After this commit, the newly split branch might differ from the previous
one. If this is the case, --fallback
Signed-off-by: Techlive Zheng
---
contrib/subtree/t/t7900-subtree.sh | 865 ++---
1 file changed, 614 insertions(+), 251 deletions(-)
diff --git a/contrib/subtree/t/t7900-subtree.sh
b/contrib/subtree/t/t7900-subtree.sh
index bb4fd1f..ece2064 100755
--- a/contrib/
Mostly prepare for the later tests refactoring.
Signed-off-by: Techlive Zheng
---
contrib/subtree/git-subtree.sh | 66 -
contrib/subtree/t/t7900-subtree.sh | 283 +++--
2 files changed, 179 insertions(+), 170 deletions(-)
diff --git a/contrib/subtree
From: "David A. Greene"
Delete the comments indicating test numbers as it causes maintenance
headaches. t*.sh -i will help us find any broken tests.
Signed-off-by: David A. Greene
Signed-off-by: Techlive Zheng
---
contrib/subtree/t/t7900-subtree.sh | 55 --
Signed-off-by: Techlive Zheng
---
contrib/subtree/.gitignore | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/contrib/subtree/.gitignore b/contrib/subtree/.gitignore
index 91360a3..59aeeb4 100644
--- a/contrib/subtree/.gitignore
+++ b/contrib/subtree/.gitignore
@@ -1,6 +1,
Signed-off-by: Techlive Zheng
---
contrib/subtree/git-subtree.sh | 2 ++
contrib/subtree/t/t7900-subtree.sh | 2 ++
2 files changed, 4 insertions(+)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 920c664..138e1e0 100755
--- a/contrib/subtree/git-subtree.sh
* refactor tests for 'git subtree'
* rearrange some tests
* clean up unnecessary quotes
* make each test self-contained
* keep commit intact after the split by using '%B'
* handle '--prefix' argument with slash appended correctly
David A. Greene (1):
contrib/subtree: Remove test number com
On Sat, Jan 12, 2013 at 6:43 PM, Jeff King wrote:
> On Sat, Jan 12, 2013 at 06:39:52AM +0530, Sitaram Chamarty wrote:
>
>> > 1. The repo has a ref R pointing at commit X.
>> >
>> > 2. A user starts a push to another ref, Q, of commit Y that builds on
>> > X. Git advertises ref R, so the s
On Sat, Jan 12, 2013 at 06:43:04PM -0500, Pete Wyckoff wrote:
> j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +:
>> I started having a look to see how much work would be needed to make Git
>> work with Python 3 and the answer is mostly not much. The exception is
>> git-p4.py which is hit
j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +:
> I started having a look to see how much work would be needed to make Git
> work with Python 3 and the answer is mostly not much. The exception is
> git-p4.py which is hit hard by the distinction between byte strings and
> unicode strings,
j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +:
> When different version of python are used to build via distutils, the
> behaviour can change. Detect changes in version and pass --force in
> this case.
[..]
> diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
[..]
>
sh...@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500:
> 2013/1/12 Pete Wyckoff :
> > sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:
> >> I'm in a situation where I don't have P4 admin rights to use the
> >> --preserve-user option of git-p4. However, I would like to keep user
> >> information i
On Fri, Jan 11, 2013 at 3:20 AM, Nguyễn Thái Ngọc Duy wrote:
>
> diff --git a/cache.h b/cache.h
> index e52365d..a3c316f 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -476,6 +476,9 @@ extern int ie_modified(const struct index_state *, struct
> cache_entry *, struct
> /* Pathspec magic */
> #defin
Since 90e1818f9a (git-rebase: add keep_empty flag, 2012-04-20)
'git rebase --preserve-merges' fails to preserve empty merge commits
unless --keep-empty is also specified. Merge commits should be
preserved in order to preserve the structure of the rebased graph,
even if the merge commit does not i
2013/1/12 Pete Wyckoff :
> sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:
>> I'm in a situation where I don't have P4 admin rights to use the
>> --preserve-user option of git-p4. However, I would like to keep user
>> information in the associated Git branch.
>>
>> Would it be possible to add
This is harmless in Python 2, which sees the parentheses as redundant
grouping, but is required for Python 3. Since this is the only change
required to make this script just run under Python 3 without needing
2to3 it seems worthwhile.
The case of an empty print must be handled specially because i
Python 3 forbids unbuffered I/O in text mode. Change the reading of
stdin in git-remote-testpy so that we read the lines as bytes and then
decode them a line at a time.
This allows us to keep the I/O unbuffered in order to avoid
reintroducing the bug fixed by commit 7fb8e16 (git-remote-testgit: f
Under Python 3 'hasher.update(...)' must take a byte string and not a
unicode string. Explicitly encode the argument to this method as UTF-8
so that this code works under Python 3.
This moves the required Python version forward to 2.0.
Signed-off-by: John Keeping
---
git-remote-testpy.py | 8 +
The changes to allow this script to run with Python 3 are minimal and do
not affect its functionality on the versions of Python 2 that are
already supported (2.4 onwards).
Signed-off-by: John Keeping
---
contrib/svn-fe/svnrdump_sim.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
di
Using the approach detailed on the Python wiki[1], run 2to3 on the code
as part of the build if building with Python 3.
The code itself requires no changes to convert cleanly.
[1] http://wiki.python.org/moin/PortingPythonToPy3k
Signed-off-by: John Keeping
---
git_remote_helpers/setup.py | 10 +
When different version of python are used to build via distutils, the
behaviour can change. Detect changes in version and pass --force in
this case.
Signed-off-by: John Keeping
---
git_remote_helpers/.gitignore | 1 +
git_remote_helpers/Makefile | 8 +++-
2 files changed, 8 insertions(+),
Although 2to3 will fix most issues in Python 2 code to make it run under
Python 3, it does not handle the new strict separation between byte
strings and unicode strings. There is one instance in
git_remote_helpers where we are caught by this.
Fix it by explicitly decoding the incoming byte string
Change inline Python to call "print" as a function not a statement.
This is harmless because Python 2 will see the parentheses as redundant
grouping but they are necessary to run this code with Python 3.
Signed-off-by: John Keeping
---
git_remote_helpers/Makefile | 2 +-
1 file changed, 1 inser
I started having a look to see how much work would be needed to make Git
work with Python 3 and the answer is mostly not much. The exception is
git-p4.py which is hit hard by the distinction between byte strings and
unicode strings, particularly because the Python output mode of p4
targets Python
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
This is not really a bug, but a small usability problem.
When completing a reference, Bash will add a space after the reference name.
As an example in:
$git show master
The problem is that an user may want to show a tree or blog object fro
On Tuesday 2012-10-02 10:26, Johannes Sixt wrote:
>
>Note that git commit -m A --allow-empty *DID* create a commit. Only, that
>it received the same name (SHA1) as the commit you created before it
>because it had the exact same contents (files, parents, author, committer,
>and timestamps). Obvious
Michael Haggerty wrote:
> Regarding your claim that "within a few months the Perl git-cvsimport is
> going to cease even pretending to work": It might be that the old
> git-cvsimport will stop working *for people who upgrade to cvsps 3.x*.
> But it is not realistic to expect people to synchronize
Hi Eric,
Eric S. Raymond wrote:
> But in practice the git crew was going to lose that
> capability anyway simply because the new wrapper will support three
> engines rather than just one. It's not practical for the git tests to
> handle that many variant external dependencies.
See t
sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500:
> I'm in a situation where I don't have P4 admin rights to use the
> --preserve-user option of git-p4. However, I would like to keep user
> information in the associated Git branch.
>
> Would it be possible to add an option for this?
The --pres
It's been a while I was trying to get this in. Recently, I realized how
important this is.
Please keep me CC'ed as I am not subscribed to the list.
Michal Privoznik (3):
git-completion.bash: Autocomplete --minimal and --histogram for
git-diff
config: Introduce diff.algorithm variable
di
Even though --patience was already there, we missed --minimal and
--histogram for some reason.
Signed-off-by: Michal Privoznik
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
On Sat, Jan 12, 2013 at 6:56 AM, Junio C Hamano wrote:
> * nd/parse-pathspec (2013-01-11) 20 commits
>
> Uses the parsed pathspec structure in more places where we used to
> use the raw "array of strings" pathspec.
>
> Unfortunately, this conflicts a couple of topics in flight. I tried
> to be
Michael Haggerty :
> Otherwise, how do we know that cvsps currently works with git-cvsimport?
> (OK, you claim that it does, but in the next breath you admit that
> there is a new failure in "one pathological tagging case".) How can we
> understand its strengths/weaknesses? How can we gain confid
Since command line options have higher priority than config file
variables and taking previous commit into account, we need a way
how to specify myers algorithm on command line. However,
inventing `--myers` is not the right answer. We need far more
general option, and that is `--diff-algorithm`. Th
Some users or projects prefer different algorithms over others, e.g.
patience over myers or similar. However, specifying appropriate
argument every time diff is to be used is impractical. Moreover,
creating an alias doesn't play nicely with other tools based on diff
(git-show for instance). Hence,
Junio C Hamano :
> And here is what I got:
Hm. In my version of these tests, I only have one regression from the
old combo (in the pathological tags test, t9602). You're seeing more
breakage than that, obviously.
> A funny thing was that without cvsps-3.7 on $PATH (which means I am
> getting dis
I have the feeling I'm only seeing one side of this conversation...
On 01/12/2013 09:40 AM, Junio C Hamano wrote:
> The new cvsimport requires at least Python 2.7 to work; do not fail
> the cvsimport tests on platforms without one.
>
> Signed-off-by: Junio C Hamano
> ---
>
> Junio C Hamano wr
On 01/11/2013 04:32 AM, Junio C Hamano wrote:
> From: "Eric S. Raymond"
>
> The combination of git-cvsimport and cvsps had serious problems.
Agreed.
> [...]
> This patch also removes Michael Haggerty's git-cvsimport tests
> (t960[123]) from the git tree. These are actually conversion-engine
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 11/01/2013 23:02, Junio C Hamano ha scritto:
> Manlio Perillo writes:
>
>> +# Process path list returned by "ls-files" and "diff-index --name-only"
>> +# commands, in order to list only file names relative to a specified
>> +# directory, and appen
Hello,
Saturday 12 January 2013 06:25:21 rašė:
> On Sat, Jan 12, 2013 at 03:59:52PM +0200, Modestas Vainius wrote:
> > @@ -306,6 +311,11 @@ static CURL *get_curl_handle(void)
> >
> > if (curl_ftp_no_epsv)
> >
> > curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
> >
> > +#i
On Sat, Jan 12, 2013 at 03:59:52PM +0200, Modestas Vainius wrote:
> @@ -306,6 +311,11 @@ static CURL *get_curl_handle(void)
> if (curl_ftp_no_epsv)
> curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
>
> +#ifdef CURLOPT_USE_SSL
> +if (curl_ssl_try)
> + curl_ea
Add a boolean http.sslTry option which allows to enable AUTH SSL/TLS and
encrypted data transfers when connecting via regular FTP protocol.
Default is false since it might trigger certificate verification errors on
misconfigured servers.
Signed-off-by: Modestas Vainius
---
Documentation/config.
On Sat, Jan 12, 2013 at 06:39:52AM +0530, Sitaram Chamarty wrote:
> > 1. The repo has a ref R pointing at commit X.
> >
> > 2. A user starts a push to another ref, Q, of commit Y that builds on
> > X. Git advertises ref R, so the sender knows they do not need to
> > send X, but only
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 11/01/2013 19:48, Manlio Perillo ha scritto:
> The git-completion.bash script did not implemented full, git aware,
> support to complete paths, for git commands that operate on files within
> the current working directory or the index.
> [...]
>
>
On Sat, Jan 12, 2013 at 6:44 AM, Sascha Cunz wrote:
> Am Freitag, 11. Januar 2013, 23:10:36 schrieb Junio C Hamano:
>> Jardel Weyrich writes:
>> > I believe `remote set-url --add --push` has a bug. Performed tests
>> > with v1.8.0.1 and v1.8.1 (Mac OS X).
>> >
>> > Quoting the relevant part of th
Am Freitag, 11. Januar 2013, 23:10:36 schrieb Junio C Hamano:
> Jardel Weyrich writes:
> > I believe `remote set-url --add --push` has a bug. Performed tests
> > with v1.8.0.1 and v1.8.1 (Mac OS X).
> >
> > Quoting the relevant part of the documentation:
> >> set-url
> >>
> >> Changes URL re
The new cvsimport requires at least Python 2.7 to work; do not fail
the cvsimport tests on platforms without one.
Signed-off-by: Junio C Hamano
---
Junio C Hamano writes:
> http://docs.python.org/2/library/subprocess.html tells me that
> check_output has first become available in 2.7.
>
>
Jardel Weyrich writes:
> Step 1:
>
> jweyrich@pharao:test_clone1 [* master]$ git remote -v
> origin /Volumes/sandbox/test (fetch)
> origin /Volumes/sandbox/test (push)
>
> jweyrich@pharao:test_clone1 [* master]$ git config -l | grep '^remote\.origin'
> remote.origin.url=/Volumes/sandbox/test
> re
Step 1:
jweyrich@pharao:test_clone1 [* master]$ git remote -v
origin /Volumes/sandbox/test (fetch)
origin /Volumes/sandbox/test (push)
jweyrich@pharao:test_clone1 [* master]$ git config -l | grep '^remote\.origin'
remote.origin.url=/Volumes/sandbox/test
remote.origin.fetch=+refs/heads/*:refs/remo
57 matches
Mail list logo