Re: split directories into branches
correction On Mon, Jul 4, 2016 at 7:30 PM, shawn wilsonwrote: > shopt -s extglob; declare -a f=(!(cookbooks)); git filter-branch > --tree-filter "mkdir -p cookbooks/base_sys && mv ${f[@]} > cookbooks/base_sys" > -- 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: split directories into branches
On Mon, Jul 4, 2016 at 6:10 PM, Andreas Schwabwrote: > shawn wilson writes: > >> $ git filter-branch --tree-filter "shopt -s extglob && mkdir -p >> cookbooks/base_sys && mv !(cookbooks) cookbooks/base_sys" > > extglob changes the parser, you need to set that on a separate line. > by "separate line", I'm guessing you mean outside of the filter-branch eval? Something like this? shopt -s extglob; declare -a f=(!(cookbooks)); git filter-branch --tree-filter "mkdir -p cookbooks/base_sys && mv $f cookbooks/base_sys" (don't have access to the repo atm and am curious if this is what you mean) -- 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
[RFC] notes..rewriteMode configuration option
Hi all, The project I work on currently heavily uses git. We would like to add some tools based around detecting how branches change over time for code review, so that users can compare commits as they change. We'd like to do this via adding metadata in git notes, so that we can detect when commits are ammended or squashed. While digging around in the `git notes` help, I noticed there is support for `notes..mergeStrategy` but not `notes..rewriteMode` configuration options. I was wondering if you would be interested in a patch that adds support for a `notes..rewriteMode` configuration option that would take precedence for doing note rewrites for the given ref (like how `notes..mergeStrategy` takes precedence for merges). Regards, Barret Rennie -- 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] add documentation to mw-to-git
Signed-off-by: Alexandru Zbarcea--- contrib/mw-to-git/Makefile | 44 - contrib/mw-to-git/git-mediawiki.txt| 100 + contrib/mw-to-git/git-remote-mediawiki.txt | 7 -- 3 files changed, 142 insertions(+), 9 deletions(-) diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile index a4b6f7a..a2b5ed8 100644 --- a/contrib/mw-to-git/Makefile +++ b/contrib/mw-to-git/Makefile @@ -12,13 +12,25 @@ # # make install +prefix ?= /usr/local +mandir ?= $(prefix)/share/man +man1dir ?= $(mandir)/man1 +htmldir ?= $(prefix)/share/doc/git-doc + GIT_MEDIAWIKI_PM=Git/Mediawiki.pm SCRIPT_PERL=git-remote-mediawiki.perl SCRIPT_PERL+=git-mw.perl GIT_ROOT_DIR=../.. HERE=contrib/mw-to-git/ -INSTALL = install +INSTALL ?= install +RM ?= rm -f + +ASCIIDOC = asciidoc +XMLTO= xmlto + +ASCIIDOC_CONF = ../../Documentation/asciidoc.conf +MANPAGE_XSL = ../../Documentation/manpage-normal.xsl SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL)) INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \ @@ -26,8 +38,36 @@ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \ DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR)) +GIT_MEDIAWIKI_DOC := git-mediawiki.1 +GIT_MEDIAWIKI_XML := git-mediawiki.xml +GIT_MEDIAWIKI_TXT := git-mediawiki.txt +GIT_MEDIAWIKI_HTML := git-mediawiki.html + all: build +doc: $(GIT_MEDIAWIKI_DOC) $(GIT_MEDIAWIKI_HTML) + +install-doc: install-man install-html + +install-man: $(GIT_MEDIAWIKI_DOC) + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) + $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir) + +install-html: $(GIT_MEDIAWIKI_HTML) + $(INSTALL) -d -m 755 $(DESTDIR)$(htmldir) + $(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir) + +$(GIT_MEDIAWIKI_DOC): $(GIT_MEDIAWIKI_XML) + $(XMLTO) -m $(MANPAGE_XSL) man $^ + +$(GIT_MEDIAWIKI_XML): $(GIT_MEDIAWIKI_TXT) + $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \ + -agit_version=$(GIT_VERSION) $^ + +$(GIT_MEDIAWIKI_HTML): $(GIT_MEDIAWIKI_TXT) + $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \ + -agit_version=$(GIT_VERSION) $^ + test: all $(MAKE) -C t @@ -54,4 +94,4 @@ perlcritic: perlcritic -5 $(SCRIPT_PERL) -perlcritic -2 $(SCRIPT_PERL) -.PHONY: all test check install_pm install clean perlcritic +.PHONY: all doc test check install_pm install install-doc install-man install-html clean perlcritic diff --git a/contrib/mw-to-git/git-mediawiki.txt b/contrib/mw-to-git/git-mediawiki.txt new file mode 100644 index 000..421fbae --- /dev/null +++ b/contrib/mw-to-git/git-mediawiki.txt @@ -0,0 +1,100 @@ +git-mediawiki(1) +== + +NAME + +git-mediawiki - Abstracts a Mediawiki as a git repository. + + +SYNOPSIS + +[verse] +'git clone' -c = mediawiki:: +'git fetch' -c = +'git mw' help +'git mw' preview + +DESCRIPTION +--- +Git-Mediawiki is a project which aims the creation of a gate +between git and mediawiki, allowing git users to push and pull +objects from mediawiki just as one would do with a classic git +repository thanks to 'remote-helpers'. + +[TIP] +For more information, visit the wiki at +https://github.com/moy/Git-Mediawiki/wiki + +[TIP] +Limit the pages to be imported. If you don't want to clone the +whole wiki, you can import only some pages with: + + $ git clone -c remote.origin.pages='A_page Another_page' \ +mediawiki::http://yourwikiadress.com + +and/or select the content of MediaWiki Categories with: + +$ git clone -c remote.origin.categories='First Second' \ +mediawiki::http://yourwikiadress.com + + +COMMANDS + +help:: +Display help information about git mw. + +preview:: +Parse and render local file into HTML. Preview a page without actually pushing it to the wiki. + +OPTIONS FOR git +- + +remote..pages:: +Imports only the page specified. + +remote..categories:: +Imports only the category page specified. + +remote..shallow:: +Imports only the last revision of a wiki + +remote..mwLogin:: +Login username for the wiki + +remote..mwDomain:: +If your wiki requires specifying a domain when logging in (if you use LDAP authentication for instance), this value represents the domain for your 'remote..mwLogin'. + +remote..mwPassword:: +Login password for the wiki + +remote..dumbPush:: +If 'true', then 'git push' will not touch the MediaWiki metadata, and will ask you to reimport history after a successful push, typically with 'git pull --rebase'. For those who know 'git svn', in this mode, 'git push; git pull --rebase' is the equivalent of 'git svn dcommit'. + +remote..fetchStrategy:: +by_page:: +This is the most efficient method when cloning a small subset of a very active wiki. On the other hand, fetching from a wiki with little activity but many pages is long (the tool has to query every page even to say "Everything up to date"). + +by_rev:: +Then, git-remote-mediawiki will query the whole
Missing Package in git Installation Instructions (git-scm.com)
Hi, I noticed that the instructions on https://git-scm.com/book/en/v2/G etting-Started-Installing-Git don't work without dh-autoreconf installed on an apt-get system which isn't listed on that site. Can you fix that or tell me whom to tell about this? The website doesn't offer contact information. Just tried this on a fresh Ubuntu 16.04 installation. -- With kind regards Christoph Michelbach -- 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: split directories into branches
shawn wilsonwrites: > $ git filter-branch --tree-filter "shopt -s extglob && mkdir -p > cookbooks/base_sys && mv !(cookbooks) cookbooks/base_sys" extglob changes the parser, you need to set that on a separate line. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- 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: split directories into branches
On Mon, Jul 4, 2016 at 2:29 PM, Konstantin Khomoutovwrote: > On Mon, 4 Jul 2016 14:15:58 -0400 > shawn wilson wrote: > > I don't possess the official stance on this topic but AFAIK user-level > questions are fine on this list. In that case :) ... still having issues w/ filter-branch: $ git filter-branch --tree-filter "shopt -s extglob && mkdir -p cookbooks/base_sys && mv !(cookbooks) cookbooks/base_sys" Rewrite a90fb34230e02d9494934e5549f36bdbdd1b6ce6 (1/6) (0 seconds passed, remaining 0 predicted) /usr/local/libexec/git-core/git-filter-branch: eval: line 360: syntax error near unexpected token `(' /usr/local/libexec/git-core/git-filter-branch: eval: line 360: `shopt -s extglob && mkdir -p cookbooks/base_sys && mv !(cookbooks) cookbooks/base_sys' /usr/local/libexec/git-core/git-filter-branch: line 360: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires tree filter failed: shopt -s extglob && mkdir -p cookbooks/base_sys && mv !(cookbooks) cookbooks/base_sys I'm guessing it's because of how filter-branch is eval'ing stuff. But if I do !\(cookbooks\) it interprets the '(' and ')' as text - ideas? -- 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
--dir-diff not working with partial path limiter
Hello! Today I started using --dir-diff and noticed a problem when specifying a non-full path limiter. My diff tool is setup to be meld (*1). OK while working directory is repo root; also OK while working directory is repo subfolder "actual": git difftool --dir-diff HEAD~1 HEAD -- actual/existing/path => meld opens with proper dir-diff. NOT OK while working directory is repo subfolder "actual": git difftool --dir-diff HEAD~1 HEAD -- existing/path => nothing happens, as if using "non/such/path" as the path limiter. Because "git diff HEAD~1 HEAD -- existing/path" while the working directory is the repo subfolder "actual" works, I epxected the difftool to work similarly. Is this a bug? Best, Bernhard (*1) [diff] tool = mydiffmeld [difftool "mydiffmeld"] cmd = meld --auto-compare --diff $LOCAL $REMOTE [difftool] prompt = false -- 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: split directories into branches
On Mon, 4 Jul 2016 14:15:58 -0400 shawn wilsonwrote: [...] > > I know Git tracks content, not files (and directory) but still many > > folks have "stable" directories for their files, assign certain > > semantics to them etc. I've needed such transfers myself, and this > > topic has been raised more than once by folks over there on the > > git-users mailing list. [...] > Thanks for pointing out the users list - didn't notice it and sorry > for posting a user question on a dev list. I don't possess the official stance on this topic but AFAIK user-level questions are fine on this list. The git-users mailing list was created -- as I understand it -- because of three reasons: 1) it's easier to post to; 2) you don't receive all the bug reports and patch traffic irrelevant to mere mortals; 3) you have good chances to get even RTFM questions answered (mostly by those who just had RTFM recently), though I'd say stackoverflow is better at this one. ;-) -- 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: split directories into branches
On Mon, Jul 4, 2016 at 1:39 PM, Konstantin Khomoutovwrote: > On Mon, 4 Jul 2016 12:45:39 -0400 > shawn wilson wrote: > > > To achieve what you're after I used `git subtree split` followed by > `git filter-branch --tree-filter ...` which moved all the files under > the directory hierarchy `git subtree split` removes. > Ah, that looks like it should work - thanks > I know Git tracks content, not files (and directory) but still many > folks have "stable" directories for their files, assign certain > semantics to them etc. I've needed such transfers myself, and this > topic has been raised more than once by folks over there on the > git-users mailing list. Or just an option for git {rm,mv,cp} that would allow simple rewriting of history. Ie: git mv HEAD~3.. -- foo bar (obviously not the sanest thing in most cases but would be a shorter reach than filter-branch - and if newest isn't head then it'd what? move it back during commits for who knows what - still...) Thanks for pointing out the users list - didn't notice it and sorry for posting a user question on a dev list. -- 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] cache-tree.c: fix i-t-a check skipping directory updates sometimes
Commit 3cf773e (cache-tree: fix writing cache-tree when CE_REMOVE is present - 2012-12-16) skips i-t-a entries when building trees objects from the index. Unfortunately it may skip too much. The code in question checks if an entry is an i-t-a one, then no tree entry will be written. But it does not take into account that directories can also be written with the same code. Suppose we have this in the index. a-file subdir/file1 subdir/file2 subdir/file3 the-last-file We write an entry for a-file as normal and move on to subdir/file1, where we realize the entry name for this level is simply just "subdir", write down an entry for "subdir" then jump three items ahead to the-last-file. That is what happens normally when the first file in subdir is not an i-t-a entry. If subdir/file1 is an i-t-a, because of the broken condition in this code, we still think "subdir" is an i-t-a file and not writing "subdir" down and jump to the-last-file. The result tree now only has two items: a-file and the-last-file. subdir should be there too (even though it only records two sub-entries, file2 and file3). If the i-t-a entry is subdir/file2 or subdir/file3, this is not a problem because we jump over them anyway. Which may explain why the bug is hidden for nearly four years. Fix it by making sure we only skip i-t-a entries when the entry in question is actual an index entry, not a directory. Reported-by: Yuri KanivetskySigned-off-by: Nguyễn Thái Ngọc Duy --- cache-tree.c | 4 ++-- t/t2203-add-intent.sh | 13 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cache-tree.c b/cache-tree.c index ddf0cc9..c2676e8 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -319,7 +319,7 @@ static int update_one(struct cache_tree *it, i = 0; while (i < entries) { const struct cache_entry *ce = cache[i]; - struct cache_tree_sub *sub; + struct cache_tree_sub *sub = NULL; const char *path, *slash; int pathlen, entlen; const unsigned char *sha1; @@ -375,7 +375,7 @@ static int update_one(struct cache_tree *it, * they are not part of generated trees. Invalidate up * to root to force cache-tree users to read elsewhere. */ - if (ce_intent_to_add(ce)) { + if (!sub && ce_intent_to_add(ce)) { to_invalidate = 1; continue; } diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh index 2a4a749..12d701c 100755 --- a/t/t2203-add-intent.sh +++ b/t/t2203-add-intent.sh @@ -82,5 +82,18 @@ test_expect_success 'cache-tree invalidates i-t-a paths' ' test_cmp expect actual ' +test_expect_success 'cache-tree does not ignore dir that has i-t-a entries' ' + git init ita-in-dir && + ( + cd ita-in-dir && + mkdir 2 && + touch 1 2/1 2/2 3 && + git add 1 2/2 3 && + git add -N 2/1 && + git commit -m comitted && + git ls-tree -r HEAD | grep 2/2 + ) +' + test_done -- 2.8.2.537.g0965dd9 -- 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: split directories into branches
On Mon, 4 Jul 2016 12:45:39 -0400 shawn wilsonwrote: > I've got a chef cookbook repo where everyone started developing > cookbooks in a single dev branch (not project specific). Minus a few > edge cases, it should be fairly simple to split this up into feature > branches based on /cookbooks/. > > I tried: > $ git filter-branch --subdirectory-filter cookbooks/-- > And > $ git subtree split --prefix cookbooks/ -b > > Which both seem to do the same thing (haven't looked at the subtree > bash - guessing it does exactly the filter-branch). The issue is that > it removes the directory tree (so obviously merges wouldn't work). I'm > thinking some type of filter-branch --index-filter with a cherry pick > (or similar) should work...? To achieve what you're after I used `git subtree split` followed by `git filter-branch --tree-filter ...` which moved all the files under the directory hierarchy `git subtree split` removes. I'd love if `git subtree split` had an option to preserve the prefix (even better would be to have another option to rewrite the prefix) because that would greatly simplify another use case for `git subtree`: moving "a directory" with its full history from one repository into another. Presently, the user is able to split that directory out from the source repository but when they subtree-merge it back in the new repository, they are puzzled by the fact `git log` invoked on the new history with the pathname prefix designating the "inserted" directory does not traverse past the merge point which brought that directory in. I know Git tracks content, not files (and directory) but still many folks have "stable" directories for their files, assign certain semantics to them etc. I've needed such transfers myself, and this topic has been raised more than once by folks over there on the git-users mailing list. -- 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
split directories into branches
I've got a chef cookbook repo where everyone started developing cookbooks in a single dev branch (not project specific). Minus a few edge cases, it should be fairly simple to split this up into feature branches based on /cookbooks/. I tried: $ git filter-branch --subdirectory-filter cookbooks/-- And $ git subtree split --prefix cookbooks/ -b Which both seem to do the same thing (haven't looked at the subtree bash - guessing it does exactly the filter-branch). The issue is that it removes the directory tree (so obviously merges wouldn't work). I'm thinking some type of filter-branch --index-filter with a cherry pick (or similar) should work...? -- 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 v4 1/5] git-fetch.txt: document fetch output
On Mon, Jul 4, 2016 at 5:25 PM, Jakub Narębskiwrote: > W dniu 2016-07-04 o 17:17, Duy Nguyen pisze: >> On Mon, Jul 4, 2016 at 4:07 PM, Jakub Narębski wrote: >>> W dniu 2016-06-26 o 07:58, Nguyễn Thái Ngọc Duy pisze: +summary:: + For a successfully fetched ref, the summary shows the old and new + values of the ref in a form suitable for using as an argument to + `git log` (this is `..` in most cases, and + `...` for forced non-fast-forward updates). >>> >>> It would be nice to have documented here also other formats, >>> like "[new branch]", and/or mention that if the is not usable >>> for `git log` it is put in brackets []. >> >> Can I do it in a separate topic in future? We may want to unify this >> and the output format in git-pull as well, then include fetch format >> in git-pull. > > Yes, of course it can be added later. Though it feels strange for docs > to talk about .. and ... format only (note that it > is also suitable for copy'n'paste to `git diff`, not only for `git log`) > while having "[new branch]" in examples / later patches. It's because it's copied from git-push.txt and not all [] are listed there either :) But I think you have convinced me I should do it now. -- 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: Git doesn't always add files to a commit (amend)
On Mon, Jul 04, 2016 at 04:50:38PM +0300, Yuri Kanivetsky wrote: > Hi, > > When intent to add a directory is made (`git add -N`), and then > contents of any but the first file is staged, `git commit -v --amend` > doesn't add it to the commit Oops, a bug since 2012. Thanks for the report. I know what's wrong and will prepare a proper patch in a couple of hours. > , see for yourself: > > #!/usr/bin/env bash > set -eu > rm -rf 1 > mkdir 1 > cd 1 > git init > echo 1 > 1 && git add 1 && git commit -m 1 > mkdir 2 > echo 2/1 > 2/1 > echo 2/2 > 2/2 > git add -N 2 > # git add 2/1 # this file is added > git add 2/2 # as opposed to this one > git commit --amend -m 1 > git --no-pager log -p > git reset > git --no-pager status > > I'm running git-2.9.0. > > Regards, > Yuri > -- > 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: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.8.4
Hi Fabio, On Mon, 4 Jul 2016, Fabio Porcedda wrote: > How i can download the version 2.8.4? > Trough the download link https://git-for-windows.github.io/ it's available > only the latest version. Please click on the "repository" link in the header of that web site. This will take you to the GitHub repository, which currently has 681 releases (there is a link just below where it says "A fork of Git containing Windows-specific patches."). If you click on that "releases" link, you will see *all* past releases. Ciao, Johannes -- 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 v4 1/5] git-fetch.txt: document fetch output
W dniu 2016-07-04 o 17:17, Duy Nguyen pisze: > On Mon, Jul 4, 2016 at 4:07 PM, Jakub Narębskiwrote: >> W dniu 2016-06-26 o 07:58, Nguyễn Thái Ngọc Duy pisze: >>> +summary:: >>> + For a successfully fetched ref, the summary shows the old and new >>> + values of the ref in a form suitable for using as an argument to >>> + `git log` (this is `..` in most cases, and >>> + `...` for forced non-fast-forward updates). >> >> It would be nice to have documented here also other formats, >> like "[new branch]", and/or mention that if the is not usable >> for `git log` it is put in brackets []. > > Can I do it in a separate topic in future? We may want to unify this > and the output format in git-pull as well, then include fetch format > in git-pull. Yes, of course it can be added later. Though it feels strange for docs to talk about .. and ... format only (note that it is also suitable for copy'n'paste to `git diff`, not only for `git log`) while having "[new branch]" in examples / later patches. -- 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
Re: [PATCH v4 1/5] git-fetch.txt: document fetch output
On Mon, Jul 4, 2016 at 4:07 PM, Jakub Narębskiwrote: > W dniu 2016-06-26 o 07:58, Nguyễn Thái Ngọc Duy pisze: >> +summary:: >> + For a successfully fetched ref, the summary shows the old and new >> + values of the ref in a form suitable for using as an argument to >> + `git log` (this is `..` in most cases, and >> + `...` for forced non-fast-forward updates). > > It would be nice to have documented here also other formats, > like "[new branch]", and/or mention that if the is not usable > for `git log` it is put in brackets []. Can I do it in a separate topic in future? We may want to unify this and the output format in git-pull as well, then include fetch format in git-pull. -- 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 v5 0/5] Better ref summary alignment in "git fetch"
On Mon, Jul 4, 2016 at 3:17 PM, Marc Branchaudwrote: > On 2016-07-01 12:03 PM, Nguyễn Thái Ngọc Duy wrote: >> >> v5 changes the substitute symbol from '$' to '*' in compact mode and >> makes sure long lines in compact mode will not make the remote ref >> column too big (it's far from perfect but I think it's still good to >> do). > > > I think the first 4 patches are great. > > I have no opinion on the 5th patch, as I don't expect to use the compact > format in any of its proposed forms (and I can't come up with an > alternative). I started using compact mode for a couple days now and I find it nice. Because line lengths are shortened nearly by half, I can now have two vertical tmux panes in a window without wrapping. -- 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] diff compaction heuristic: favor shortest neighboring blank lines
W dniu 2016-07-01 o 20:01, Junio C Hamano pisze: > Michael Haggertywrites: >> It often fails to get C preprocessor directives right: >> >>> a08595f76159b09d57553e37a5123f1091bb13e7:http.c >>> aeff8a61216bf6e0d663c08c583bc8552fa3c344:http.c + 429 >>> >>>>curl_easy_setopt(result, CURLOPT_SSLKEY, >>> ssl_key); >>>>#endif >>>>#if LIBCURL_VERSION_NUM >= 0x070908 >>>>if (ssl_capath != NULL) >>>>curl_easy_setopt(result, CURLOPT_CAPATH, >>> ssl_capath); >>> -1 | i >#endif >>>0 || ci >#if LIBCURL_VERSION_NUM >= 0x072c00 >>> || ci >if (ssl_pinnedkey != NULL) >>> || ci >curl_easy_setopt(result, >>> CURLOPT_PINNEDPUBLICKEY, ssl_pinnedkey); >>> | c >#endif > > Yes, this is "non-human do not know 'end' is likely to be at the end > of a logical block". I wonder if taking into account xfuncname match to adjust heuristics (or to change "slider") would help there. I think good heuristic would be to break before xfuncname match (before new section). >> And it gets confused by unusual blank line placement: >> >>> ed55169834a3ce16a271def9630c858626ded34d:tools/eslint/node_modules/doctrine/lib/doctrine.js >>> >>> 2d441493a4a46a511ba1bdf93e442c3288fbe92d:tools/eslint/node_modules/doctrine/lib/doctrine.js >>> + 330 >>> >>>>name === 'external' || >>>>name === 'event')) { >>>>name += advance(); >>>>name += scanIdentifier(last); >>>> >>> -1 | i >} >>>0 || ci >if(source.charCodeAt(index) === 0x5B /* >>> '[' */ && source.charCodeAt(index + 1) === 0x5D /* ']' */){ >>> || ci >name += advance(); >>> || ci >name += advance(); >>> | c >} > > Likewise, this is showing that a "non-human not knowing } is a closing > and { is an opening token". If not encoding heuristic that [,{,( are opening token, and ],},) are closing token into heuristics, perhaps length of the line could be a consideration about where to start a diff chunk? -- 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
Re: [PATCH v4 1/5] git-fetch.txt: document fetch output
W dniu 2016-06-26 o 07:58, Nguyễn Thái Ngọc Duy pisze: > +summary:: > + For a successfully fetched ref, the summary shows the old and new > + values of the ref in a form suitable for using as an argument to > + `git log` (this is `..` in most cases, and > + `...` for forced non-fast-forward updates). It would be nice to have documented here also other formats, like "[new branch]", and/or mention that if the is not usable for `git log` it is put in brackets []. -- 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
Git doesn't always add files to a commit (amend)
Hi, When intent to add a directory is made (`git add -N`), and then contents of any but the first file is staged, `git commit -v --amend` doesn't add it to the commit, see for yourself: #!/usr/bin/env bash set -eu rm -rf 1 mkdir 1 cd 1 git init echo 1 > 1 && git add 1 && git commit -m 1 mkdir 2 echo 2/1 > 2/1 echo 2/2 > 2/2 git add -N 2 # git add 2/1 # this file is added git add 2/2 # as opposed to this one git commit --amend -m 1 git --no-pager log -p git reset git --no-pager status I'm running git-2.9.0. Regards, Yuri -- 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 v5 0/5] Better ref summary alignment in "git fetch"
On 2016-07-01 12:03 PM, Nguyễn Thái Ngọc Duy wrote: v5 changes the substitute symbol from '$' to '*' in compact mode and makes sure long lines in compact mode will not make the remote ref column too big (it's far from perfect but I think it's still good to do). I think the first 4 patches are great. I have no opinion on the 5th patch, as I don't expect to use the compact format in any of its proposed forms (and I can't come up with an alternative). M. -- 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
[ANNOUNCE] git-cinnabar 0.4.0 beta 1
Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.4.0b1 [ Previous announcements: http://marc.info/?l=git=146179749105388 http://marc.info/?l=git=145294370431454 http://marc.info/?l=git=145284823007354 http://marc.info/?l=git=142837367709781 (...)] What's new since 0.3.2? - Various bug fixes. - Updated git to 2.9 for cinnabar-helper. - Now supports bundle2 for both fetch/clone and push (https://www.mercurial-scm.org/wiki/BundleFormat2). - Now Supports `git credential` for HTTP authentication. - Removed upgrade path from repositories used with version < 0.3.0. - Experimental (and partial) support for using git-cinnabar without having mercurial installed. - Use a mercurial subprocess to access local mercurial repositories. - Cinnabar-helper now handles fast-import, with workarounds for performance issues on macOS. Mike -- 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 v14 00/21] index-helper/watchman
Hi Dave, On Sun, 3 Jul 2016, Johannes Schindelin wrote: > On Sun, 3 Jul 2016, David Turner wrote: > > > This addresses comments on v13: > > removed unnecessary no_mmap ifdef > > add an ifdef in unix-socket > > OS X fix for select() > > test improvement > > Thanks. > > Would you mind re-sending 20 & 21, they seem to have gotten lost. Or is > there a public repository where I can simply fetch the branch? (I am not > really a fan of applying patches from my mailbox...) The patches arrived, thanks. For interested parties: I rebased the patches (adjusting for t/helper) and pushed the result to refs/tags/index-helper-v14-rebased at https://github.com/dscho/git. Thanks, Dscho -- 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 v14 21/21] mailmap: use main email address for dturner
Signed-off-by: David Turner--- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index e5b4126..edcae89 100644 --- a/.mailmap +++ b/.mailmap @@ -46,6 +46,7 @@ David D. Kilzer David Kågedal David Reiss David S. Miller +David Turner Deskin Miller Dirk Süsserott Eric Blake -- 1.9.1 -- 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 v14 20/21] index-helper: indexhelper.exitAfter config
From: David TurnerAdd a configuration variable, indexhelper.exitAfter, which provides a default time to keep the index-helper alive. This is useful with indexhelper.autorun; some users will want to keep the automatically-run index-helper alive across their lunch break and will thus set indexhelper.exitAfter to a high value. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- Documentation/config.txt | 4 index-helper.c | 2 ++ t/t7900-index-helper.sh | 8 3 files changed, 14 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 385ea66..a6330b1 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1860,6 +1860,10 @@ indexhelper.autorun:: Automatically run git index-helper when any builtin git command is run inside a repository. +indexhelper.exitAfter:: + When no exit-after argument is given, git index-helper defaults + to this number of seconds. Specify 0 to wait forever. Default is 600. + init.templateDir:: Specify the directory from which templates will be copied. (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) diff --git a/index-helper.c b/index-helper.c index af35485..7e62425 100644 --- a/index-helper.c +++ b/index-helper.c @@ -399,6 +399,8 @@ int main(int argc, char **argv) git_extract_argv0_path(argv[0]); git_setup_gettext(); + git_config_get_int("indexhelper.exitafter", _in_seconds); + if (argc == 2 && !strcmp(argv[1], "-h")) usage_with_options(usage_text, options); diff --git a/t/t7900-index-helper.sh b/t/t7900-index-helper.sh index 15ba612..12b5bf7 100755 --- a/t/t7900-index-helper.sh +++ b/t/t7900-index-helper.sh @@ -68,4 +68,12 @@ test_expect_success 'index-helper autorun works' ' test_path_is_missing .git/index-helper.sock ' +test_expect_success 'indexhelper.exitafter config works' ' + test_when_finished "git index-helper --kill" && + test_config indexhelper.exitafter 1 && + git index-helper --detach && + sleep 3 && + test_path_is_missing .git/index-helper.sock +' + test_done -- 1.9.1 -- 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