Error message: unable to open object pack directory: .git/objects/pack: Too many open files
I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? Ivan. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
On Mon, Nov 11, 2013 at 05:09:17PM +0100, Andreas Ericsson wrote: On 2013-11-09 08:05, Christian Couder wrote: Here is a big patch series to replace prefixcmp() with a new has_prefix() function. Seems like totally useless codechurn to me. Besides, prefixcmp() ties in nicely with strcmp() and memcmp() (and returns 0 on a match just like its namesakes), whereas your function must return non-zero on match and thus can't be used as a qsort() callback. Granted, prefixcmp() lends itself poorly to that as well, but at least it's consistent with the other *cmp() functions. I think you missed the earlier threads that let up to this, but the summary is that prefixcmp does not really make any sense as a qsort callback. Consider that comparing foobar and foo would yield 0, but foo and foobar would be positive. I am ambivalent on the code churn, but if we do apply it, we should probably leave off the final patch (dropping prefixcmp) for a cycle to let topics in flight catch up to the change. Just diffing master and next, I see some new uses of prefixcmp which will need adjusted, along with spots where the patches themselves will cause textual conflicts. -Peff -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] Emphasize options and force ASCIIDOC escaping of --
On Fri, Nov 08, 2013 at 07:48:51PM -0500, Jason St. John wrote: Using more options generally further limits the output (e.g. -`--since=date1` limits to commits newer than `date1`, and using it -with `--grep=pattern` further limits to commits whose log message +'\--since=date1' limits to commits newer than `date1`, and using it +with '\--grep=pattern' further limits to commits whose log message has a line that matches `pattern`), unless otherwise noted. Others pointed out that we generally prefer the `literal` formatting for such options (with backticks), which I agree with. If your target is formatting manpages (and not html), you may want to build with MAN_BOLD_LITERAL set in the Makefile, which will embolden the literals in the output (since we cannot typeset them in a monospace font on the terminal, as we would for html). -Peff -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
1024 On 12 November 2013 13:34, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Tue, 12 Nov 2013 12:02:38 +0400 Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What does ulimit -n tells to you when you run it before executing `git push`? -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
On Tue, 12 Nov 2013 12:02:38 +0400 Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What does ulimit -n tells to you when you run it before executing `git push`? -- 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 http://vger.kernel.org/majordomo-info.html
Problem while cloning a git repo
Hello, When I clone a repository, I get an error from git: git clone http://192.168.0.18:8080/test test_Gerrit Clonage dans 'test_Gerrit'... remote: Counting objects: 25106, done remote: Finding sources: 100% (25106/25106) error: RPC failed; result=56, HTTP code = 200iB | 8.12 MiB/s fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed The repo has some big zip files commited inside. I use fedora 19 64 bits and git version is 1.8.3.1. Best regards, YC -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
On Tue, Nov 12, 2013 at 3:02 PM, Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What OS do you use? If the repository can be published, please do. Compress the whole .git directory, don't push or anything. Does the error message begin with remote: ? If not you could try strace and at least identify what files are opened. -- Duy -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
I use linux. I can't publish repo - it's proprietary, it weights ~300M unpacked, and it uses references ~3Gb. Error message doesn't contain remote: prefix. The majority of opened files have name like: objects/pack/pack-hash.[ pack | idx ] They all are from referenced repo. I have disabled gc in the referenced repo - to prevent all local repos from breaking. May this be the cause of problem? On 12 November 2013 18:19, Duy Nguyen pclo...@gmail.com wrote: On Tue, Nov 12, 2013 at 3:02 PM, Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What OS do you use? If the repository can be published, please do. Compress the whole .git directory, don't push or anything. Does the error message begin with remote: ? If not you could try strace and at least identify what files are opened. -- Duy -- 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 http://vger.kernel.org/majordomo-info.html
Re: htonll, ntohll
W dniu 2013-11-05 01:00, Ramsay Jones pisze: [Note: I have never particularly liked htons, htonl et.al., so adding these htonll/ntohll functions doesn't thrill me! :-D For example see this post[1], which echo's my sentiments exactly.] HTH ATB, Ramsay Jones [1] http://commandcenter.blogspot.co.uk/2012/04/byte-order-fallacy.html Errr... htonl is about host to network order, and not about big- or little-endianness of architecture. The macros are good, its their implementation that might fail [1]. -- Jakub Narębski -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] [trivial] Fix comment typo
Correct spelling typo Signed-off-by: Masanari Iida standby2...@gmail.com --- git-bisect.sh | 2 +- pathspec.c| 4 ++-- wrapper.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 9f064b6..ebac284 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -137,7 +137,7 @@ bisect_start() { # cogito usage, and cogito users should understand # it relates to cg-seek. [ -s $GIT_DIR/head-name ] - die $(gettext won't bisect on seeked tree) + die $(gettext won't bisect on sought tree) start_head=${head#refs/heads/} ;; *) diff --git a/pathspec.c b/pathspec.c index ad1a9f5..be962d4 100644 --- a/pathspec.c +++ b/pathspec.c @@ -193,11 +193,11 @@ static unsigned prefix_pathspec(struct pathspec_item *item, magic |= short_magic; *p_short_magic = short_magic; - /* --noglob-pathspec adds :(literal) _unless_ :(glob) is specifed */ + /* --noglob-pathspec adds :(literal) _unless_ :(glob) is specified */ if (noglob_global !(magic PATHSPEC_GLOB)) global_magic |= PATHSPEC_LITERAL; - /* --glob-pathspec is overriden by :(literal) */ + /* --glob-pathspec is overridden by :(literal) */ if ((global_magic PATHSPEC_GLOB) (magic PATHSPEC_LITERAL)) global_magic = ~PATHSPEC_GLOB; diff --git a/wrapper.c b/wrapper.c index 9a6aaaf..0cc5636 100644 --- a/wrapper.c +++ b/wrapper.c @@ -133,7 +133,7 @@ void *xcalloc(size_t nmemb, size_t size) /* * Limit size of IO chunks, because huge chunks only cause pain. OS X * 64-bit is buggy, returning EINVAL if len = INT_MAX; and even in - * the absense of bugs, large chunks can result in bad latencies when + * the absence of bugs, large chunks can result in bad latencies when * you decide to kill the process. */ #define MAX_IO_SIZE (8*1024*1024) -- 1.8.5.rc1.17.g0ecd94d -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] [trivial] Fix spelling typo in contrib
Correct spelling typo in contrib Signed-off-by: Masanari Iida standby2...@gmail.com --- contrib/gitview/gitview | 2 +- contrib/mw-to-git/git-remote-mediawiki.perl | 2 +- contrib/mw-to-git/t/test-gitmw-lib.sh | 2 +- contrib/mw-to-git/t/test.config | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 4c99dfb..4e23c65 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -1205,7 +1205,7 @@ class GitView(object): #The first parent always continue on the same line try: - # check we alreay have the value + # check we already have the value tmp_node_pos = self.nodepos[commit.parent_sha1[0]] except KeyError: self.colours[commit.parent_sha1[0]] = colour diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 476e0a2..3f8d993 100755 --- a/contrib/mw-to-git/git-remote-mediawiki.perl +++ b/contrib/mw-to-git/git-remote-mediawiki.perl @@ -1315,7 +1315,7 @@ sub get_mw_namespace_id { # Store notANameSpace as special value for inexisting namespaces my $store_id = ($id || 'notANameSpace'); - # Store explicitely requested namespaces on disk + # Store explicitly requested namespaces on disk if (!exists $cached_mw_namespace_id{$name}) { run_git(qq(config --add remote.${remotename}.namespaceCache ${name}:${store_id})); $cached_mw_namespace_id{$name} = 1; diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh index ca6860f..3372b2a 100755 --- a/contrib/mw-to-git/t/test-gitmw-lib.sh +++ b/contrib/mw-to-git/t/test-gitmw-lib.sh @@ -91,7 +91,7 @@ test_diff_directories () { # Check that dir contains exactly N files test_contains_N_files () { if test `ls -- $1 | wc -l` -ne $2; then - echo directory $1 sould contain $2 files + echo directory $1 should contain $2 files echo it contains these files: ls $1 false diff --git a/contrib/mw-to-git/t/test.config b/contrib/mw-to-git/t/test.config index 4cfebe9..5ba0684 100644 --- a/contrib/mw-to-git/t/test.config +++ b/contrib/mw-to-git/t/test.config @@ -12,7 +12,7 @@ SERVER_ADDR=localhost TMP=/tmp DB_FILE=wikidb.sqlite -# If LIGHTTPD is not set to true, the script will use the defaut +# If LIGHTTPD is not set to true, the script will use the default # web server running in WIKI_DIR_INST. WIKI_DIR_INST=/var/www -- 1.8.5.rc1.17.g0ecd94d -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] [trivial] Fix typo in git-gui
Correct spelling typo in git-gui Signed-off-by: Masanari Iida standby2...@gmail.com --- git-gui/Makefile | 2 +- git-gui/lib/blame.tcl | 2 +- git-gui/lib/index.tcl | 2 +- git-gui/lib/spellcheck.tcl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/git-gui/Makefile b/git-gui/Makefile index e9c2bc3..cde8b2e 100644 --- a/git-gui/Makefile +++ b/git-gui/Makefile @@ -4,7 +4,7 @@ all:: # # Define NO_MSGFMT if you do not have msgfmt from the GNU gettext # package and want to use our rough pure Tcl po-msg translator. -# TCL_PATH must be vaild for this to work. +# TCL_PATH must be valid for this to work. # GIT-VERSION-FILE: FORCE diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl index 324f774..b1d15f4 100644 --- a/git-gui/lib/blame.tcl +++ b/git-gui/lib/blame.tcl @@ -5,7 +5,7 @@ class blame { image create photo ::blame::img_back_arrow -data {R0lGODlhGAAYAIUAAPwCBEzKXFTSZIz+nGzmhGzqfGTidIT+nEzGXHTqhGzmfGzifFzadETCVES+VARWDFzWbHzyjAReDGTadFTOZDSyRDyyTCymPARaFGTedFzSbDy2TCyqRCyqPARaDAyCHES6VDy6VCyiPAR6HCSeNByWLARyFARiDARqFGTifARiFCH5BAEALAAYABgAAAajQIBwSCwaj8ikcsk0BppJwRPqHEypQwHBis0WDAdEFyBIKBaMAKLBdjQeSkFBYTBAIvgEoS6JmhUTEwIUDQ4VFhcMGEhyCgoZExoUaxsWHB0THkgfAXUGAhoBDSAVFR0XBnCbDRmgog0hpSIiDJpJIyEQhBUcJCIlwA22SSYVogknEg8eD82qSigdDSknY0IqJQXPYxIl1dZCGNvWw+Dm510GQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7} -# Persistant data (survives loads) +# Persistent data (survives loads) # field history {}; # viewer history: {commit path} field header; # array commit,key - header field diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl index 8efbbdd..74a81a7 100644 --- a/git-gui/lib/index.tcl +++ b/git-gui/lib/index.tcl @@ -414,7 +414,7 @@ proc revert_helper {txt paths} { # such distinction is needed in some languages. Previously, the # code used Revert changes in for both, but that can't work # in languages where 'in' must be combined with word from - # rest of string (in diffrent way for both cases of course). + # rest of string (in different way for both cases of course). # # FIXME: Unfortunately, even that isn't enough in some languages # as they have quite complex plural-form rules. Unfortunately, diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl index e612030..538d61c 100644 --- a/git-gui/lib/spellcheck.tcl +++ b/git-gui/lib/spellcheck.tcl @@ -14,7 +14,7 @@ field w_menu ; # context menu for the widget field s_menuidx 0 ; # last index of insertion into $w_menu field s_i {} ; # timer registration for _run callbacks -field s_clear0 ; # did we erase mispelled tags yet? +field s_clear0 ; # did we erase misspelled tags yet? field s_seen[list] ; # lines last seen from $w_text in _run field s_checked [list] ; # lines already checked field s_pending [list] ; # [$line $data] sent to ispell/aspell @@ -259,7 +259,7 @@ method _run {} { if {$n == $cur_line ![regexp {^\W$} [$w_text get $cur_pos insert]]} { - # If the current word is mispelled remove the tag + # If the current word is misspelled remove the tag # but force a spellcheck later. # set tags [$w_text tag names $cur_pos] -- 1.8.5.rc1.17.g0ecd94d -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] [trivial] Fix typo in Documentation
Correct spelling typo in Documentation Signed-off-by: Masanari Iida standby2...@gmail.com --- Documentation/technical/http-protocol.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt index caf941a..d21d77d 100644 --- a/Documentation/technical/http-protocol.txt +++ b/Documentation/technical/http-protocol.txt @@ -307,7 +307,7 @@ Clients MUST first perform ref discovery with S: ACK %s, continue S: NAK -Clients MUST NOT reuse or revalidate a cached reponse. +Clients MUST NOT reuse or revalidate a cached response. Servers MUST include sufficient Cache-Control headers to prevent caching of the response. @@ -468,7 +468,7 @@ Clients MUST first perform ref discovery with S: S: -Clients MUST NOT reuse or revalidate a cached reponse. +Clients MUST NOT reuse or revalidate a cached response. Servers MUST include sufficient Cache-Control headers to prevent caching of the response. -- 1.8.5.rc1.17.g0ecd94d -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
Jeff King p...@peff.net writes: I am ambivalent on the code churn, but if we do apply it, we should probably leave off the final patch (dropping prefixcmp) for a cycle to let topics in flight catch up to the change. Just diffing master and next, I see some new uses of prefixcmp which will need adjusted, along with spots where the patches themselves will cause textual conflicts. Yes, I did that check too (but between 'maint' and 'pu'). I think it is a good idea to stop using whatever_cmp() name for things that are not *cmp() functions in the longer term, but smooth migration is a bit tricky (but not as tricky as end-user visible transitions). Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of these is correct without looking at existing callsites? has_suffix(filename, txt); has_suffix(filename, .txt); The semantics of the function we have is the latter and is better called endswith(), I suspect. And the corresponding function to check for head matches should probably be called beginswith(). -- 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 http://vger.kernel.org/majordomo-info.html
Re: Request: timeout option for remote operations, esp. git fetch
On 11/10/2013 12:17 PM, Eric Wong wrote: H. Peter Anvin h...@zytor.com wrote: When a remote server is unavailable or very slow, some git commands can stall out indefinitely. It would be a very good thing if remote commands -- but especially git fetch -- could be given a timeout. We've had SO_KEEPALIVE on git and ssh transports since e47a8583 (2011-12-06) SO_KEEPALIVE for http was added recently (a15d069a) and will be in git 1.8.5 Do you want a shorter timeout for slow (but still alive) servers? Yes; note that SO_KEEPALIVE only guarantees that the server is alive at the TCP socket level. If the server is overloaded but technically alive it may still make no meaningful forward progress. -hpa -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 06/10] fast-export: add new --refspec option
Richard Hansen rhan...@bbn.com writes: I thought that the discussion agreed this option should not be called --refspec but something like --refmap? I don't know what you agreed to, http://article.gmane.org/gmane.comp.version-control.git/237473 Yup, that was what I had in mind. but I didn't agree to anything. Based on your silence I too thought that you had agreed. Careful. Silence does not mean agreement, at least around here. It may be just the person was busy and hasn't got around to it, was not paying attention and missed the discussion, or was not as interested in the topic as his/her other activities. That, especially the last possibility among the three example reasons above, was why I said the discussion agreed, not you agreed. What you pass to this option is a refspec, so it makes sense to name the option --refspec. As discussed in that thread, it's not really the same thing as a refspec used in push or fetch. In those commands, the refspec specifies two separable things: what to transfer, and how to translate refs names between the remote and local repositories. IIUC, the fast-export --refspec argument only specifies how to translate ref names, not what gets transferred. If my understanding is correct, then I agree with Junio and Peff that --refmap is a better name. I know from one of the tests that the option Felipe added is implemented in such a way that allows: git fast-export --option refs/heads/master:refs/heads/next master to rename the destination, but I didn't check, when I wrote the message to envision how a similar mechanism could be used to enhance push/fetch in the future, if it can be actually used as a mapping git fast-export --option refs/heads/*:refs/remotes/mine/* master Being able to do so was the only reason why I agree with the patch in question (not my toy patch, but [6/10] that started this thread) that it is a good idea in the longer term, as the other approach I suggested to teach revision command line parser to optionally take refspecs as if they specify LHS of the colon as object name with rev_cmdline annotations would not work well for such a purpose. Thanks. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] [trivial] Fix comment typo
Masanari Iida standby2...@gmail.com writes: Correct spelling typo Signed-off-by: Masanari Iida standby2...@gmail.com --- git-bisect.sh | 2 +- pathspec.c| 4 ++-- wrapper.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 9f064b6..ebac284 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -137,7 +137,7 @@ bisect_start() { # cogito usage, and cogito users should understand # it relates to cg-seek. [ -s $GIT_DIR/head-name ] - die $(gettext won't bisect on seeked tree) + die $(gettext won't bisect on sought tree) The phrasing before your fix comes from Cogito which called the state cg-seek left in a seeked tree, I think, so this change is probably a wrong thing to do. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] [trivial] Fix typo in git-gui
Masanari Iida standby2...@gmail.com writes: Correct spelling typo in git-gui The text after the change looks OK, but I shouldn't be taking patches to git-gui part of the tree bypassing Pat, so... -- 8 -- From: Masanari Iida standby2...@gmail.com Date: Wed, 13 Nov 2013 00:17:44 +0900 Subject: [PATCH 3/4] git-gui: typofixes Correct spelling typo in git-gui. Signed-off-by: Masanari Iida standby2...@gmail.com --- Makefile | 2 +- lib/blame.tcl | 2 +- lib/index.tcl | 2 +- lib/spellcheck.tcl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e9c2bc3..cde8b2e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all:: # # Define NO_MSGFMT if you do not have msgfmt from the GNU gettext # package and want to use our rough pure Tcl po-msg translator. -# TCL_PATH must be vaild for this to work. +# TCL_PATH must be valid for this to work. # GIT-VERSION-FILE: FORCE diff --git a/lib/blame.tcl b/lib/blame.tcl index 324f774..b1d15f4 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -5,7 +5,7 @@ class blame { image create photo ::blame::img_back_arrow -data {R0lGODlhGAAYAIUAAPwCBEzKXFTSZIz+nGzmhGzqfGTidIT+nEzGXHTqhGzmfGzifFzadETCVES+VARWDFzWbHzyjAReDGTadFTOZDSyRDyyTCymPARaFGTedFzSbDy2TCyqRCyqPARaDAyCHES6VDy6VCyiPAR6HCSeNByWLARyFARiDARqFGTifARiFCH5BAEALAAYABgAAAajQIBwSCwaj8ikcsk0BppJwRPqHEypQwHBis0WDAdEFyBIKBaMAKLBdjQeSkFBYTBAIvgEoS6JmhUTEwIUDQ4VFhcMGEhyCgoZExoUaxsWHB0THkgfAXUGAhoBDSAVFR0XBnCbDRmgog0hpSIiDJpJIyEQhBUcJCIlwA22SSYVogknEg8eD82qSigdDSknY0IqJQXPYxIl1dZCGNvWw+Dm510GQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7} -# Persistant data (survives loads) +# Persistent data (survives loads) # field history {}; # viewer history: {commit path} field header; # array commit,key - header field diff --git a/lib/index.tcl b/lib/index.tcl index 8efbbdd..74a81a7 100644 --- a/lib/index.tcl +++ b/lib/index.tcl @@ -414,7 +414,7 @@ proc revert_helper {txt paths} { # such distinction is needed in some languages. Previously, the # code used Revert changes in for both, but that can't work # in languages where 'in' must be combined with word from - # rest of string (in diffrent way for both cases of course). + # rest of string (in different way for both cases of course). # # FIXME: Unfortunately, even that isn't enough in some languages # as they have quite complex plural-form rules. Unfortunately, diff --git a/lib/spellcheck.tcl b/lib/spellcheck.tcl index e612030..538d61c 100644 --- a/lib/spellcheck.tcl +++ b/lib/spellcheck.tcl @@ -14,7 +14,7 @@ field w_menu ; # context menu for the widget field s_menuidx 0 ; # last index of insertion into $w_menu field s_i {} ; # timer registration for _run callbacks -field s_clear0 ; # did we erase mispelled tags yet? +field s_clear0 ; # did we erase misspelled tags yet? field s_seen[list] ; # lines last seen from $w_text in _run field s_checked [list] ; # lines already checked field s_pending [list] ; # [$line $data] sent to ispell/aspell @@ -259,7 +259,7 @@ method _run {} { if {$n == $cur_line ![regexp {^\W$} [$w_text get $cur_pos insert]]} { - # If the current word is mispelled remove the tag + # If the current word is misspelled remove the tag # but force a spellcheck later. # set tags [$w_text tag names $cur_pos] -- 1.8.5.rc1.17.g0ecd94d -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] [trivial] Fix comment typo
Junio C Hamano gits...@pobox.com writes: Masanari Iida standby2...@gmail.com writes: Correct spelling typo Signed-off-by: Masanari Iida standby2...@gmail.com --- git-bisect.sh | 2 +- pathspec.c| 4 ++-- wrapper.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 9f064b6..ebac284 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -137,7 +137,7 @@ bisect_start() { # cogito usage, and cogito users should understand # it relates to cg-seek. [ -s $GIT_DIR/head-name ] -die $(gettext won't bisect on seeked tree) +die $(gettext won't bisect on sought tree) The phrasing before your fix comes from Cogito which called the state cg-seek left in a seeked tree, I think, so this change is probably a wrong thing to do. As Cogito is long dead, I do not think this error message will be shown to normal users at all, and the only people who will see it would be the ones who know what Cogito is/was. I'll rephrase this part and queue the attached, at least for now. All other patches looked good (except for 3/4, which I'll forward to Pat after tweaking the paths to match his tree) and I will queue them. Thanks. -- 8 -- From: Masanari Iida standby2...@gmail.com Date: Wed, 13 Nov 2013 00:17:42 +0900 Subject: [PATCH] typofixes: fix misspelt comments Signed-off-by: Masanari Iida standby2...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- git-bisect.sh | 2 +- pathspec.c| 4 ++-- wrapper.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index 9f064b6..73b4c14 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -137,7 +137,7 @@ bisect_start() { # cogito usage, and cogito users should understand # it relates to cg-seek. [ -s $GIT_DIR/head-name ] - die $(gettext won't bisect on seeked tree) + die $(gettext won't bisect on cg-seek'ed tree) start_head=${head#refs/heads/} ;; *) diff --git a/pathspec.c b/pathspec.c index ad1a9f5..be962d4 100644 --- a/pathspec.c +++ b/pathspec.c @@ -193,11 +193,11 @@ static unsigned prefix_pathspec(struct pathspec_item *item, magic |= short_magic; *p_short_magic = short_magic; - /* --noglob-pathspec adds :(literal) _unless_ :(glob) is specifed */ + /* --noglob-pathspec adds :(literal) _unless_ :(glob) is specified */ if (noglob_global !(magic PATHSPEC_GLOB)) global_magic |= PATHSPEC_LITERAL; - /* --glob-pathspec is overriden by :(literal) */ + /* --glob-pathspec is overridden by :(literal) */ if ((global_magic PATHSPEC_GLOB) (magic PATHSPEC_LITERAL)) global_magic = ~PATHSPEC_GLOB; diff --git a/wrapper.c b/wrapper.c index 9a6aaaf..0cc5636 100644 --- a/wrapper.c +++ b/wrapper.c @@ -133,7 +133,7 @@ void *xcalloc(size_t nmemb, size_t size) /* * Limit size of IO chunks, because huge chunks only cause pain. OS X * 64-bit is buggy, returning EINVAL if len = INT_MAX; and even in - * the absense of bugs, large chunks can result in bad latencies when + * the absence of bugs, large chunks can result in bad latencies when * you decide to kill the process. */ #define MAX_IO_SIZE (8*1024*1024) -- 1.8.5-rc1-310-g1febc12 -- 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 http://vger.kernel.org/majordomo-info.html
Re: Request: timeout option for remote operations, esp. git fetch
H. Peter Anvin h...@zytor.com writes: On 11/10/2013 12:17 PM, Eric Wong wrote: H. Peter Anvin h...@zytor.com wrote: When a remote server is unavailable or very slow, some git commands can stall out indefinitely. It would be a very good thing if remote commands -- but especially git fetch -- could be given a timeout. We've had SO_KEEPALIVE on git and ssh transports since e47a8583 (2011-12-06) SO_KEEPALIVE for http was added recently (a15d069a) and will be in git 1.8.5 Do you want a shorter timeout for slow (but still alive) servers? Yes; note that SO_KEEPALIVE only guarantees that the server is alive at the TCP socket level. If the server is overloaded but technically alive it may still make no meaningful forward progress. Which means that your original wish may not be granted with SO_KEEPALIVE at all, no? I was wondering if you wanted a forced timeout based on alarm(2), something similar to what you added to git-daemon in 960deccb (git-daemon: timeout, eliminate double DWIM, 2005-10-19). -- 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 http://vger.kernel.org/majordomo-info.html
Re: [[PATCH v2]] git-send-email: Added the ability to query the number of smtp password questions
sil...@port1024.net writes: From: Silvio F silvio.fri...@gmail.com With this patch git-send-mail ask a configurable number of questions to input the smtp password. Without this patch we have only one trial. Signed-off-by: Silvio F silvio.fri...@gmail.com --- I wonder if Git::credential (or even the underlying lower level credential_fill() in the helper API) should give hints to the caller if calling it again may yield a different result. An interactive prompt may allow the user to mistype the password and then a later call may return a correct one, but the .netrc helper will read from the file and will return a fixed result, so there is no use calling credential_fill() again. And in the latter case, you do not want to loop $askpasswordcount times. I also have to wonder if this logic belongs to git-send-email. Specifically, I wonder if we can place the looping logic in Git::credential, so that other users of the library can take advantage of it? Thanks. [jc: cc'ed peff@ for thoughts on credential helper API] Documentation/git-send-email.txt | 4 git-send-email.perl | 32 +--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index f0e57a5..ac993d6 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -364,6 +364,10 @@ sendemail.confirm:: one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm' in the previous section for the meaning of these values. +sendmail.askpasswordcount:: + Number of times the smtp password can be entered before sending mail is + aborted. Default is 1. + EXAMPLE --- Use gmail as the smtp server diff --git a/git-send-email.perl b/git-send-email.perl index 3782c3b..aeb2e6d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -203,6 +203,7 @@ my ($validate, $confirm); my (@suppress_cc); my ($auto_8bit_encoding); my ($compose_encoding); +my ($askpasswordcount) = 1; my ($debug_net_smtp) = 0;# Net::SMTP, see send_message() @@ -237,6 +238,7 @@ my %config_settings = ( from = \$sender, assume8bitencoding = \$auto_8bit_encoding, composeencoding = \$compose_encoding, +askpasswordcount = \$askpasswordcount ); my %config_path_settings = ( @@ -360,6 +362,10 @@ sub read_config { } } + if ($askpasswordcount 1) { + $askpasswordcount = 1; + } + if (!defined $smtp_encryption) { my $enc = Git::config(@repo, $prefix.smtpencryption); if (defined $enc) { @@ -1069,17 +1075,21 @@ sub smtp_auth_maybe { # TODO: Authentication may fail not because credentials were # invalid but due to other reasons, in which we should not # reject credentials. - $auth = Git::credential({ - 'protocol' = 'smtp', - 'host' = smtp_host_string(), - 'username' = $smtp_authuser, - # if there's no password, git credential fill will - # give us one, otherwise it'll just pass this one. - 'password' = $smtp_authpass - }, sub { - my $cred = shift; - return !!$smtp-auth($cred-{'username'}, $cred-{'password'}); - }); + for my $i (1 .. $askpasswordcount) { + $auth = Git::credential({ + 'protocol' = 'smtp', + 'host' = smtp_host_string(), + 'username' = $smtp_authuser, + # if there's no password, git credential fill will + # give us one, otherwise it'll just pass this one. + 'password' = $smtp_authpass + }, sub { + my $cred = shift; + return !!$smtp-auth($cred-{'username'}, $cred-{'password'}); + }); + + last if ($auth); + } return $auth; } -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/9] remote-hg, remote-bzr fixes
Richard Hansen rhan...@bbn.com writes: A handful of fixes for the git-remote-hg and git-remote-bzr remote helpers and their unit tests. Thanks; could you arrange with Felipe so that we can have Acked-by: or Reviewed-by: after your Signed-off-by: lines of these patches? -- 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 http://vger.kernel.org/majordomo-info.html
Re: Request: timeout option for remote operations, esp. git fetch
On 11/12/2013 09:45 AM, Junio C Hamano wrote: H. Peter Anvin h...@zytor.com writes: On 11/10/2013 12:17 PM, Eric Wong wrote: H. Peter Anvin h...@zytor.com wrote: When a remote server is unavailable or very slow, some git commands can stall out indefinitely. It would be a very good thing if remote commands -- but especially git fetch -- could be given a timeout. We've had SO_KEEPALIVE on git and ssh transports since e47a8583 (2011-12-06) SO_KEEPALIVE for http was added recently (a15d069a) and will be in git 1.8.5 Do you want a shorter timeout for slow (but still alive) servers? Yes; note that SO_KEEPALIVE only guarantees that the server is alive at the TCP socket level. If the server is overloaded but technically alive it may still make no meaningful forward progress. Which means that your original wish may not be granted with SO_KEEPALIVE at all, no? I was wondering if you wanted a forced timeout based on alarm(2), something similar to what you added to git-daemon in 960deccb (git-daemon: timeout, eliminate double DWIM, 2005-10-19). Yes, something more like that on the client end. SO_KEEPALIVE is better than nothing, but not really good enough. -hpa -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] Correct word usage of timezone in Documentation directory
I'll take this patch among the 4 in this series for now. I do not have immediate opinion on 1/4, other than The original may have room for improvement, but the patch posted is probably not it. As to 2/4, I agree with j6t and peff that `--date=local` is more preferrable than '\--date=local'. As to 4/4, I agree with Jonathan that we should keep the release notes as they are (thanks for separating the patch into two between 3 and 4, by the way). So I do not mind seeing discussions, improvements and rerolls on the first two in the series. Thanks. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL] l10n updates for 1.8.5 round 1
Thanks, all. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/9] test-lib.sh: convert $TEST_DIRECTORY to an absolute path
Richard Hansen rhan...@bbn.com writes: On 2013-11-12 00:54, Richard Hansen wrote: If $TEST_DIRECTORY is specified in the environment, convert the value to an absolute path to ensure that it remains valid even when 'cd' is used. Signed-off-by: Richard Hansen rhan...@bbn.com Actually, credit for this and the next patch should go to Felipe. How should I note that? If the patch text was copied from his response message, you would start the _body_ of your e-mail as: From: F.. C.. felipe.contre...@gmail.com If $TEST_DIRECTORY is specified ... Signed-off-by: F.. C.. felipe.contre...@gmail.com Signed-off-by: R Hansen rhansen@... _after_ getting him say it is OK to add his Sign-off. The first line in the body of your e-mail, From: Real Author, followed by a blank line, will signal to git am that you are forwarding a patch by somebody else, and we record that real author on the author line of the resulting commit object. On the other hand, if the patch is based on the _idea_ you gained by discussing with him, you would just mention it near your sign-off, like this: If $TEST_DIRECTORY is specified ... Helped-by: F... C... felipe.contre...@gmail.com Signed-off-by: R... Hansen rhansen@... Thanks, Richard --- t/test-lib.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index b25249e..af172d9 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -26,6 +26,10 @@ then # outside of t/, e.g. for running tests on the test library # itself. TEST_DIRECTORY=$(pwd) +else +# ensure that TEST_DIRECTORY is an absolute path so that it +# works even if the current working directory is changed +TEST_DIRECTORY=$(cd $TEST_DIRECTORY pwd) || exit 1 fi if test -z $TEST_OUTPUT_DIRECTORY then -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
On Tue, Nov 12, 2013 at 08:53:45AM -0800, Junio C Hamano wrote: Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of these is correct without looking at existing callsites? has_suffix(filename, txt); has_suffix(filename, .txt); To me, it is obviously the latter. My name for thing at the end of a file after the dot is extension, not suffix. I thought that was universal, but if there are people who find it confusing, it is worth changing. After all, the point is to make the code more readable. The semantics of the function we have is the latter and is better called endswith(), I suspect. And the corresponding function to check for head matches should probably be called beginswith(). Those are OK to me. has_suffix would be my first choice, but if it is confusing to others, your suggestions are fine. -Peff -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/7] test-hg.sh: avoid obsolete 'test' syntax
Richard Hansen wrote: On 2013-11-11 06:44, Felipe Contreras wrote: Richard Hansen wrote: The POSIX spec says that the '-a', '-o', and parentheses operands to the 'test' utility are obsolete extensions due to the potential for ambiguity. Replace '-o' with '|| test' to avoid unspecified behavior. All right, if you say so. In case you're curious about what the spec says: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16 Thanks, I didn't know the POSIX spec was available publicly. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/9] test-lib.sh: convert $TEST_DIRECTORY to an absolute path
Richard Hansen wrote: On 2013-11-12 00:54, Richard Hansen wrote: If $TEST_DIRECTORY is specified in the environment, convert the value to an absolute path to ensure that it remains valid even when 'cd' is used. Signed-off-by: Richard Hansen rhan...@bbn.com Actually, credit for this and the next patch should go to Felipe. How should I note that? Normally what I would do is put myself as the author, but not s-o-b, but since now I'm telling you you can add my s-o-b, you can do that. I would have sent those patches myself, if Junio agreed that was the way to go, but I didn't see that. Cheers. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
RE: [PATCH v2 0/9] remote-hg, remote-bzr fixes
Richard Hansen wrote: A handful of fixes for the git-remote-hg and git-remote-bzr remote helpers and their unit tests. I'm OK with the whole series. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
Re: [[PATCH v2]] git-send-email: Added the ability to query the number of smtp password questions
On Tue, Nov 12, 2013 at 09:57:39AM -0800, Junio C Hamano wrote: With this patch git-send-mail ask a configurable number of questions to input the smtp password. Without this patch we have only one trial. I wonder if Git::credential (or even the underlying lower level credential_fill() in the helper API) should give hints to the caller if calling it again may yield a different result. An interactive prompt may allow the user to mistype the password and then a later call may return a correct one, but the .netrc helper will read from the file and will return a fixed result, so there is no use calling credential_fill() again. And in the latter case, you do not want to loop $askpasswordcount times. It would be pretty easy to add an interactive=true flag to the credential response (patch below). Credential readers are supposed to ignore elements that they don't understand. So storage helpers which are told we got a password interactively can choose to use that information if they want, but current implementations will fall back to ignoring it. Similarly, users of git credential fill can use it, but it won't hurt existing readers. I also have to wonder if this logic belongs to git-send-email. Specifically, I wonder if we can place the looping logic in Git::credential, so that other users of the library can take advantage of it? A very early draft of the credential code added looping, but I cut it out (I think before it even made it to the list). I don't recall the exact reason, but it was probably a combination of: 1. It's awkward to do at the credential layer in C, because you need input from the calling code on whether the credential worked or not. The perl Git::credential can take a callback, though, which means the credential code owns the outer loop, and it would be pretty easy to just loop on trying. 2. We already have a retry mechanism; it is called shell history. :) The second one is only somewhat tongue in cheek. If we were an interactive program, retrying would be essential. But fetch and push tend to be very easy to simply re-run, as they perform only a single action that either works or does not. So I have not really seen anyone make a request for the feature. I guess send-email does not (always) fall under the same category because the user may have put work into a cover letter, or filling interactive fields. So I have no objection to adding it there, but I do agree we might as well put it in Git::credential. --- Here's the interactive patch. It needs documentation and tests, and it would probably make sense to simplify the text bool to 0|1, just to make life easier for other reader implementations. diff --git a/credential.c b/credential.c index e54753c..fccb944 100644 --- a/credential.c +++ b/credential.c @@ -126,6 +126,7 @@ static char *credential_ask_one(const char *what, struct credential *c, strbuf_release(desc); strbuf_release(prompt); + c-interactive = 1; return xstrdup(r); } @@ -174,6 +175,8 @@ int credential_read(struct credential *c, FILE *fp) c-path = xstrdup(value); } else if (!strcmp(key, url)) { credential_from_url(c, value); + } else if (!strcmp(key, interactive)) { + c-interactive = git_config_bool(interactive, value); } /* * Ignore other lines; we don't know what they mean, but @@ -200,6 +203,8 @@ void credential_write(const struct credential *c, FILE *fp) credential_write_item(fp, path, c-path); credential_write_item(fp, username, c-username); credential_write_item(fp, password, c-password); + if (c-interactive) + credential_write_item(fp, interactive, true); } static int run_credential_helper(struct credential *c, diff --git a/credential.h b/credential.h index 0c3e85e..c0e5cbc 100644 --- a/credential.h +++ b/credential.h @@ -7,6 +7,7 @@ struct credential { struct string_list helpers; unsigned approved:1, configured:1, +interactive:1, use_http_path:1; char *username; -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
From: Junio C Hamano gits...@pobox.com Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of these is correct without looking at existing callsites? has_suffix(filename, txt); has_suffix(filename, .txt); The semantics of the function we have is the latter and is better called endswith(), I suspect. And the corresponding function to check for head matches should probably be called beginswith(). I don't know if has_suffix() is confusing for a native speaker. After a look at some languages, Python has startwith() and endswith(), and Java has startWith() and endsWith(). So I agree that it is a good name. But while we are at it, why not ends_with() and begins_with()? To me using an underscore seems more consistent with what we are doing in Git. Thanks, Christian. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 00/10] transport-helper: updates
Richard Hansen wrote: On 2013-11-11 17:54, Felipe Contreras wrote: Hi, Here are the patches that allow transport helpers to be completely transparent; renaming branches, deleting them, custom refspecs, --force, --dry-run, reporting forced update, everything works. Small changes since v5: diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 8ed41b4..4b76222 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -736,9 +736,10 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) usage_with_options (fast_export_usage, options); if (refspecs_list.nr) { - const char *refspecs_str[refspecs_list.nr]; + const char **refspecs_str; int i; + refspecs_str = xmalloc(sizeof(*refspecs_str) * refspecs_list.nr); for (i = 0; i refspecs_list.nr; i++) refspecs_str[i] = refspecs_list.items[i].string; @@ -746,6 +747,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) refspecs = parse_fetch_refspec(refspecs_nr, refspecs_str); string_list_clear(refspecs_list, 1); + free(refspecs_str); } if (use_done_feature) diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh index 716aa4c..1c006a0 100755 --- a/git-remote-testgit.sh +++ b/git-remote-testgit.sh @@ -15,6 +15,8 @@ test -z $refspec prefix=refs export GIT_DIR=$url/.git +force= + mkdir -p $dir if test -z $GIT_REMOTE_TESTGIT_NO_MARKS What about changing those two test-hg.sh tests to test_expect_success? http://article.gmane.org/gmane.comp.version-control.git/237606 I can do that. Should those changes be squashed into the transport-helper: don't update refs in dry-run and transport-helper: add 'force' to 'export' helpers commits? Or are those commits not really the appropriate place? I think it should be a separate commit, since it's not part of the core, but contrib area. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 02/11] transport-helper: don't update refs in dry-run
The remote helper namespace should not be updated. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- transport-helper.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index b66c7fd..9558a0d 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -728,7 +728,8 @@ static int push_update_ref_status(struct strbuf *buf, } static void push_update_refs_status(struct helper_data *data, - struct ref *remote_refs) + struct ref *remote_refs, + int flags) { struct strbuf buf = STRBUF_INIT; struct ref *ref = remote_refs; @@ -742,7 +743,7 @@ static void push_update_refs_status(struct helper_data *data, if (push_update_ref_status(buf, ref, remote_refs)) continue; - if (!data-refspecs || data-no_private_update) + if (flags TRANSPORT_PUSH_DRY_RUN || !data-refspecs || data-no_private_update) continue; /* propagate back the update to the remote namespace */ @@ -833,7 +834,7 @@ static int push_refs_with_push(struct transport *transport, sendline(data, buf); strbuf_release(buf); - push_update_refs_status(data, remote_refs); + push_update_refs_status(data, remote_refs, flags); return 0; } @@ -887,7 +888,7 @@ static int push_refs_with_export(struct transport *transport, if (finish_command(exporter)) die(Error while running fast-export); - push_update_refs_status(data, remote_refs); + push_update_refs_status(data, remote_refs, flags); return 0; } -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 00/11] transport-helper: updates
Hi, Here are the patches that allow transport helpers to be completely transparent; renaming branches, deleting them, custom refspecs, --force, --dry-run, reporting forced update, everything works. Changes since v6: diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 72f745d..aacd8a9 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -599,7 +599,7 @@ test_expect_success 'remote big push fetch first' ' ) ' -test_expect_failure 'remote big push force' ' +test_expect_success 'remote big push force' ' test_when_finished rm -rf hgrepo gitrepo* setup_big_push @@ -629,7 +629,7 @@ test_expect_failure 'remote big push force' ' check_bookmark hgrepo new_bmark six ' -test_expect_failure 'remote big push dry-run' ' +test_expect_success 'remote big push dry-run' ' test_when_finished rm -rf hgrepo gitrepo* setup_big_push diff --git a/transport-helper.c b/transport-helper.c index 2257588..7a95125 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -863,7 +863,7 @@ static int push_refs_with_export(struct transport *transport, if (flags TRANSPORT_PUSH_FORCE) { if (set_helper_option(transport, force, true) != 0) - die(helper %s does not support 'force', data-name); + warning(helper %s does not support 'force', data-name); } helper = get_helper(transport); Felipe Contreras (10): transport-helper: fix extra lines transport-helper: don't update refs in dry-run transport-helper: add 'force' to 'export' helpers transport-helper: check for 'forced update' message fast-export: improve argument parsing fast-export: add new --refspec option transport-helper: add support for old:new refspec fast-import: add support to delete refs fast-export: add support to delete refs transport-helper: add support to delete branches Richard Hansen (1): test-hg.sh: tests are now expected to pass Documentation/git-fast-export.txt | 4 +++ Documentation/git-fast-import.txt | 3 +++ Documentation/gitremote-helpers.txt | 4 +++ builtin/fast-export.c | 49 - contrib/remote-helpers/test-hg.sh | 4 +-- fast-import.c | 13 +++--- git-remote-testgit.sh | 18 ++ t/t5801-remote-helpers.sh | 23 - t/t9300-fast-import.sh | 18 ++ t/t9350-fast-export.sh | 18 ++ transport-helper.c | 47 +++ 11 files changed, 179 insertions(+), 22 deletions(-) -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 07/11] fast-export: add new --refspec option
So that we can convert the exported ref names. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/git-fast-export.txt | 4 builtin/fast-export.c | 32 t/t9350-fast-export.sh| 7 +++ 3 files changed, 43 insertions(+) diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 85f1f30..221506b 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -105,6 +105,10 @@ marks the same across runs. in the commit (as opposed to just listing the files which are different from the commit's first parent). +--refspec:: + Apply the specified refspec to each ref exported. Multiple of them can + be specified. + [git-rev-list-args...]:: A list of arguments, acceptable to 'git rev-parse' and 'git rev-list', that specifies the specific objects and references diff --git a/builtin/fast-export.c b/builtin/fast-export.c index eea5b8c..cf745ec 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -17,6 +17,7 @@ #include utf8.h #include parse-options.h #include quote.h +#include remote.h static const char *fast_export_usage[] = { N_(git fast-export [rev-list-opts]), @@ -31,6 +32,8 @@ static int use_done_feature; static int no_data; static int full_tree; static struct string_list extra_refs = STRING_LIST_INIT_NODUP; +static struct refspec *refspecs; +static int refspecs_nr; static int parse_opt_signed_tag_mode(const struct option *opt, const char *arg, int unset) @@ -525,6 +528,15 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info) if (dwim_ref(e-name, strlen(e-name), sha1, full_name) != 1) continue; + if (refspecs) { + char *private; + private = apply_refspecs(refspecs, refspecs_nr, full_name); + if (private) { + free(full_name); + full_name = private; + } + } + commit = get_commit(e, full_name); if (!commit) { warning(%s: Unexpected object of type %s, skipping., @@ -668,6 +680,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) struct commit *commit; char *export_filename = NULL, *import_filename = NULL; uint32_t lastimportid; + struct string_list refspecs_list = STRING_LIST_INIT_NODUP; struct option options[] = { OPT_INTEGER(0, progress, progress, N_(show progress after n objects)), @@ -688,6 +701,8 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) OPT_BOOL(0, use-done-feature, use_done_feature, N_(Use the done feature to terminate the stream)), OPT_BOOL(0, no-data, no_data, N_(Skip output of blob data)), + OPT_STRING_LIST(0, refspec, refspecs_list, N_(refspec), +N_(Apply refspec to exported refs)), OPT_END() }; @@ -707,6 +722,21 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) if (argc 1) usage_with_options (fast_export_usage, options); + if (refspecs_list.nr) { + const char **refspecs_str; + int i; + + refspecs_str = xmalloc(sizeof(*refspecs_str) * refspecs_list.nr); + for (i = 0; i refspecs_list.nr; i++) + refspecs_str[i] = refspecs_list.items[i].string; + + refspecs_nr = refspecs_list.nr; + refspecs = parse_fetch_refspec(refspecs_nr, refspecs_str); + + string_list_clear(refspecs_list, 1); + free(refspecs_str); + } + if (use_done_feature) printf(feature done\n); @@ -741,5 +771,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) if (use_done_feature) printf(done\n); + free_refspec(refspecs_nr, refspecs); + return 0; } diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 2312dec..3d475af 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -504,4 +504,11 @@ test_expect_success 'refs are updated even if no commits need to be exported' ' test_cmp expected actual ' +test_expect_success 'use refspec' ' + git fast-export --refspec refs/heads/master:refs/heads/foobar master | \ + grep ^commit | sort | uniq actual + echo commit refs/heads/foobar expected + test_cmp expected actual +' + test_done -- 1.8.4.2+fc1 -- 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
[PATCH v6 07/10] transport-helper: add support for old:new refspec
By using fast-export's new --refspec option. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t5801-remote-helpers.sh | 2 +- transport-helper.c| 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index c33cc25..454337e 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -87,7 +87,7 @@ test_expect_success 'push new branch by name' ' compare_refs local HEAD server refs/heads/new-name ' -test_expect_failure 'push new branch with old:new refspec' ' +test_expect_success 'push new branch with old:new refspec' ' (cd local git push origin new-name:new-refspec ) diff --git a/transport-helper.c b/transport-helper.c index 23af747..2da4259 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -850,7 +850,7 @@ static int push_refs_with_export(struct transport *transport, struct ref *ref; struct child_process *helper, exporter; struct helper_data *data = transport-data; - struct string_list revlist_args = STRING_LIST_INIT_NODUP; + struct string_list revlist_args = STRING_LIST_INIT_DUP; struct strbuf buf = STRBUF_INIT; if (!data-refspecs) @@ -888,8 +888,13 @@ static int push_refs_with_export(struct transport *transport, free(private); if (ref-peer_ref) { - if (strcmp(ref-peer_ref-name, ref-name)) - die(remote-helpers do not support old:new syntax); + if (strcmp(ref-name, ref-peer_ref-name)) { + struct strbuf buf = STRBUF_INIT; + strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + string_list_append(revlist_args, --refspec); + string_list_append(revlist_args, buf.buf); + strbuf_release(buf); + } string_list_append(revlist_args, ref-peer_ref-name); } } @@ -897,6 +902,8 @@ static int push_refs_with_export(struct transport *transport, if (get_exporter(transport, exporter, revlist_args)) die(Couldn't run fast-export); + string_list_clear(revlist_args, 1); + if (finish_command(exporter)) die(Error while running fast-export); push_update_refs_status(data, remote_refs, flags); -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 06/11] fast-export: improve argument parsing
We don't want to pass arguments specific to fast-export to setup_revisions. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- builtin/fast-export.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 78250ea..eea5b8c 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -701,8 +701,9 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) revs.topo_order = 1; revs.show_source = 1; revs.rewrite_parents = 1; + argc = parse_options(argc, argv, prefix, options, fast_export_usage, + PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN); argc = setup_revisions(argc, argv, revs, NULL); - argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0); if (argc 1) usage_with_options (fast_export_usage, options); -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v6 08/10] fast-import: add support to delete refs
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/git-fast-import.txt | 3 +++ fast-import.c | 13 ++--- t/t9300-fast-import.sh| 18 ++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 73f9806..2ffae42 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -483,6 +483,9 @@ Marks must be declared (via `mark`) before they can be used. * Any valid Git SHA-1 expression that resolves to a commit. See ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[7] for details. +* The special null SHA-1 (40 zeros) specifies that the branch is to be + removed. + The special case of restarting an incremental import from the current branch value should be written as: diff --git a/fast-import.c b/fast-import.c index f4d9969..fdce0b7 100644 --- a/fast-import.c +++ b/fast-import.c @@ -248,6 +248,7 @@ struct branch { uintmax_t last_commit; uintmax_t num_notes; unsigned active : 1; + unsigned delete : 1; unsigned pack_id : PACK_ID_BITS; unsigned char sha1[20]; }; @@ -1690,10 +1691,13 @@ static int update_branch(struct branch *b) struct ref_lock *lock; unsigned char old_sha1[20]; - if (is_null_sha1(b-sha1)) - return 0; if (read_ref(b-name, old_sha1)) hashclr(old_sha1); + if (is_null_sha1(b-sha1)) { + if (b-delete) + delete_ref(b-name, old_sha1, 0); + return 0; + } lock = lock_any_ref_for_update(b-name, old_sha1, 0, NULL); if (!lock) return error(Unable to lock %s, b-name); @@ -2620,8 +2624,11 @@ static int parse_from(struct branch *b) free(buf); } else parse_from_existing(b); - } else if (!get_sha1(from, b-sha1)) + } else if (!get_sha1(from, b-sha1)) { parse_from_existing(b); + if (is_null_sha1(b-sha1)) + b-delete = 1; + } else die(Invalid ref name or SHA1 expression: %s, from); diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 27263df..5fc9ef2 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2999,4 +2999,22 @@ test_expect_success 'T: ls root tree' ' test_cmp expect actual ' +test_expect_success 'T: delete branch' ' + git branch to-delete + git fast-import -EOF + reset refs/heads/to-delete + from + EOF + test_must_fail git rev-parse --verify refs/heads/to-delete +' + +test_expect_success 'T: empty reset doesnt delete branch' ' + git branch not-to-delete + git fast-import -EOF + reset refs/heads/not-to-delete + EOF + git show-ref + git rev-parse --verify refs/heads/not-to-delete +' + test_done -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v6 10/10] transport-helper: add support to delete branches
For remote-helpers that use 'export' to push. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t5801-remote-helpers.sh | 8 transport-helper.c| 11 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 454337e..c667965 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -94,6 +94,14 @@ test_expect_success 'push new branch with old:new refspec' ' compare_refs local HEAD server refs/heads/new-refspec ' +test_expect_success 'push delete branch' ' + (cd local +git push origin :new-name + ) + test_must_fail git --git-dir=server/.git \ +rev-parse --verify refs/heads/new-name +' + test_expect_success 'forced push' ' (cd local git checkout -b force-test diff --git a/transport-helper.c b/transport-helper.c index 2da4259..7a95125 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -876,9 +876,6 @@ static int push_refs_with_export(struct transport *transport, char *private; unsigned char sha1[20]; - if (ref-deletion) - die(remote-helpers do not support ref deletion); - private = apply_refspecs(data-refspecs, data-refspec_nr, ref-name); if (private !get_sha1(private, sha1)) { strbuf_addf(buf, ^%s, private); @@ -890,12 +887,16 @@ static int push_refs_with_export(struct transport *transport, if (ref-peer_ref) { if (strcmp(ref-name, ref-peer_ref-name)) { struct strbuf buf = STRBUF_INIT; - strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + if (!ref-deletion) + strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + else + strbuf_addf(buf, :%s, ref-name); string_list_append(revlist_args, --refspec); string_list_append(revlist_args, buf.buf); strbuf_release(buf); } - string_list_append(revlist_args, ref-peer_ref-name); + if (!ref-deletion) + string_list_append(revlist_args, ref-peer_ref-name); } } -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v6 06/10] fast-export: add new --refspec option
So that we can convert the exported ref names. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/git-fast-export.txt | 4 builtin/fast-export.c | 32 t/t9350-fast-export.sh| 7 +++ 3 files changed, 43 insertions(+) diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 85f1f30..221506b 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -105,6 +105,10 @@ marks the same across runs. in the commit (as opposed to just listing the files which are different from the commit's first parent). +--refspec:: + Apply the specified refspec to each ref exported. Multiple of them can + be specified. + [git-rev-list-args...]:: A list of arguments, acceptable to 'git rev-parse' and 'git rev-list', that specifies the specific objects and references diff --git a/builtin/fast-export.c b/builtin/fast-export.c index eea5b8c..cf745ec 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -17,6 +17,7 @@ #include utf8.h #include parse-options.h #include quote.h +#include remote.h static const char *fast_export_usage[] = { N_(git fast-export [rev-list-opts]), @@ -31,6 +32,8 @@ static int use_done_feature; static int no_data; static int full_tree; static struct string_list extra_refs = STRING_LIST_INIT_NODUP; +static struct refspec *refspecs; +static int refspecs_nr; static int parse_opt_signed_tag_mode(const struct option *opt, const char *arg, int unset) @@ -525,6 +528,15 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info) if (dwim_ref(e-name, strlen(e-name), sha1, full_name) != 1) continue; + if (refspecs) { + char *private; + private = apply_refspecs(refspecs, refspecs_nr, full_name); + if (private) { + free(full_name); + full_name = private; + } + } + commit = get_commit(e, full_name); if (!commit) { warning(%s: Unexpected object of type %s, skipping., @@ -668,6 +680,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) struct commit *commit; char *export_filename = NULL, *import_filename = NULL; uint32_t lastimportid; + struct string_list refspecs_list = STRING_LIST_INIT_NODUP; struct option options[] = { OPT_INTEGER(0, progress, progress, N_(show progress after n objects)), @@ -688,6 +701,8 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) OPT_BOOL(0, use-done-feature, use_done_feature, N_(Use the done feature to terminate the stream)), OPT_BOOL(0, no-data, no_data, N_(Skip output of blob data)), + OPT_STRING_LIST(0, refspec, refspecs_list, N_(refspec), +N_(Apply refspec to exported refs)), OPT_END() }; @@ -707,6 +722,21 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) if (argc 1) usage_with_options (fast_export_usage, options); + if (refspecs_list.nr) { + const char **refspecs_str; + int i; + + refspecs_str = xmalloc(sizeof(*refspecs_str) * refspecs_list.nr); + for (i = 0; i refspecs_list.nr; i++) + refspecs_str[i] = refspecs_list.items[i].string; + + refspecs_nr = refspecs_list.nr; + refspecs = parse_fetch_refspec(refspecs_nr, refspecs_str); + + string_list_clear(refspecs_list, 1); + free(refspecs_str); + } + if (use_done_feature) printf(feature done\n); @@ -741,5 +771,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) if (use_done_feature) printf(done\n); + free_refspec(refspecs_nr, refspecs); + return 0; } diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 2312dec..3d475af 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -504,4 +504,11 @@ test_expect_success 'refs are updated even if no commits need to be exported' ' test_cmp expected actual ' +test_expect_success 'use refspec' ' + git fast-export --refspec refs/heads/master:refs/heads/foobar master | \ + grep ^commit | sort | uniq actual + echo commit refs/heads/foobar expected + test_cmp expected actual +' + test_done -- 1.8.4.2+fc1 -- 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
[PATCH v7 10/11] fast-export: add support to delete refs
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- builtin/fast-export.c | 14 ++ t/t9350-fast-export.sh | 11 +++ 2 files changed, 25 insertions(+) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index cf745ec..4b76222 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -673,6 +673,19 @@ static void import_marks(char *input_file) fclose(f); } +static void handle_deletes(void) +{ + int i; + for (i = 0; i refspecs_nr; i++) { + struct refspec *refspec = refspecs[i]; + if (*refspec-src) + continue; + + printf(reset %s\nfrom %s\n\n, + refspec-dst, sha1_to_hex(null_sha1)); + } +} + int cmd_fast_export(int argc, const char **argv, const char *prefix) { struct rev_info revs; @@ -764,6 +777,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) } handle_tags_and_duplicates(); + handle_deletes(); if (export_filename lastimportid != last_idnum) export_marks(export_filename); diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 3d475af..66c8b0a 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -511,4 +511,15 @@ test_expect_success 'use refspec' ' test_cmp expected actual ' +test_expect_success 'delete refspec' ' + git branch to-delete + git fast-export --refspec :refs/heads/to-delete to-delete ^to-delete actual + cat expected -EOF + reset refs/heads/to-delete + from + + EOF + test_cmp expected actual +' + test_done -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 05/11] test-hg.sh: tests are now expected to pass
From: Richard Hansen rhan...@bbn.com Signed-off-by: Richard Hansen rhan...@bbn.com --- contrib/remote-helpers/test-hg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 72f745d..aacd8a9 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -599,7 +599,7 @@ test_expect_success 'remote big push fetch first' ' ) ' -test_expect_failure 'remote big push force' ' +test_expect_success 'remote big push force' ' test_when_finished rm -rf hgrepo gitrepo* setup_big_push @@ -629,7 +629,7 @@ test_expect_failure 'remote big push force' ' check_bookmark hgrepo new_bmark six ' -test_expect_failure 'remote big push dry-run' ' +test_expect_success 'remote big push dry-run' ' test_when_finished rm -rf hgrepo gitrepo* setup_big_push -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 08/11] transport-helper: add support for old:new refspec
By using fast-export's new --refspec option. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t5801-remote-helpers.sh | 2 +- transport-helper.c| 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index c33cc25..454337e 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -87,7 +87,7 @@ test_expect_success 'push new branch by name' ' compare_refs local HEAD server refs/heads/new-name ' -test_expect_failure 'push new branch with old:new refspec' ' +test_expect_success 'push new branch with old:new refspec' ' (cd local git push origin new-name:new-refspec ) diff --git a/transport-helper.c b/transport-helper.c index 23af747..2da4259 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -850,7 +850,7 @@ static int push_refs_with_export(struct transport *transport, struct ref *ref; struct child_process *helper, exporter; struct helper_data *data = transport-data; - struct string_list revlist_args = STRING_LIST_INIT_NODUP; + struct string_list revlist_args = STRING_LIST_INIT_DUP; struct strbuf buf = STRBUF_INIT; if (!data-refspecs) @@ -888,8 +888,13 @@ static int push_refs_with_export(struct transport *transport, free(private); if (ref-peer_ref) { - if (strcmp(ref-peer_ref-name, ref-name)) - die(remote-helpers do not support old:new syntax); + if (strcmp(ref-name, ref-peer_ref-name)) { + struct strbuf buf = STRBUF_INIT; + strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + string_list_append(revlist_args, --refspec); + string_list_append(revlist_args, buf.buf); + strbuf_release(buf); + } string_list_append(revlist_args, ref-peer_ref-name); } } @@ -897,6 +902,8 @@ static int push_refs_with_export(struct transport *transport, if (get_exporter(transport, exporter, revlist_args)) die(Couldn't run fast-export); + string_list_clear(revlist_args, 1); + if (finish_command(exporter)) die(Error while running fast-export); push_update_refs_status(data, remote_refs, flags); -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 11/11] transport-helper: add support to delete branches
For remote-helpers that use 'export' to push. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t5801-remote-helpers.sh | 8 transport-helper.c| 11 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 454337e..c667965 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -94,6 +94,14 @@ test_expect_success 'push new branch with old:new refspec' ' compare_refs local HEAD server refs/heads/new-refspec ' +test_expect_success 'push delete branch' ' + (cd local +git push origin :new-name + ) + test_must_fail git --git-dir=server/.git \ +rev-parse --verify refs/heads/new-name +' + test_expect_success 'forced push' ' (cd local git checkout -b force-test diff --git a/transport-helper.c b/transport-helper.c index 2da4259..7a95125 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -876,9 +876,6 @@ static int push_refs_with_export(struct transport *transport, char *private; unsigned char sha1[20]; - if (ref-deletion) - die(remote-helpers do not support ref deletion); - private = apply_refspecs(data-refspecs, data-refspec_nr, ref-name); if (private !get_sha1(private, sha1)) { strbuf_addf(buf, ^%s, private); @@ -890,12 +887,16 @@ static int push_refs_with_export(struct transport *transport, if (ref-peer_ref) { if (strcmp(ref-name, ref-peer_ref-name)) { struct strbuf buf = STRBUF_INIT; - strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + if (!ref-deletion) + strbuf_addf(buf, %s:%s, ref-peer_ref-name, ref-name); + else + strbuf_addf(buf, :%s, ref-name); string_list_append(revlist_args, --refspec); string_list_append(revlist_args, buf.buf); strbuf_release(buf); } - string_list_append(revlist_args, ref-peer_ref-name); + if (!ref-deletion) + string_list_append(revlist_args, ref-peer_ref-name); } } -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v6 09/10] fast-export: add support to delete refs
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- builtin/fast-export.c | 14 ++ t/t9350-fast-export.sh | 11 +++ 2 files changed, 25 insertions(+) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index cf745ec..4b76222 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -673,6 +673,19 @@ static void import_marks(char *input_file) fclose(f); } +static void handle_deletes(void) +{ + int i; + for (i = 0; i refspecs_nr; i++) { + struct refspec *refspec = refspecs[i]; + if (*refspec-src) + continue; + + printf(reset %s\nfrom %s\n\n, + refspec-dst, sha1_to_hex(null_sha1)); + } +} + int cmd_fast_export(int argc, const char **argv, const char *prefix) { struct rev_info revs; @@ -764,6 +777,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) } handle_tags_and_duplicates(); + handle_deletes(); if (export_filename lastimportid != last_idnum) export_marks(export_filename); diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 3d475af..66c8b0a 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -511,4 +511,15 @@ test_expect_success 'use refspec' ' test_cmp expected actual ' +test_expect_success 'delete refspec' ' + git branch to-delete + git fast-export --refspec :refs/heads/to-delete to-delete ^to-delete actual + cat expected -EOF + reset refs/heads/to-delete + from + + EOF + test_cmp expected actual +' + test_done -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 09/11] fast-import: add support to delete refs
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/git-fast-import.txt | 3 +++ fast-import.c | 13 ++--- t/t9300-fast-import.sh| 18 ++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 73f9806..2ffae42 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -483,6 +483,9 @@ Marks must be declared (via `mark`) before they can be used. * Any valid Git SHA-1 expression that resolves to a commit. See ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[7] for details. +* The special null SHA-1 (40 zeros) specifies that the branch is to be + removed. + The special case of restarting an incremental import from the current branch value should be written as: diff --git a/fast-import.c b/fast-import.c index f4d9969..fdce0b7 100644 --- a/fast-import.c +++ b/fast-import.c @@ -248,6 +248,7 @@ struct branch { uintmax_t last_commit; uintmax_t num_notes; unsigned active : 1; + unsigned delete : 1; unsigned pack_id : PACK_ID_BITS; unsigned char sha1[20]; }; @@ -1690,10 +1691,13 @@ static int update_branch(struct branch *b) struct ref_lock *lock; unsigned char old_sha1[20]; - if (is_null_sha1(b-sha1)) - return 0; if (read_ref(b-name, old_sha1)) hashclr(old_sha1); + if (is_null_sha1(b-sha1)) { + if (b-delete) + delete_ref(b-name, old_sha1, 0); + return 0; + } lock = lock_any_ref_for_update(b-name, old_sha1, 0, NULL); if (!lock) return error(Unable to lock %s, b-name); @@ -2620,8 +2624,11 @@ static int parse_from(struct branch *b) free(buf); } else parse_from_existing(b); - } else if (!get_sha1(from, b-sha1)) + } else if (!get_sha1(from, b-sha1)) { parse_from_existing(b); + if (is_null_sha1(b-sha1)) + b-delete = 1; + } else die(Invalid ref name or SHA1 expression: %s, from); diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 27263df..5fc9ef2 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2999,4 +2999,22 @@ test_expect_success 'T: ls root tree' ' test_cmp expect actual ' +test_expect_success 'T: delete branch' ' + git branch to-delete + git fast-import -EOF + reset refs/heads/to-delete + from + EOF + test_must_fail git rev-parse --verify refs/heads/to-delete +' + +test_expect_success 'T: empty reset doesnt delete branch' ' + git branch not-to-delete + git fast-import -EOF + reset refs/heads/not-to-delete + EOF + git show-ref + git rev-parse --verify refs/heads/not-to-delete +' + test_done -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v6 05/10] fast-export: improve argument parsing
We don't want to pass arguments specific to fast-export to setup_revisions. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- builtin/fast-export.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 78250ea..eea5b8c 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -701,8 +701,9 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) revs.topo_order = 1; revs.show_source = 1; revs.rewrite_parents = 1; + argc = parse_options(argc, argv, prefix, options, fast_export_usage, + PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN); argc = setup_revisions(argc, argv, revs, NULL); - argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0); if (argc 1) usage_with_options (fast_export_usage, options); -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 03/11] transport-helper: add 'force' to 'export' helpers
Otherwise they cannot know when to force the push or not (other than hacks). Tests-by: Richard Hansen rhan...@bbn.com Documentation-by: Richard Hansen rhan...@bbn.com Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/gitremote-helpers.txt | 4 git-remote-testgit.sh | 18 ++ t/t5801-remote-helpers.sh | 13 + transport-helper.c | 5 + 4 files changed, 40 insertions(+) diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt index f1f4ca9..e75699c 100644 --- a/Documentation/gitremote-helpers.txt +++ b/Documentation/gitremote-helpers.txt @@ -437,6 +437,10 @@ set by Git if the remote helper has the 'option' capability. 'option check-connectivity' \{'true'|'false'\}:: Request the helper to check connectivity of a clone. +'option force' \{'true'|'false'\}:: + Request the helper to perform a force update. Defaults to + 'false'. + SEE ALSO linkgit:git-remote[1] diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh index 6d2f282..1c006a0 100755 --- a/git-remote-testgit.sh +++ b/git-remote-testgit.sh @@ -15,6 +15,8 @@ test -z $refspec prefix=refs export GIT_DIR=$url/.git +force= + mkdir -p $dir if test -z $GIT_REMOTE_TESTGIT_NO_MARKS @@ -39,6 +41,7 @@ do fi test -n $GIT_REMOTE_TESTGIT_SIGNED_TAGS echo signed-tags test -n $GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE echo no-private-update + echo 'option' echo ;; list) @@ -93,6 +96,7 @@ do before=$(git for-each-ref --format=' %(refname) %(objectname) ') git fast-import \ + ${force:+--force} \ ${testgitmarks:+--import-marks=$testgitmarks} \ ${testgitmarks:+--export-marks=$testgitmarks} \ --quiet @@ -115,6 +119,20 @@ do echo ;; + option\ *) + read cmd opt val -EOF + $line + EOF + case $opt in + force) + test $val = true force=true || force= + echo ok + ;; + *) + echo unsupported + ;; + esac + ;; '') exit ;; diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 613f69a..c33cc25 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -94,6 +94,19 @@ test_expect_failure 'push new branch with old:new refspec' ' compare_refs local HEAD server refs/heads/new-refspec ' +test_expect_success 'forced push' ' + (cd local + git checkout -b force-test + echo content file + git commit -a -m eight + git push origin force-test + echo content file + git commit -a --amend -m eight-modified + git push --force origin force-test + ) + compare_refs local refs/heads/force-test server refs/heads/force-test +' + test_expect_success 'cloning without refspec' ' GIT_REMOTE_TESTGIT_REFSPEC= \ git clone testgit::${PWD}/server local2 2error diff --git a/transport-helper.c b/transport-helper.c index 9558a0d..60fba99 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -855,6 +855,11 @@ static int push_refs_with_export(struct transport *transport, die(helper %s does not support dry-run, data-name); } + if (flags TRANSPORT_PUSH_FORCE) { + if (set_helper_option(transport, force, true) != 0) + warning(helper %s does not support 'force', data-name); + } + helper = get_helper(transport); write_constant(helper-in, export\n); -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH v7 04/11] transport-helper: check for 'forced update' message
So the remote-helpers can tell us when a forced push was needed. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- transport-helper.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/transport-helper.c b/transport-helper.c index 60fba99..23af747 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -644,7 +644,7 @@ static int push_update_ref_status(struct strbuf *buf, struct ref *remote_refs) { char *refname, *msg; - int status; + int status, forced = 0; if (!prefixcmp(buf-buf, ok )) { status = REF_STATUS_OK; @@ -702,6 +702,11 @@ static int push_update_ref_status(struct strbuf *buf, free(msg); msg = NULL; } + else if (!strcmp(msg, forced update)) { + forced = 1; + free(msg); + msg = NULL; + } } if (*ref) @@ -723,6 +728,7 @@ static int push_update_ref_status(struct strbuf *buf, } (*ref)-status = status; + (*ref)-forced_update = forced; (*ref)-remote_status = msg; return !(status == REF_STATUS_OK); } -- 1.8.4.2+fc1 -- 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 http://vger.kernel.org/majordomo-info.html
RE: [PATCH v2] remote-bzr: support the new 'force' option
Richard Hansen wrote: Signed-off-by: Richard Hansen rhan...@bbn.com --- This is a reroll of: http://article.gmane.org/gmane.comp.version-control.git/237607 based on feedback from Felipe: http://article.gmane.org/gmane.comp.version-control.git/237615 This patch is an optional extension to Felipe's transport-helper: updates patch series: http://thread.gmane.org/gmane.comp.version-control.git/237663 and it requires those changes to work. contrib/remote-helpers/git-remote-bzr | 32 +++- contrib/remote-helpers/test-bzr.sh| 22 +- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 7e34532..2f481e9 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -42,6 +42,7 @@ import json import re import StringIO import atexit, shutil, hashlib, urlparse, subprocess +import types No need for this any more. NAME_RE = re.compile('^([^]+)') AUTHOR_RE = re.compile('^([^]+?)? ?[]([^]*)(?:$|)') @@ -684,7 +685,8 @@ def do_export(parser): peer = bzrlib.branch.Branch.open(peers[name], possible_transports=transports) try: -peer.bzrdir.push_branch(branch, revision_id=revid) +peer.bzrdir.push_branch(branch, revision_id=revid, +overwrite=force) except bzrlib.errors.DivergedBranches: print error %s non-fast forward % ref continue @@ -718,8 +720,32 @@ def do_capabilities(parser): print *import-marks %s % path print *export-marks %s % path +print option print +class InvalidOptionValue(Exception): +pass + +def get_bool_option(val): +if val == 'true': +return True +elif val == 'false': +return False +else: +raise InvalidOptionValue() + +def do_option(parser): +global force +(opt, val) = parser[1:3] I prefer: opt, val = parser[1:3] But not a big deal. Otherwise the patch looks OK to me. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 06/10] fast-export: add new --refspec option
Richard Hansen wrote: On 2013-11-11 18:50, Felipe Contreras wrote: On Mon, Nov 11, 2013 at 5:25 PM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: So that we can convert the exported ref names. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- I thought that the discussion agreed this option should not be called --refspec but something like --refmap? I don't know what you agreed to, http://article.gmane.org/gmane.comp.version-control.git/237473 but I didn't agree to anything. Based on your silence I too thought that you had agreed. Given that my opinion is regarded as inferior by those in the discussion, I don't see why I should share it, specially since when I do, it's considered toxic if I disagree. What you pass to this option is a refspec, so it makes sense to name the option --refspec. As discussed in that thread, it's not really the same thing as a refspec used in push or fetch. In those commands, the refspec specifies two separable things: what to transfer, and how to translate refs names between the remote and local repositories. IIUC, the fast-export --refspec argument only specifies how to translate ref names, not what gets transferred. Does it? % git config remote.origin.fetch '+refs/heads/*:refs/remotes-test/origin/*' % git fetch origin master From /home/felipec/dev/git * branchmaster - FETCH_HEAD * [new branch] master - refs/remotes-test/origin/master In this case remote.origin.fetch is determining how to translate ref names, not what gets transferred, *exactly* the same as we are doing with --refspec. And as far as I know, remote.origin.fetch is a refspec. -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
Re: [[PATCH v2]] git-send-email: Added the ability to query the number of smtp password questions
Jeff King p...@peff.net writes: On Tue, Nov 12, 2013 at 09:57:39AM -0800, Junio C Hamano wrote: With this patch git-send-mail ask a configurable number of questions to input the smtp password. Without this patch we have only one trial. I wonder if Git::credential (or even the underlying lower level credential_fill() in the helper API) should give hints to the caller if calling it again may yield a different result. An interactive prompt may allow the user to mistype the password and then a later call may return a correct one, but the .netrc helper will read from the file and will return a fixed result, so there is no use calling credential_fill() again. And in the latter case, you do not want to loop $askpasswordcount times. It would be pretty easy to add an interactive=true flag to the credential response (patch below). Credential readers are supposed to ignore elements that they don't understand. So storage helpers which are told we got a password interactively can choose to use that information if they want, but current implementations will fall back to ignoring it. Similarly, users of git credential fill can use it, but it won't hurt existing readers. Yeah, it may be a sensible way forward. I also have to wonder if this logic belongs to git-send-email. Specifically, I wonder if we can place the looping logic in Git::credential, so that other users of the library can take advantage of it? A very early draft of the credential code added looping, but I cut it out (I think before it even made it to the list). I don't recall the exact reason, but it was probably a combination of: 1. It's awkward to do at the credential layer in C, because you need input from the calling code on whether the credential worked or not. The perl Git::credential can take a callback, though, which means the credential code owns the outer loop, and it would be pretty easy to just loop on trying. I was wondering if it should go to Git::credential; I did not say it might go to credential_fill() API, exactly for that fill does not know if that was accepted reason. We are in full agreement, I think. I guess send-email does not (always) fall under the same category because the user may have put work into a cover letter, or filling interactive fields. So I have no objection to adding it there, but I do agree we might as well put it in Git::credential. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
Christian Couder chrisc...@tuxfamily.org writes: From: Junio C Hamano gits...@pobox.com Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of these is correct without looking at existing callsites? has_suffix(filename, txt); has_suffix(filename, .txt); The semantics of the function we have is the latter and is better called endswith(), I suspect. And the corresponding function to check for head matches should probably be called beginswith(). I don't know if has_suffix() is confusing for a native speaker. After a look at some languages, Python has startwith() and endswith(), and Java has startWith() and endsWith(). But while we are at it, why not ends_with() and begins_with()? To me using an underscore seems more consistent with what we are doing in Git. Sure. I do not think Peff and I were discussing at that level yet to debate between camelCase and words_with_underscore. We were mainly talking about what words to be used, which needs to come before the final appearance. -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 06/10] fast-export: add new --refspec option
Felipe Contreras felipe.contre...@gmail.com writes: Does it? % git config remote.origin.fetch '+refs/heads/*:refs/remotes-test/origin/*' % git fetch origin master From /home/felipec/dev/git * branchmaster - FETCH_HEAD * [new branch] master - refs/remotes-test/origin/master In this case remote.origin.fetch is determining how to translate ref names, not what gets transferred, *exactly* the same as we are doing with --refspec. And as far as I know, remote.origin.fetch is a refspec. If you had 'next' and 'pu' branches at the remote, do they get fetched with that command line? -- 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 http://vger.kernel.org/majordomo-info.html
Re: Bug? diff.submodule=log adds text to commit -v message
Am 12.11.2013 08:46, schrieb Johannes Sixt: Am 11.11.2013 22:29, schrieb Jens Lehmann: The diff below fixes the problem you describe for me. (But I do not consider it a worthwhile fix in its current form because a line starting with Submodule might appear in a perfectly normal commit message, while diff --git most probably won't). And on top of that, Submodule originates from a translatable string, doesn't it? This would also be true for the marker line that Peff proposed: # Everything below this line is a diff that will be removed. But I suspect that would be ok if the marker would be both added and searched for in its translated form. Or is it possible that the locale changes between those two steps? -- 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 http://vger.kernel.org/majordomo-info.html
Re: Bug? diff.submodule=log adds text to commit -v message
Jens Lehmann jens.lehm...@web.de writes: Am 12.11.2013 08:46, schrieb Johannes Sixt: Am 11.11.2013 22:29, schrieb Jens Lehmann: The diff below fixes the problem you describe for me. (But I do not consider it a worthwhile fix in its current form because a line starting with Submodule might appear in a perfectly normal commit message, while diff --git most probably won't). And on top of that, Submodule originates from a translatable string, doesn't it? This would also be true for the marker line that Peff proposed: # Everything below this line is a diff that will be removed. But I suspect that would be ok if the marker would be both added and searched for in its translated form. Or is it possible that the locale changes between those two steps? If we were introducing a divider line for machine consumption, I do not think it is wise to let that line even translated... -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v7 00/11] transport-helper: updates
Felipe Contreras felipe.contre...@gmail.com writes: Here are the patches that allow transport helpers to be completely transparent; Thanks, will replace what is on 'pu'. Felipe Contreras (10): transport-helper: fix extra lines I'll retitle this one to mismerge fix to make it clear where the blame lies ;-) -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 06/10] fast-export: add new --refspec option
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: Does it? % git config remote.origin.fetch '+refs/heads/*:refs/remotes-test/origin/*' % git fetch origin master From /home/felipec/dev/git * branchmaster - FETCH_HEAD * [new branch] master - refs/remotes-test/origin/master In this case remote.origin.fetch is determining how to translate ref names, not what gets transferred, *exactly* the same as we are doing with --refspec. And as far as I know, remote.origin.fetch is a refspec. If you had 'next' and 'pu' branches at the remote, do they get fetched with that command line? No, why would they? You specified a single branch to fetch. Try it yourself. % git clone git://git.kernel.org/pub/scm/git/git.git % git config remote.origin.fetch '+refs/heads/*:refs/remotes-test/origin/*' % git fetch origin master -- Felipe Contreras -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 06/10] fast-export: add new --refspec option
Junio C Hamano gits...@pobox.com writes: Felipe Contreras felipe.contre...@gmail.com writes: Does it? % git config remote.origin.fetch '+refs/heads/*:refs/remotes-test/origin/*' % git fetch origin master From /home/felipec/dev/git * branchmaster - FETCH_HEAD * [new branch] master - refs/remotes-test/origin/master In this case remote.origin.fetch is determining how to translate ref names, not what gets transferred, *exactly* the same as we are doing with --refspec. And as far as I know, remote.origin.fetch is a refspec. If you had 'next' and 'pu' branches at the remote, do they get fetched with that command line? More interestingly, if you have [remote mothership] push = +refs/heads/*:refs/remotes/satellite/* in your configuration and then said $ git push mothership master then configured remote.mothership.push is not even used (I bring this up because export is more closely related to push than fetch). This (and why 'next' and 'pu' are not fetched in the fetch example) is because traditionally, refspecs that are explicitly given on the command line overrides configured ones (in other words, configured ones are used as a fallback default). This is a bit of tangent, but since the recent discussion on the triangular workflows, I've been wondering if we may want to have a new way to configure things so that we can say When I push to mothership any one of my local branches, I want it to go to the ref with the same name at the mothership under refs/remotes/satellite/ hierarchy (because I am emulating 'git fetch' that is run on the mothership to get updates from this satellite), somewhat similar to what you added to fast-export via the option in question. But we cannot achieve that mapping by changing the meaning of the configured refspecs remote.mothership.push without having to worry about breaking existing practices of people. When they say git push mothership master, they do mean to push refs/heads/master to refs/heads/master, and it will break the expectation in their existing repositories if we change the semantics under them. A possible way to achieve that mapping When I push to mothership any one of my local branches,... could be to introduce a _new_ configuration (so that existing repositories will not suddenly change their behaviour): [remote mothership] pushmap = +refs/heads/*:refs/remotes/satellite/* And then we can allow this command line $ git push mothership master to be affected by the mapping when expanding the short-hand refspecs given on the command line. Traditionally, anything without colon stood as a short-hand for push to the same name, e.g. 'master' is for 'refs/heads/master:refs/heads/master' in this example, and 'v1.0' would be for 'refs/tags/v1.0:refs/tags/v1.0'. But it does not have to stay that way. In order to move things forward in that direction, this new configuration has to be distinguishable from the traditional refspec, as it embodies a different concept. -- 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 http://vger.kernel.org/majordomo-info.html
Re: Problem while cloning a git repo
On Tue, Nov 12, 2013 at 01:50:24PM +0100, ycollette.nos...@free.fr wrote: Hello, When I clone a repository, I get an error from git: git clone http://192.168.0.18:8080/test test_Gerrit Clonage dans 'test_Gerrit'... remote: Counting objects: 25106, done remote: Finding sources: 100% (25106/25106) error: RPC failed; result=56, HTTP code = 200iB | 8.12 MiB/s curl code 56 is a receive error (CURLE_RECV_ERROR). It sounds like you're encountering some sort of network error or broken proxy. Does cloning this repository over the git protocol or SSH work, or can you try it over https (to avoid the proxy)? -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 signature.asc Description: Digital signature
Re: git rm / format-patch / am fails on my file: patch does not apply
I am not very much surprised if such a file misbehaves, because the format-patch | am pipeline is designed to be used on patches that can be transferred in plain-text e-mail safely. Long lines should probably be OK, but mixed CRLF, CR and LF may be problematic. I'm not sure I understand this comment. format-patch seems to work fine on binary files. So if it can handle any random collection of bytes, why not text files with (admittedly funky) CRs and LFs? Cheers, Ken On Mon, Nov 11, 2013 at 11:04 AM, Junio C Hamano gits...@pobox.com wrote: Ken Tanzer ken.tan...@gmail.com writes: ASCII text, with very long lines, with CRLF, CR, LF line terminators I am not very much surprised if such a file misbehaves, because the format-patch | am pipeline is designed to be used on patches that can be transferred in plain-text e-mail safely. Long lines should probably be OK, but mixed CRLF, CR and LF may be problematic. Having said that... I've confirmed with the following test case on three machines, so it seems reproducible: mkdir temp_test_case cd temp_test_case git init # my file. Sorry--couldn't find a saner link! wget -O jquery-ui-1.8.custom.min.js http://sourceforge.net/p/agency/code/ci/9358ea4dbe8e1540ec0b8bebfc7770f1bf8be0ec/tree/jquery-ui-1.8.custom.min.js?format=raw git add jquery-ui-1.8.custom.min.js git commit -m 'Adding jquery-ui' git rm jquery-ui-1.8.custom.min.js git commit -m 'Removing jquery-ui' git format-patch HEAD~1 git reset --hard HEAD~1 git am 0001* ... this does not break at all for me. -- AGENCY Software A data system that puts you in control 100% Free Software http://agency-software.org/ ken.tan...@agency-software.org (253) 245-3801 Subscribe to the mailing list to learn more about AGENCY or follow the discussion. -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
On Tue, Nov 12, 2013 at 9:38 PM, Лежанкин Иван abys...@gmail.com wrote: I use linux. I can't publish repo - it's proprietary, it weights ~300M unpacked, and it uses references ~3Gb. Error message doesn't contain remote: prefix. The majority of opened files have name like: objects/pack/pack-hash.[ pack | idx ] They all are from referenced repo. There's a fix related to too many open packs, 88d0db5 (sha1_file: introduce close_one_pack() to close packs on fd pressure - 2013-08-01) but it's only available in v1.5.0-rc0 or rc1. Could you try that version? I have disabled gc in the referenced repo - to prevent all local repos from breaking. May this be the cause of problem? On 12 November 2013 18:19, Duy Nguyen pclo...@gmail.com wrote: On Tue, Nov 12, 2013 at 3:02 PM, Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What OS do you use? If the repository can be published, please do. Compress the whole .git directory, don't push or anything. Does the error message begin with remote: ? If not you could try strace and at least identify what files are opened. -- Duy -- Duy -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
On 13 November 2013 13:48, Duy Nguyen pclo...@gmail.com wrote: On Tue, Nov 12, 2013 at 9:38 PM, Лежанкин Иван abys...@gmail.com wrote: I use linux. I can't publish repo - it's proprietary, it weights ~300M unpacked, and it uses references ~3Gb. Error message doesn't contain remote: prefix. The majority of opened files have name like: objects/pack/pack-hash.[ pack | idx ] They all are from referenced repo. There's a fix related to too many open packs, 88d0db5 (sha1_file: introduce close_one_pack() to close packs on fd pressure - 2013-08-01) but it's only available in v1.5.0-rc0 or rc1. Could you try that version? I believe you mean 1.8.5-rc0 or 1.8.5-rc1, is that correct? I have disabled gc in the referenced repo - to prevent all local repos from breaking. May this be the cause of problem? On 12 November 2013 18:19, Duy Nguyen pclo...@gmail.com wrote: On Tue, Nov 12, 2013 at 3:02 PM, Лежанкин Иван abys...@gmail.com wrote: I get this error message every time I want to do a `git push`. git version: 1.8.4.2 Is it a known issue? Do you need additional info to investigate it? What OS do you use? If the repository can be published, please do. Compress the whole .git directory, don't push or anything. Does the error message begin with remote: ? If not you could try strace and at least identify what files are opened. -- Duy -- Duy -- 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 http://vger.kernel.org/majordomo-info.html -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
On Wed, Nov 13, 2013 at 10:04 AM, Bryan Turner btur...@atlassian.com wrote: but it's only available in v1.5.0-rc0 or rc1. Could you try that version? I believe you mean 1.8.5-rc0 or 1.8.5-rc1, is that correct? Yes. Looks like my fingers are not controlled by my mind anymore. -- Duy -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH] State correct usage of backticks for options in man pages in the coding guidelines
The man pages contain inconsistent usage of backticks vs. single quotes around options and commands that are in paragraphs. This commit states that backticks should always be used around options and commands. This commit also states that -- and friends should be left unescaped (e.g. use `--pretty=oneline` instead of `\--pretty=oneline`). Signed-off-by: Jason St. John jstj...@purdue.edu --- This was discussed here: http://marc.info/?l=gitm=138419319223845w=2 http://marc.info/?l=gitm=138424552300662w=2 Documentation/CodingGuidelines | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index a600e35..b335d48 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -260,9 +260,11 @@ Writing Documentation: Every user-visible change should be reflected in the documentation. The same general rule as for code applies -- imitate the existing - conventions. A few commented examples follow to provide reference - when writing or modifying command usage strings and synopsis sections - in the manual pages: + conventions. + + A few commented examples follow to provide reference when writing or + modifying command usage strings and synopsis sections in the manual + pages: Placeholders are spelled in lowercase and enclosed in angle brackets: file @@ -312,3 +314,17 @@ Writing Documentation: Use 'git' (all lowercase) when talking about commands i.e. something the user would type into a shell and use 'Git' (uppercase first letter) when talking about the version control system and its properties. + + A few commented examples follow to provide reference when writing or + modifying paragraphs or option/command explanations that contain options + or commands: + + Backticks are used around options or commands: + `--pretty=oneline` + `git rev-list` + + Options or commands should use unescaped AsciiDoc: + Correct: + `--pretty=oneline` + Incorrect: + `\--pretty=oneline` -- 1.8.4.2 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH] Fix single quotes, AsciiDoc escaping, and other formatting/grammatical issues
rev-list-options.txt: -- added line breaks before some endif AsciiDoc commands to fix syntax highlighting in Vim -- added line breaks after some options subheadings to fix syntax highlighting in Vim -- added backticks around options/commands that were missing it -- removed AsciiDoc escapes for -- in options/commands -- replaced single quotes around options/commands with backticks -- replaced regexp with regular expression(s) where appropriate -- added backticks around a file path to /dev/null -- replaced some double quotes with proper AsciiDoc quotes (e.g. ``foo'') -- slightly reworded some sentences for easier reading -- fix some typos (e.g. show - shown) Signed-off-by: Jason St. John jstj...@purdue.edu --- This is a resubmit of patch 2/4 from my earlier patchset: http://marc.info/?l=gitm=138395814108214w=2 Documentation/rev-list-options.txt | 136 + 1 file changed, 76 insertions(+), 60 deletions(-) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index ec86d09..a7d2c5d 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -40,6 +40,7 @@ ifdef::git-rev-list[] --min-age=timestamp:: Limit the commits output to specified time range. + endif::git-rev-list[] --author=pattern:: @@ -71,13 +72,15 @@ When `--show-notes` is in effect, the message from the notes as if it is part of the log message. --all-match:: - Limit the commits output to ones that match all given --grep, + + Limit the commits output to ones that match all given `--grep`, instead of ones that match at least one. -i:: --regexp-ignore-case:: - Match the regexp limiting patterns without regard to letters case. + Match the regular expression limiting patterns without regard to + letter case. --basic-regexp:: @@ -98,7 +101,7 @@ if it is part of the log message. --perl-regexp:: - Consider the limiting patterns to be Perl-compatible regexp. + Consider the limiting patterns to be Perl-compatible regular expressions. Requires libpcre to be compiled in. --remove-empty:: @@ -129,6 +132,7 @@ again. Equivalent forms are `--min-parents=0` (any commit has 0 or more parents) and `--max-parents=-1` (negative numbers denote no upper limit). --first-parent:: + Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, @@ -140,7 +144,7 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit). --not:: Reverses the meaning of the '{caret}' prefix (or lack thereof) - for all following revision specifiers, up to the next '--not'. + for all following revision specifiers, up to the next `--not`. --all:: @@ -169,6 +173,7 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit). If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. --glob=glob-pattern:: + Pretend as if all the refs matching shell glob 'glob-pattern' are listed on the command line as 'commit'. Leading 'refs/', is automatically prepended if missing. If pattern lacks '?', '{asterisk}', @@ -186,6 +191,7 @@ ifndef::git-rev-list[] was listed and as if it was followed by `--not` and the good bisection refs `refs/bisect/good-*` on the command line. + endif::git-rev-list[] --stdin:: @@ -202,7 +208,8 @@ ifdef::git-rev-list[] is primarily meant to allow the caller to test the exit status to see if a range of objects is fully connected (or not). It is faster than redirecting stdout - to /dev/null as the output does not have to be formatted. + to `/dev/null` as the output does not have to be formatted. + endif::git-rev-list[] --cherry-mark:: @@ -213,15 +220,15 @@ endif::git-rev-list[] --cherry-pick:: Omit any commit that introduces the same change as - another commit on the other side when the set of + another commit on the ``other side'' when the set of commits are limited with symmetric difference. + For example, if you have two branches, `A` and `B`, a usual way to list all commits on only one side of them is with `--left-right` (see the example below in the description of -the `--left-right` option). It however shows the commits that were cherry-picked -from the other branch (for example, 3rd on b may be cherry-picked -from branch A). With this option, such pairs of commits are +the `--left-right` option). However, it shows the commits that were +cherry-picked from the other branch (for example, 3rd on b may be +cherry-picked from branch A). With this option, such pairs of commits are excluded from the output. --left-only:: @@ -254,14 +261,14 @@ list. exclude (that is, '{caret}commit', 'commit1..commit2',
[PATCH 1/2] Rewrite man page explanation of git log's --log-size option
Documentation/git-log.txt: --log-size was added in commit 9fa3465, and the commit message contained a satisfactory explanation; however, the man page entry for it was unclear and cryptic. Thanks-to: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Jason St. John jstj...@purdue.edu --- This is effectively a resubmit of my previous patch here: http://marc.info/?l=gitm=138395803808196w=2 Thanks to Jonathan Nieder for writing the text used in this commit: http://marc.info/?l=gitm=138395887208373w=2 Documentation/git-log.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 34097ef..a5de513 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -56,11 +56,11 @@ Note that this affects all diff-based output types, e.g. those produced by --stat etc. --log-size:: - Before the log message print out its size in bytes. Intended - mainly for porcelain tools consumption. If Git is unable to - produce a valid value size is set to zero. - Note that only message is considered, if also a diff is shown - its size is not included. + + Include a line ``log size number'' in the output for each commit, + where number is the length of that commit's message in bytes. + Intended to speed up tools that read log messages from `git log` + output by allowing them to allocate space in advance. -L start,end:file:: -L :regex:file:: -- 1.8.4.2 -- 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 http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] Fix minor grammatical and other formatting issues in the git log man page
Documentation/git-log.txt: -- replace single quotes around options/commands with backticks -- use single quotes around references to sections -- replaced some double quotes with proper AsciiDoc quotes (e.g. ``foo'') -- use backticks around files and file paths -- use title case when referring to section headings -- use backticks around option arguments/defaults Signed-off-by: Jason St. John jstj...@purdue.edu --- When working on this commit, I noticed a difference in how options and option descriptions are separated (e.g. with a blank line or not). At least with Vim's syntax highlighting, if there is a blank line between the option and its description, the text block is all colored the same; however, if there isn't a blank line, then the text block is not specially colored. Is there an existing convention for how this should be done? Documentation/git-log.txt | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index a5de513..1f7bc67 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -15,9 +15,9 @@ DESCRIPTION --- Shows the commit logs. -The command takes options applicable to the 'git rev-list' +The command takes options applicable to the `git rev-list` command to control what is shown and how, and options applicable to -the 'git diff-*' commands to control how the changes +the `git diff-*` commands to control how the changes each commit introduces are shown. @@ -42,21 +42,20 @@ OPTIONS --use-mailmap:: Use mailmap file to map author and committer names and email - to canonical real names and email addresses. See + addresses to canonical real names and email addresses. See linkgit:git-shortlog[1]. --full-diff:: - Without this flag, git log -p path... shows commits that + Without this flag, `git log -p path...` shows commits that touch the specified paths, and diffs about the same specified paths. With this, the full diff is shown for commits that touch the specified paths; this means that path... limits only commits, and doesn't limit diff for those commits. + Note that this affects all diff-based output types, e.g. those -produced by --stat etc. +produced by `--stat`, etc. --log-size:: - Include a line ``log size number'' in the output for each commit, where number is the length of that commit's message in bytes. Intended to speed up tools that read log messages from `git log` @@ -64,7 +63,6 @@ produced by --stat etc. -L start,end:file:: -L :regex:file:: - Trace the evolution of the line range given by start,end (or the funcname regex regex) within the file. You may not give any pathspec limiters. This is currently limited to @@ -80,16 +78,16 @@ include::line-range-format.txt[] whole history leading to the current commit). `origin..HEAD` specifies all the commits reachable from the current commit (i.e. `HEAD`), but not from `origin`. For a complete list of - ways to spell revision range, see the Specifying Ranges + ways to spell revision range, see the 'Specifying Ranges' section of linkgit:gitrevisions[7]. [\--] path...:: Show only commits that are enough to explain how the files - that match the specified paths came to be. See History - Simplification below for details and other simplification + that match the specified paths came to be. See 'History + Simplification' below for details and other simplification modes. + -Paths may need to be prefixed with \-- to separate them from +Paths may need to be prefixed with ``\-- '' to separate them from options or the revision range, when confusion arises. include::rev-list-options.txt[] @@ -113,12 +111,12 @@ EXAMPLES `git log v2.6.12.. include/scsi drivers/scsi`:: Show all commits since version 'v2.6.12' that changed any file - in the include/scsi or drivers/scsi subdirectories + in the `include/scsi` or `drivers/scsi` subdirectories `git log --since=2 weeks ago -- gitk`:: Show the changes during the last two weeks to the file 'gitk'. - The -- is necessary to avoid confusion with the *branch* named + The ``--'' is necessary to avoid confusion with the *branch* named 'gitk' `git log --name-status release..test`:: @@ -129,7 +127,7 @@ EXAMPLES `git log --follow builtin/rev-list.c`:: - Shows the commits that changed builtin/rev-list.c, including + Shows the commits that changed `builtin/rev-list.c`, including those commits that occurred before the file was given its present name. @@ -147,17 +145,18 @@ EXAMPLES `git log -p -m --first-parent`:: Shows the history including change diffs, but only from the - main branch perspective, skipping commits that come from
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: After a look at some languages, Python has startwith() and endswith(), and Java has startWith() and endsWith(). But while we are at it, why not ends_with() and begins_with()? To me using an underscore seems more consistent with what we are doing in Git. Sure. I do not think Peff and I were discussing at that level yet to debate between camelCase and words_with_underscore. We were mainly talking about what words to be used, which needs to come before the final appearance. Ok. By the way Ruby has start_with? and end_with?. So the thing we can discuss, if we go this way are: 1) with an s after the verb or not? 2) should we use start or begin? 3) with an underscore, nothing or camelCase My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() Thanks, Christian. -- 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 http://vger.kernel.org/majordomo-info.html
Re: Error message: unable to open object pack directory: .git/objects/pack: Too many open files
I've tried your commit. No more error messages. Looking forward to the next git version. Thanks. On 13 November 2013 07:32, Duy Nguyen pclo...@gmail.com wrote: On Wed, Nov 13, 2013 at 10:04 AM, Bryan Turner btur...@atlassian.com wrote: but it's only available in v1.5.0-rc0 or rc1. Could you try that version? I believe you mean 1.8.5-rc0 or 1.8.5-rc1, is that correct? Yes. Looks like my fingers are not controlled by my mind anymore. -- Duy -- 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 http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/86] replace prefixcmp() with has_prefix()
On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW, that looks good to me, too. Whether there is confusion over the meaning of suffix or not, it makes sense, all other things being equal, to use the same terms as other popular languages. Like you, I prefer with an s, but we are deep in bikeshedding territory now. I can live with anything. :) -Peff -- 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 http://vger.kernel.org/majordomo-info.html
Re: Problem while cloning a git repo
Hello, When I perform the git clone via git, it works. The problem is only happening via http. I tried to play with http.postBuffer and I set this parameter to it's maximum (a little bit before a git clone triggered a memory alloc problem) and I see that something big is trying to be downloaded. But I don't see such a big file in my history of commits. The maximum one seems to be around 50 Mo ... Le 13/11/2013 01:20, brian m. carlson a écrit : On Tue, Nov 12, 2013 at 01:50:24PM +0100, ycollette.nos...@free.fr wrote: Hello, When I clone a repository, I get an error from git: git clone http://192.168.0.18:8080/test test_Gerrit Clonage dans 'test_Gerrit'... remote: Counting objects: 25106, done remote: Finding sources: 100% (25106/25106) error: RPC failed; result=56, HTTP code = 200iB | 8.12 MiB/s curl code 56 is a receive error (CURLE_RECV_ERROR). It sounds like you're encountering some sort of network error or broken proxy. Does cloning this repository over the git protocol or SSH work, or can you try it over https (to avoid the proxy)? -- 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 http://vger.kernel.org/majordomo-info.html