Re: Failing svn imports from apache.org
> > Does anyone have an idea, what might be wrong here / how to fix it > > ? > > Here: git svn --version > git-svn version 1.7.12.592.g41e7905 (svn 1.6.18) > > What's yours? 1.7.9.5 (ubuntu precise) > I'm getting > > Initialized empty Git repository in /tmp/discovery/.git/ > Using higher level of URL: > http://svn.apache.org/repos/asf/commons/proper/discovery => > http://svn.apache.org/repos/asf > W: Ignoring error from SVN, path probably does not exist: (160013): > Dateisystem hat keinen Eintrag: File not found: revision 100, path > '/commons/proper/discovery' > W: Do not be alarmed at the above message git-svn is just searching > aggressively for old history. > This may take a while on large repositories > > and then it checks the revisions. I didn't want to wait for > r1301705... > > Does your git svn abort earlier or after checking all revs? It also scanned through thousands of revisions and then failed: W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories mkdir .git: No such file or directory at /usr/lib/git-core/git-svn line 3669 cu -- Mit freundlichen Grüßen / Kind regards Enrico Weigelt VNC - Virtual Network Consult GmbH Head Of Development Pariser Platz 4a, D-10117 Berlin Tel.: +49 (30) 3464615-20 Fax: +49 (30) 3464615-59 enrico.weig...@vnc.biz; www.vnc.de -- 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: What's cooking in git.git (Sep 2012, #05; Fri, 14)
Junio C Hamano wrote: I think we can start thinking about feature freeze once the topics in 'next' that are scheduled to graduate to 'master' already are fully cooked. For any late-coming topic, there always is the next cycle ;-) I've not hear anything about my poll patches and I'd really like them to into 1.8.x. If and when they did, there's another small patch to fully support HP NonStop (some adjustment to git-compat-util.h with #ifdef __TANDEM and a NonStop section in Makefile, so nothing that should have any bad impact on others), which I too would like to get in 1.8.x Bye, Jojo -- 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] git-gui: Fix semi-working shortcuts for unstage and revert
On Sat, Sep 15, 2012 at 1:36 AM, wrote: > From: Vitaly _Vi Shukela > > Make Ctrl+U for unstaging and Ctrl+J for reverting selection behave > more like Ctrl+T for adding. > > They were working only when one area was focused (diff or commit message), > now they should work everywhere. > > Signed-off-by: Vitaly _Vi Shukela > --- > Sending the patch the third time (haven't got any replies to previous two > attempts). For what its worth: Acked-by: Bert Wesarg But unless Pat reacts this is useless. Bert > > git-gui/git-gui.sh |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh > index ba4e5c1..6618016 100755 > --- a/git-gui/git-gui.sh > +++ b/git-gui/git-gui.sh > @@ -3710,6 +3710,8 @@ bind $ui_diff <$M1B-Key-v> {break} > bind $ui_diff <$M1B-Key-V> {break} > bind $ui_diff <$M1B-Key-a> {%W tag add sel 0.0 end;break} > bind $ui_diff <$M1B-Key-A> {%W tag add sel 0.0 end;break} > +bind $ui_diff <$M1B-Key-j> {do_revert_selection;break} > +bind $ui_diff <$M1B-Key-J> {do_revert_selection;break} > bind $ui_diff {catch {%W yview scroll -1 units};break} > bind $ui_diff{catch {%W yview scroll 1 units};break} > bind $ui_diff{catch {%W xview scroll -1 units};break} > @@ -3742,6 +3744,8 @@ bind . <$M1B-Key-s> do_signoff > bind . <$M1B-Key-S> do_signoff > bind . <$M1B-Key-t> do_add_selection > bind . <$M1B-Key-T> do_add_selection > +bind . <$M1B-Key-u> do_unstage_selection > +bind . <$M1B-Key-U> do_unstage_selection > bind . <$M1B-Key-j> do_revert_selection > bind . <$M1B-Key-J> do_revert_selection > bind . <$M1B-Key-i> do_add_all > -- > 1.7.8.5 > -- 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 0/5] Support matching "**" in .gitattributes and .gitignore
A while back I posted a proof of concept using wildmatch() from rsync. Back then the obstacle was case-insensitive matching support. I did not realize that there was iwildmatch() that does exactly that. So here again a series that is probably ready for consumption. Now patterns that contain slashes will always go through (i)wildmatch(). fnmatch() is only used for basename matching. Nguyễn Thái Ngọc Duy (5): Import wildmatch from rsync compat/wildmatch: remove static variable force_lower_case compat/wildmatch: fix case-insensitive matching Integrate wildmatch to git Support "**" in .gitignore and .gitattributes patterns using wildmatch() Documentation/gitignore.txt| 3 + Makefile | 6 + attr.c | 4 +- compat/wildmatch.c | 373 + compat/wildmatch.h | 6 + dir.c | 5 +- t/t3070-wildmatch.sh | 27 +++ t/t3070-wildmatch/wildtest.txt | 165 ++ test-wildmatch.c | 228 + 9 files changed, 815 insertions(+), 2 deletions(-) create mode 100644 compat/wildmatch.c create mode 100644 compat/wildmatch.h create mode 100755 t/t3070-wildmatch.sh create mode 100644 t/t3070-wildmatch/wildtest.txt create mode 100644 test-wildmatch.c -- 1.7.12.403.gce5cf6f.dirty -- 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/5] Import wildmatch from rsync
These files are from rsync.git commit d51a3adb4fca3e6b1b046c6e570828f3bca8fe36. The commit is GPL-3. However wildmatch.[ch] have not changed since rsync turned to GPL-3. rsync.git -> git.git lib/wildmatch.[ch] compat/wildmatch.[ch] wildtest.c test-wildmatch.c wildtest.txtt/t3070-wildmatch/wildtest.txt Signed-off-by: Nguyễn Thái Ngọc Duy --- compat/wildmatch.c | 368 + compat/wildmatch.h | 6 + t/t3070-wildmatch/wildtest.txt | 165 ++ test-wildmatch.c | 222 + 4 files changed, 761 insertions(+) create mode 100644 compat/wildmatch.c create mode 100644 compat/wildmatch.h create mode 100644 t/t3070-wildmatch/wildtest.txt create mode 100644 test-wildmatch.c diff --git a/compat/wildmatch.c b/compat/wildmatch.c new file mode 100644 index 000..f3a1731 --- /dev/null +++ b/compat/wildmatch.c @@ -0,0 +1,368 @@ +/* +** Do shell-style pattern matching for ?, \, [], and * characters. +** It is 8bit clean. +** +** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. +** Rich $alz is now . +** +** Modified by Wayne Davison to special-case '/' matching, to make '**' +** work differently than '*', and to fix the character-class code. +*/ + +#include "rsync.h" + +/* What character marks an inverted character class? */ +#define NEGATE_CLASS '!' +#define NEGATE_CLASS2 '^' + +#define FALSE 0 +#define TRUE 1 +#define ABORT_ALL -1 +#define ABORT_TO_STARSTAR -2 + +#define CC_EQ(class, len, litmatch) ((len) == sizeof (litmatch)-1 \ + && *(class) == *(litmatch) \ + && strncmp((char*)class, litmatch, len) == 0) + +#if defined STDC_HEADERS || !defined isascii +# define ISASCII(c) 1 +#else +# define ISASCII(c) isascii(c) +#endif + +#ifdef isblank +# define ISBLANK(c) (ISASCII(c) && isblank(c)) +#else +# define ISBLANK(c) ((c) == ' ' || (c) == '\t') +#endif + +#ifdef isgraph +# define ISGRAPH(c) (ISASCII(c) && isgraph(c)) +#else +# define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c)) +#endif + +#define ISPRINT(c) (ISASCII(c) && isprint(c)) +#define ISDIGIT(c) (ISASCII(c) && isdigit(c)) +#define ISALNUM(c) (ISASCII(c) && isalnum(c)) +#define ISALPHA(c) (ISASCII(c) && isalpha(c)) +#define ISCNTRL(c) (ISASCII(c) && iscntrl(c)) +#define ISLOWER(c) (ISASCII(c) && islower(c)) +#define ISPUNCT(c) (ISASCII(c) && ispunct(c)) +#define ISSPACE(c) (ISASCII(c) && isspace(c)) +#define ISUPPER(c) (ISASCII(c) && isupper(c)) +#define ISXDIGIT(c) (ISASCII(c) && isxdigit(c)) + +#ifdef WILD_TEST_ITERATIONS +int wildmatch_iteration_count; +#endif + +static int force_lower_case = 0; + +/* Match pattern "p" against the a virtually-joined string consisting + * of "text" and any strings in array "a". */ +static int dowild(const uchar *p, const uchar *text, const uchar*const *a) +{ +uchar p_ch; + +#ifdef WILD_TEST_ITERATIONS +wildmatch_iteration_count++; +#endif + +for ( ; (p_ch = *p) != '\0'; text++, p++) { + int matched, special; + uchar t_ch, prev_ch; + while ((t_ch = *text) == '\0') { + if (*a == NULL) { + if (p_ch != '*') + return ABORT_ALL; + break; + } + text = *a++; + } + if (force_lower_case && ISUPPER(t_ch)) + t_ch = tolower(t_ch); + switch (p_ch) { + case '\\': + /* Literal match with following character. Note that the test +* in "default" handles the p[1] == '\0' failure case. */ + p_ch = *++p; + /* FALLTHROUGH */ + default: + if (t_ch != p_ch) + return FALSE; + continue; + case '?': + /* Match anything but '/'. */ + if (t_ch == '/') + return FALSE; + continue; + case '*': + if (*++p == '*') { + while (*++p == '*') {} + special = TRUE; + } else + special = FALSE; + if (*p == '\0') { + /* Trailing "**" matches everything. Trailing "*" matches +* only if there are no more slash characters. */ + if (!special) { + do { + if (strchr((char*)text, '/') != NULL) + return FALSE; + } while ((text = *a++) != NULL); + } + return TRUE; + } + while (1) { + if (t_ch == '\0') { + if ((text = *a++) == NULL) + break; + t_ch = *text; + continue; + } + if ((matched = dowild(p, text, a)) != FALSE) { + if (!special || matched != ABORT_TO_STARSTAR) + return matched; + } else if (!special && t_ch == '/') +
[PATCH 2/5] compat/wildmatch: remove static variable force_lower_case
One place less to worry about thread safety Signed-off-by: Nguyễn Thái Ngọc Duy --- compat/wildmatch.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/compat/wildmatch.c b/compat/wildmatch.c index f3a1731..e824eb2 100644 --- a/compat/wildmatch.c +++ b/compat/wildmatch.c @@ -57,11 +57,10 @@ int wildmatch_iteration_count; #endif -static int force_lower_case = 0; - /* Match pattern "p" against the a virtually-joined string consisting * of "text" and any strings in array "a". */ -static int dowild(const uchar *p, const uchar *text, const uchar*const *a) +static int dowild(const uchar *p, const uchar *text, + const uchar*const *a, int force_lower_case) { uchar p_ch; @@ -121,7 +120,7 @@ static int dowild(const uchar *p, const uchar *text, const uchar*const *a) t_ch = *text; continue; } - if ((matched = dowild(p, text, a)) != FALSE) { + if ((matched = dowild(p, text, a, force_lower_case)) != FALSE) { if (!special || matched != ABORT_TO_STARSTAR) return matched; } else if (!special && t_ch == '/') @@ -291,7 +290,7 @@ int wildmatch(const char *pattern, const char *text) #ifdef WILD_TEST_ITERATIONS wildmatch_iteration_count = 0; #endif -return dowild((const uchar*)pattern, (const uchar*)text, nomore) == TRUE; +return dowild((const uchar*)pattern, (const uchar*)text, nomore, 0) == TRUE; } /* Match the "pattern" against the forced-to-lower-case "text" string. */ @@ -302,9 +301,7 @@ int iwildmatch(const char *pattern, const char *text) #ifdef WILD_TEST_ITERATIONS wildmatch_iteration_count = 0; #endif -force_lower_case = 1; -ret = dowild((const uchar*)pattern, (const uchar*)text, nomore) == TRUE; -force_lower_case = 0; +ret = dowild((const uchar*)pattern, (const uchar*)text, nomore, 1) == TRUE; return ret; } @@ -331,7 +328,7 @@ int wildmatch_array(const char *pattern, const char*const *texts, int where) if (!text) return FALSE; -if ((matched = dowild(p, text, a)) != TRUE && where < 0 +if ((matched = dowild(p, text, a, 0)) != TRUE && where < 0 && matched != ABORT_ALL) { while (1) { if (*text == '\0') { @@ -339,7 +336,7 @@ int wildmatch_array(const char *pattern, const char*const *texts, int where) return FALSE; continue; } - if (*text++ == '/' && (matched = dowild(p, text, a)) != FALSE + if (*text++ == '/' && (matched = dowild(p, text, a, 0)) != FALSE && matched != ABORT_TO_STARSTAR) break; } -- 1.7.12.403.gce5cf6f.dirty -- 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/5] compat/wildmatch: fix case-insensitive matching
dowild() does case insensitive matching by lower-casing the text. That means lower case letters in patterns imply case-insensitive matching, but upper case means exact matching. We do not want that subtlety. Lower case pattern too so iwildmatch() always does what we expect it to do. Signed-off-by: Nguyễn Thái Ngọc Duy --- compat/wildmatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/wildmatch.c b/compat/wildmatch.c index e824eb2..c7f7f9f 100644 --- a/compat/wildmatch.c +++ b/compat/wildmatch.c @@ -81,6 +81,8 @@ static int dowild(const uchar *p, const uchar *text, } if (force_lower_case && ISUPPER(t_ch)) t_ch = tolower(t_ch); + if (force_lower_case && ISUPPER(p_ch)) + p_ch = tolower(p_ch); switch (p_ch) { case '\\': /* Literal match with following character. Note that the test -- 1.7.12.403.gce5cf6f.dirty -- 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/5] Integrate wildmatch to git
This makes wildmatch.c part of libgit.a and builds test-wildmatch Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 6 ++ compat/wildmatch.c | 8 +++- t/t3070-wildmatch.sh | 27 +++ test-wildmatch.c | 8 +++- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 t/t3070-wildmatch.sh diff --git a/Makefile b/Makefile index 56301dc..c3608e6 100644 --- a/Makefile +++ b/Makefile @@ -511,6 +511,7 @@ TEST_PROGRAMS_NEED_X += test-sha1 TEST_PROGRAMS_NEED_X += test-sigchain TEST_PROGRAMS_NEED_X += test-subprocess TEST_PROGRAMS_NEED_X += test-svn-fe +TEST_PROGRAMS_NEED_X += test-wildmatch TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) @@ -605,6 +606,7 @@ LIB_H += compat/mingw.h LIB_H += compat/obstack.h LIB_H += compat/precompose_utf8.h LIB_H += compat/terminal.h +LIB_H += compat/wildmatch.h LIB_H += compat/win32/dirent.h LIB_H += compat/win32/poll.h LIB_H += compat/win32/pthread.h @@ -709,6 +711,7 @@ LIB_OBJS += combine-diff.o LIB_OBJS += commit.o LIB_OBJS += compat/obstack.o LIB_OBJS += compat/terminal.o +LIB_OBJS += compat/wildmatch.o LIB_OBJS += config.o LIB_OBJS += connect.o LIB_OBJS += connected.o @@ -2586,6 +2589,9 @@ test-svn-fe$X: vcs-svn/lib.a test-%$X: test-%.o GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS) +test-wildmatch$X: test-wildmatch.o GIT-LDFLAGS + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) -lpopt + check-sha1:: test-sha1$X ./test-sha1.sh diff --git a/compat/wildmatch.c b/compat/wildmatch.c index c7f7f9f..625cb0c 100644 --- a/compat/wildmatch.c +++ b/compat/wildmatch.c @@ -9,7 +9,13 @@ ** work differently than '*', and to fix the character-class code. */ -#include "rsync.h" +#include +#include +#include + +#include "wildmatch.h" + +typedef unsigned char uchar; /* What character marks an inverted character class? */ #define NEGATE_CLASS '!' diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh new file mode 100755 index 000..7fb63ff --- /dev/null +++ b/t/t3070-wildmatch.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +test_description='wildmatch tests' + +. ./test-lib.sh + +test_wildmatch() { +test_expect_success "wildmatch $*" " + test-wildmatch $* ../t3070-wildmatch/wildtest.txt >actual && + echo 'No wildmatch errors found.' >expected && + test_cmp expected actual +" +} + +test_wildmatch -x1 +test_wildmatch -x1 -e1 +test_wildmatch -x1 -else +test_wildmatch -x2 +test_wildmatch -x2 -ese +test_wildmatch -x3 +test_wildmatch -x3 -e1 +test_wildmatch -x4 +test_wildmatch -x4 -e2e +test_wildmatch -x5 +test_wildmatch -x5 -es + +test_done diff --git a/test-wildmatch.c b/test-wildmatch.c index 88585c2..2c506a0 100644 --- a/test-wildmatch.c +++ b/test-wildmatch.c @@ -20,7 +20,13 @@ /*#define COMPARE_WITH_FNMATCH*/ #define WILD_TEST_ITERATIONS -#include "lib/wildmatch.c" +#include "compat/wildmatch.c" + +#define MAXPATHLEN 1024 +#ifdef NO_STRLCPY +#include "compat/strlcpy.c" +#define strlcpy gitstrlcpy +#endif #include -- 1.7.12.403.gce5cf6f.dirty -- 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 5/5] Support "**" in .gitignore and .gitattributes patterns using wildmatch()
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/gitignore.txt | 3 +++ attr.c | 4 +++- dir.c | 5 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index c1f692a..eb81d31 100644 --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@ -93,6 +93,9 @@ PATTERN FORMAT For example, "Documentation/{asterisk}.html" matches "Documentation/git.html" but not "Documentation/ppc/ppc.html" or "tools/perf/Documentation/perf.html". ++ +Contrary to fnmatch(3), git matches "**" to anything including +slashes, similar to rsync(1). - A leading slash matches the beginning of the pathname. For example, "/{asterisk}.c" matches "cat-file.c" but not diff --git a/attr.c b/attr.c index 3430faf..f06ad95 100644 --- a/attr.c +++ b/attr.c @@ -12,6 +12,7 @@ #include "exec_cmd.h" #include "attr.h" #include "dir.h" +#include "compat/wildmatch.h" const char git_attr__true[] = "(builtin)true"; const char git_attr__false[] = "\0(builtin)false"; @@ -666,7 +667,8 @@ static int path_matches(const char *pathname, int pathlen, return 0; if (baselen != 0) baselen++; - return fnmatch_icase(pattern, pathname + baselen, FNM_PATHNAME) == 0; + return (ignore_case && iwildmatch(pattern, pathname + baselen)) || + (!ignore_case && wildmatch(pattern, pathname + baselen)); } static int macroexpand_one(int attr_nr, int rem); diff --git a/dir.c b/dir.c index 4868339..c17f9ff 100644 --- a/dir.c +++ b/dir.c @@ -8,6 +8,7 @@ #include "cache.h" #include "dir.h" #include "refs.h" +#include "compat/wildmatch.h" struct path_simplify { int len; @@ -575,7 +576,9 @@ int excluded_from_list(const char *pathname, namelen -= prefix; } - if (!namelen || !fnmatch_icase(exclude, name, FNM_PATHNAME)) + if (!namelen || + ((ignore_case && iwildmatch(exclude, name)) || +(!ignore_case && wildmatch(exclude, name return to_exclude; } return -1; /* undecided */ -- 1.7.12.403.gce5cf6f.dirty -- 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
Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
Hi, Earlier this month I asked how best to handle two branches without a common ancestor to sync changes from one branch to another. Initially I did this via the grafts mechanism, but this wasn't a "shared" solution, in that the graft was local to my checkout of the repository and no one else's. I read on StackOverflow that git-replace can be used instead. Having read this: http://stackoverflow.com/questions/3810348/setting-git-parent-pointer-to-a-different-parent I followed the instructions to use git-replace. Have successfully done that, I was then able to merge the two branches which didn't have a common ancestor and have the correct commits on the branch I was hoping for. AFAIAC, this worked fine. But now I have some questions: 1. I thought the replace data in .git/refs/replace was published when I did "git push" so that others could use this information as a base-point, yet it seems not to be the case. How do I publish this? 2. If I do publish it, are there any caveats with that? i.e., because the replace data will likely point to a repo which in my working checkout I added with "git-remote", is that going to be a problem? I assume I can instruct people who care, to "git remote add foo " and then treat master and foo/master as intended? i.e., foo/master will see commits on it over time which "master" won't have, so "git checkout master && git merge foo/master" can always happen? 3. If it is possible to publish this replace data, is there anything which needs to happen in .git/config either on the bare repo or local checkouts? What I'm aiming for now, in publishing this merge, is that if I can publish the replace data, that people besides me, can clone the repo, and the remote repo in place, and merge the branches as outlined in question 2. What I also am unsure of is whether or not I have to keep updating the replace refs each time I merge the branch? TIA! David -- 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
How do I pronounce "blob"?
"bee-lob" or "bla:b"? I guess "bee-lob" is correct if it means binary large object. But I'm not sure because gitglossary does not tell me about that. -- 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: How do I pronounce "blob"?
On Saturday 2012-09-15 15:24, Yi, EungJun wrote: >"bee-lob" or "bla:b"? http://en.wiktionary.org/wiki/blob BLOB as a Binary Large OBject reeks of a retronym. >I guess "bee-lob" is correct if it means binary large object. But I'm >not sure because gitglossary does not tell me about that. -- 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
How to create the " [PATCH 0/5]" first email?
The git format-patch allows numbered patches to be created, however I'm not sure how folk generate the initial "0/n" patch. Which of the various options should I be using? Also, being on windows, the various 'mbox' and 'MUA' discussions are new to me, so the format-patch step where :- "Typically it will be placed in a MUA’s drafts folder, edited to add timely commentary that should not go in the changelog after the three dashes, and then sent as a message whose body, in our example, starts with "arch/arm config files were…". On the receiving end, readers can save interesting patches in a UNIX mailbox and apply them with git-am(1)." hides a multitude of implicit knowledge steps. Is there an extended description of what that would mean from a platform independent viewpoint? e.g. if the patches are separte files and an mbox is one consolidated file, how to get from one to the other so that 'it' can be sent by 'git send-mail'. I'm also missing an understanding of the preparation stage where one tries to tidy up the various commit messages becaue they weren't explicit, specfic nor concise enough, so I suspect that there is an implicit `git format-patch` <-> `git am` loop of sharpening the mbox patches before submission to the list that I'm missing. Has this described somewhere? Philip Oakley -- 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: How do I pronounce "blob"?
Thanks for your help, Jan! On Sat, Sep 15, 2012 at 10:26 PM, Jan Engelhardt wrote: > On Saturday 2012-09-15 15:24, Yi, EungJun wrote: > >>"bee-lob" or "bla:b"? > > http://en.wiktionary.org/wiki/blob > > BLOB as a Binary Large OBject reeks of a retronym. > >>I guess "bee-lob" is correct if it means binary large object. But I'm >>not sure because gitglossary does not tell me about that. -- 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: What's cooking in git.git (Sep 2012, #05; Fri, 14)
"Joachim Schmitz" writes: > Junio C Hamano wrote: >> I think we can start thinking about feature freeze once the topics >> in 'next' that are scheduled to graduate to 'master' already are >> fully cooked. For any late-coming topic, there always is the next >> cycle ;-) > > I've not hear anything about my poll patches and I'd really like them > to into 1.8.x. I've seen some patches on "poll" posted, were discussed and had threads titled "Re: [PATCH] ...". But I didn't see a rerolled "[PATCH v2 n/m] ..." series that states that it is a rerolled "hopefully final version" that addresses all the points that were brought up during the discussion that need to be addressed. I do not necessarily follow all the minute details of all discussion threads. For this particular series, I not know which ones of your "poll patches" turned out to be unneeded, which ones turned out to be fine as posted originally and which ones needed updating. -- 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: How to create the " [PATCH 0/5]" first email?
"Philip Oakley" writes: > "Typically it will be placed in a MUA’s drafts folder, edited to add > timely commentary that should not go in the changelog after the three > dashes, and then sent as a message whose body, in our example, starts > with "arch/arm config files were…". On the receiving end, readers can > save interesting patches in a UNIX mailbox and apply them with > git-am(1)." > > hides a multitude of implicit knowledge steps. Is there an extended > description of what that would mean from a platform independent > viewpoint? e.g. if the patches are separte files and an mbox is one > consolidated file, how to get from one to the other so that 'it' can be > sent by 'git send-mail'. If you plan to use "git send-email" to send the final results out, you should consider "git send-email" as your "MUA" in the quoted paragraph. And that will be very platform independent viewpoint to see things from. "git format-patch -o my-series/ --cover-letter ..." would treat "my-series/" directory as "MUA's drafts folder" and prepares the messages you would want to send out, and you can proof-read and edit the files in there before telling your "MUA" to send them out, with "git send-email ... my-series/*.patch" or something. > I'm also missing an understanding of the preparation stage where one > tries to tidy up the various commit messages becaue they weren't > explicit, specfic nor concise enough,... Many people usually do "rebase -i" until perfection and then a single final invocation of "format-patch". Of course, the "final" can and should further be proof-read and it is fine to do typofixes in the format-patch output files without going back to the commits before sending them out. > ...so I suspect that there is an > implicit `git format-patch` <-> `git am` loop of sharpening the mbox > patches before submission to the list that I'm missing. Has this > described somewhere? -- 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: What's cooking in git.git (Sep 2012, #05; Fri, 14)
> From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Saturday, September 15, 2012 7:01 PM > To: Joachim Schmitz > Cc: git@vger.kernel.org > Subject: Re: What's cooking in git.git (Sep 2012, #05; Fri, 14) > > "Joachim Schmitz" writes: > > > Junio C Hamano wrote: > >> I think we can start thinking about feature freeze once the topics > >> in 'next' that are scheduled to graduate to 'master' already are > >> fully cooked. For any late-coming topic, there always is the next > >> cycle ;-) > > > > I've not hear anything about my poll patches and I'd really like them > > to into 1.8.x. > > I've seen some patches on "poll" posted, were discussed and had > threads titled "Re: [PATCH] ...". But I didn't see a rerolled > "[PATCH v2 n/m] ..." series that states that it is a rerolled > "hopefully final version" that addresses all the points that were > brought up during the discussion that need to be addressed. > > I do not necessarily follow all the minute details of all discussion > threads. For this particular series, I not know which ones of your > "poll patches" turned out to be unneeded, which ones turned out to > be fine as posted originally and which ones needed updating. There were several iterations up to [PATCH v4 n/4] and only one foreign comment to it (and to some commented code) and one self-comment about the order of patches, but none about technical correctness, none that I remember at least. I can post a v5 series which will - move compat/win32/poll.[ch] to compat/poll/ and adjust Makefile - #ifdef some WIN32 specific #include (should this be done in one step with the above?) - fix the 2 bugs in poll.c just like they got fixed in gnulib's version (would you want this in one or two steps?) Bye, Jojo -- 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: How do I pronounce "blob"?
On Sat, Sep 15, 2012 at 9:24 AM, Yi, EungJun wrote: > "bee-lob" or "bla:b"? Like Bob, add an L in there. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff -- 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: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
David Chanters writes: > 1. I thought the replace data in .git/refs/replace was published when > I did "git push" so that others could use this information as a > base-point, yet it seems not to be the case. How do I publish this? If you don't tell it what to push, the command will just update the branches. You can tell "git push" what you want to push explicitly, e.g. $ git replace -l ;# to learn what replacement I want to send 77d5ba8477eb90509e79dbcf63814a3dfdefb906 $ git push origin refs/replace/77d5ba8477eb90509e79dbcf63814a3dfdefb906 > 2. If I do publish it, are there any caveats with that? i.e., > because the replace data will likely point to a repo which in my > working checkout I added with "git-remote", is that going to be a > problem? That is between you and other project participants. They may not want to see replacement in their project in the first place. Assuming that they do, pushing the replacement ref makes the replacing object available in the pushed-into repository, so they will *not* rely on your repository. -- 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] test-generation.c: Fix a compiler warning
gcc complains as follows: CC test-generation.o test-generation.c: In function `main': test-generation.c:105: warning: control reaches end of \ non-void function In order to suppress the warning, we simply add a suitable return statement to main(). Signed-off-by: Ramsay Jones --- Hi Junio, Could you please squash this into commit 1784d096 ("test-generation: compute generation numbers and clock skews", 04-09-2012). Thanks! ATB, Ramsay Jones test-generation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test-generation.c b/test-generation.c index 4df5a0d..de87f2b 100644 --- a/test-generation.c +++ b/test-generation.c @@ -102,4 +102,5 @@ int main(int ac, const char **av) show_commit(commit, gd); } + return 0; } -- 1.7.12 -- 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] test-string-list.c: Fix some sparse warnings
In particular, sparse complains as follows: SP test-string-list.c test-string-list.c:10:6: warning: symbol 'parse_string_list' was not \ declared. Should it be static? test-string-list.c:18:6: warning: symbol 'write_list' was not \ declared. Should it be static? test-string-list.c:25:6: warning: symbol 'write_list_compact' was not \ declared. Should it be static? test-string-list.c:38:5: warning: symbol 'prefix_cb' was not \ declared. Should it be static? In order to suppress the warnings, since the above symbols do not need more than file scope, we simply include the static modifier in their declaration. Signed-off-by: Ramsay Jones --- Hi Michael, If you need to re-roll your 'mh/string-list' branch, could you please squash the relevent parts of this patch into those commits. Thanks! ATB, Ramsay Jones test-string-list.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-string-list.c b/test-string-list.c index 5e9631f..4693295 100644 --- a/test-string-list.c +++ b/test-string-list.c @@ -7,7 +7,7 @@ * list (as opposed to "", which indicates a string list containing a * single empty string). list->strdup_strings must be set. */ -void parse_string_list(struct string_list *list, const char *arg) +static void parse_string_list(struct string_list *list, const char *arg) { if (!strcmp(arg, "-")) return; @@ -15,14 +15,14 @@ void parse_string_list(struct string_list *list, const char *arg) (void)string_list_split(list, arg, ':', -1); } -void write_list(const struct string_list *list) +static void write_list(const struct string_list *list) { int i; for (i = 0; i < list->nr; i++) printf("[%d]: \"%s\"\n", i, list->items[i].string); } -void write_list_compact(const struct string_list *list) +static void write_list_compact(const struct string_list *list) { int i; if (!list->nr) @@ -35,7 +35,7 @@ void write_list_compact(const struct string_list *list) } } -int prefix_cb(struct string_list_item *item, void *cb_data) +static int prefix_cb(struct string_list_item *item, void *cb_data) { const char *prefix = (const char *)cb_data; return !prefixcmp(item->string, prefix); -- 1.7.12 -- 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] test-string-list.c: Fix some sparse warnings
Queued. 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
[PATCH 0/3] rebase -i: Teach "--edit-todo"
The flag will allow the user to edit the todo file while they're in the middle of an interactive rebase. It simply invoke the editor and do nothing else. More discussions here: http://thread.gmane.org/gmane.comp.version-control.git/205133/focus=205182 Andrew Wong (3): rebase -i: Refactor help messages for todo file rebase -i: Teach "--edit-todo" action rebase -i: Add tests for "--edit-todo" Documentation/git-rebase.txt | 5 - git-rebase--interactive.sh| 47 +-- git-rebase.sh | 14 + t/t3404-rebase-interactive.sh | 16 +++ 4 files changed, 70 insertions(+), 12 deletions(-) -- 1.7.12.318.g08bf5ad.dirty -- 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/3] rebase -i: Refactor help messages for todo file
Signed-off-by: Andrew Wong --- git-rebase--interactive.sh | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index a09e842..4d57e50 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -115,6 +115,23 @@ mark_action_done () { fi } +append_todo_help () { + cat >> "$todo" << EOF +# +# Commands: +# p, pick = use commit +# r, reword = use commit, but edit the commit message +# e, edit = use commit, but stop for amending +# s, squash = use commit, but meld into previous commit +# f, fixup = like "squash", but discard this commit's log message +# x, exec = run command (the rest of the line) using shell +# +# These lines can be re-ordered; they are executed from top to bottom. +# +# If you remove a line here THAT COMMIT WILL BE LOST. +EOF +} + make_patch () { sha1_and_parents="$(git rev-list --parents -1 "$1")" case "$sha1_and_parents" in @@ -901,18 +918,10 @@ test -n "$cmd" && add_exec_commands "$todo" cat >> "$todo" << EOF # Rebase $shortrevisions onto $shortonto +EOF +append_todo_help +cat >> "$todo" << EOF # -# Commands: -# p, pick = use commit -# r, reword = use commit, but edit the commit message -# e, edit = use commit, but stop for amending -# s, squash = use commit, but meld into previous commit -# f, fixup = like "squash", but discard this commit's log message -# x, exec = run command (the rest of the line) using shell -# -# These lines can be re-ordered; they are executed from top to bottom. -# -# If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # EOF -- 1.7.12.318.g08bf5ad.dirty -- 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/3] rebase -i: Teach "--edit-todo" action
This allows users to edit the todo file while they're stopped in the middle of an interactive rebase. When this action is executed, all comments from the original todo file are stripped, and new help messages are appended to the end. Signed-off-by: Andrew Wong --- Documentation/git-rebase.txt | 5 - git-rebase--interactive.sh | 16 git-rebase.sh| 14 ++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index fd535b0..da067ec 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -12,7 +12,7 @@ SYNOPSIS [] [] 'git rebase' [-i | --interactive] [options] [--exec ] [--onto ] --root [] -'git rebase' --continue | --skip | --abort +'git rebase' --continue | --skip | --abort | --edit-todo DESCRIPTION --- @@ -245,6 +245,9 @@ leave out at most one of A and B, in which case it defaults to HEAD. --skip:: Restart the rebasing process by skipping the current patch. +--edit-todo:: + Edit the todo list during an interactive rebase. + -m:: --merge:: Use merging strategies to rebase. When the recursive (default) merge diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 4d57e50..ca55fac 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -792,6 +792,22 @@ skip) do_rest ;; +edit-todo) + sed -i '/^#/d' "$todo" + append_todo_help + cat >> "$todo" << EOF +# +# You are editing the todo file of an ongoing interactive rebase. +# To continue rebase after editing, run: +# git rebase --continue +# +EOF + + git_sequence_editor "$todo" || + die_abort "Could not execute editor" + + exit + ;; esac git var GIT_COMMITTER_IDENT >/dev/null || diff --git a/git-rebase.sh b/git-rebase.sh index 15da926..e660203 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -38,6 +38,7 @@ C=!passed to 'git apply' continue! continue abort! abort and check out the original branch skip! skip current patch and continue +edit-todo! edit the todo list during an interactive rebase " . git-sh-setup . git-sh-i18n @@ -194,6 +195,10 @@ do test $total_argc -eq 2 || usage action=${1##--} ;; + --edit-todo) + test $total_argc -eq 2 || usage + action=${1##--} + ;; --onto) test 2 -le "$#" || usage onto="$2" @@ -306,6 +311,12 @@ then fi fi +if test "$action" = "edit-todo" && + test "$type" != "interactive" +then + die "$(gettext "The --edit-todo action can only be used during interactive rebase.")" +fi + case "$action" in continue) # Sanity check @@ -338,6 +349,9 @@ abort) rm -r "$state_dir" exit ;; +edit-todo) + run_specific_rebase + ;; esac # Make sure no rebase is in progress -- 1.7.12.318.g08bf5ad.dirty -- 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/3] rebase -i: Add tests for "--edit-todo"
Signed-off-by: Andrew Wong --- t/t3404-rebase-interactive.sh | 16 1 file changed, 16 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 7304b66..a194c97 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -911,4 +911,20 @@ test_expect_success 'rebase -i --root fixup root commit' ' test 0 = $(git cat-file commit HEAD | grep -c ^parent\ ) ' +test_expect_success 'rebase --edit-todo does not works on non-interactive rebase' ' + git checkout conflict-branch && + test_must_fail git rebase --onto HEAD~2 HEAD~ && + test_must_fail git rebase --edit-todo && + git rebase --abort +' + +test_expect_success 'rebase --edit-todo can be used to modify todo' ' + git checkout no-conflict-branch^0 && + FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 && + FAKE_LINES="2 1" git rebase --edit-todo && + git rebase --continue + test M = $(git cat-file commit HEAD^ | sed -ne \$p) && + test L = $(git cat-file commit HEAD | sed -ne \$p) +' + test_done -- 1.7.12.318.g08bf5ad.dirty -- 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/7] builtin/notes.c: mark file-scope functions as static
Signed-off-by: Junio C Hamano --- builtin.h | 2 -- builtin/notes.c | 7 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin.h b/builtin.h index 8e37752..95116b8 100644 --- a/builtin.h +++ b/builtin.h @@ -21,7 +21,6 @@ struct fmt_merge_msg_opts { extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out, struct fmt_merge_msg_opts *); -extern void commit_notes(struct notes_tree *t, const char *msg); struct notes_rewrite_cfg { struct notes_tree **trees; @@ -33,7 +32,6 @@ struct notes_rewrite_cfg { int mode_from_env; }; -combine_notes_fn parse_combine_notes_fn(const char *v); struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd); int copy_note_for_rewrite(struct notes_rewrite_cfg *c, const unsigned char *from_obj, const unsigned char *to_obj); diff --git a/builtin/notes.c b/builtin/notes.c index 554c801..453457a 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -19,6 +19,9 @@ #include "string-list.h" #include "notes-merge.h" +static void commit_notes(struct notes_tree *t, const char *msg); +static combine_notes_fn parse_combine_notes_fn(const char *v); + static const char * const git_notes_usage[] = { N_("git notes [--ref ] [list []]"), N_("git notes [--ref ] add [-f] [-m | -F | (-c | -C) ] []"), @@ -288,7 +291,7 @@ static int parse_reedit_arg(const struct option *opt, const char *arg, int unset return parse_reuse_arg(opt, arg, unset); } -void commit_notes(struct notes_tree *t, const char *msg) +static void commit_notes(struct notes_tree *t, const char *msg) { struct strbuf buf = STRBUF_INIT; unsigned char commit_sha1[20]; @@ -312,7 +315,7 @@ void commit_notes(struct notes_tree *t, const char *msg) strbuf_release(&buf); } -combine_notes_fn parse_combine_notes_fn(const char *v) +static combine_notes_fn parse_combine_notes_fn(const char *v) { if (!strcasecmp(v, "overwrite")) return combine_notes_overwrite; -- 1.7.12.508.g4d78187 -- 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/7] commit.c: mark file-scope functions as static
Signed-off-by: Junio C Hamano --- commit.c | 7 +-- commit.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/commit.c b/commit.c index 0ea441d..0246767 100644 --- a/commit.c +++ b/commit.c @@ -9,6 +9,8 @@ #include "gpg-interface.h" #include "mergesort.h" +static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **); + int save_commit_buffer = 1; const char *commit_type = "commit"; @@ -1073,8 +1075,9 @@ static int excluded_header_field(const char *field, size_t len, const char **exc return 0; } -struct commit_extra_header *read_commit_extra_header_lines(const char *buffer, size_t size, - const char **exclude) +static struct commit_extra_header *read_commit_extra_header_lines( + const char *buffer, size_t size, + const char **exclude) { struct commit_extra_header *extra = NULL, **tail = &extra, *it = NULL; const char *line, *next, *eof, *eob; diff --git a/commit.h b/commit.h index 6edce87..9f21313 100644 --- a/commit.h +++ b/commit.h @@ -204,7 +204,6 @@ extern int commit_tree_extended(const struct strbuf *msg, unsigned char *tree, struct commit_extra_header *); extern struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **); -extern struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **); extern void free_commit_extra_headers(struct commit_extra_header *extra); -- 1.7.12.508.g4d78187 -- 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/7] diff.c: mark private file-scope symbols as static
--- diff.c | 2 +- diff.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 32142db..35d3f07 100644 --- a/diff.c +++ b/diff.c @@ -25,7 +25,7 @@ static int diff_detect_rename_default; static int diff_rename_limit_default = 400; static int diff_suppress_blank_empty; -int diff_use_color_default = -1; +static int diff_use_color_default = -1; static const char *diff_word_regex_cfg; static const char *external_diff_cmd_cfg; int diff_auto_refresh_index = 1; diff --git a/diff.h b/diff.h index e25addb..a658f85 100644 --- a/diff.h +++ b/diff.h @@ -243,7 +243,6 @@ extern int parse_long_opt(const char *opt, const char **argv, extern int git_diff_basic_config(const char *var, const char *value, void *cb); extern int git_diff_ui_config(const char *var, const char *value, void *cb); -extern int diff_use_color_default; extern void diff_setup(struct diff_options *); extern int diff_opt_parse(struct diff_options *, const char **, int); extern void diff_setup_done(struct diff_options *); -- 1.7.12.508.g4d78187 -- 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/7] graph.c: mark private file-scope symbols as static
Signed-off-by: Junio C Hamano --- graph.c | 32 ++-- graph.h | 27 --- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/graph.c b/graph.c index 7e0a099..e864fe2 100644 --- a/graph.c +++ b/graph.c @@ -8,6 +8,34 @@ /* Internal API */ /* + * Output the next line for a graph. + * This formats the next graph line into the specified strbuf. It is not + * terminated with a newline. + * + * Returns 1 if the line includes the current commit, and 0 otherwise. + * graph_next_line() will return 1 exactly once for each time + * graph_update() is called. + */ +static int graph_next_line(struct git_graph *graph, struct strbuf *sb); + +/* + * Set up a custom scheme for column colors. + * + * The default column color scheme inserts ANSI color escapes to colorize + * the graph. The various color escapes are stored in an array of strings + * where each entry corresponds to a color, except for the last entry, + * which denotes the escape for resetting the color back to the default. + * When generating the graph, strings from this array are inserted before + * and after the various column characters. + * + * This function allows you to enable a custom array of color escapes. + * The 'colors_max' argument is the index of the last "reset" entry. + * + * This functions must be called BEFORE graph_init() is called. + */ +static void graph_set_column_colors(const char **colors, unsigned short colors_max); + +/* * Output a padding line in the graph. * This is similar to graph_next_line(). However, it is guaranteed to * never print the current commit line. Instead, if the commit line is @@ -62,7 +90,7 @@ enum graph_state { static const char **column_colors; static unsigned short column_colors_max; -void graph_set_column_colors(const char **colors, unsigned short colors_max) +static void graph_set_column_colors(const char **colors, unsigned short colors_max) { column_colors = colors; column_colors_max = colors_max; @@ -1116,7 +1144,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf graph_update_state(graph, GRAPH_PADDING); } -int graph_next_line(struct git_graph *graph, struct strbuf *sb) +static int graph_next_line(struct git_graph *graph, struct strbuf *sb) { switch (graph->state) { case GRAPH_PADDING: diff --git a/graph.h b/graph.h index aff960c..19b0f66 100644 --- a/graph.h +++ b/graph.h @@ -4,22 +4,6 @@ /* A graph is a pointer to this opaque structure */ struct git_graph; -/* - * Set up a custom scheme for column colors. - * - * The default column color scheme inserts ANSI color escapes to colorize - * the graph. The various color escapes are stored in an array of strings - * where each entry corresponds to a color, except for the last entry, - * which denotes the escape for resetting the color back to the default. - * When generating the graph, strings from this array are inserted before - * and after the various column characters. - * - * This function allows you to enable a custom array of color escapes. - * The 'colors_max' argument is the index of the last "reset" entry. - * - * This functions must be called BEFORE graph_init() is called. - */ -void graph_set_column_colors(const char **colors, unsigned short colors_max); /* * Create a new struct git_graph. @@ -49,17 +33,6 @@ void graph_update(struct git_graph *graph, struct commit *commit); */ int graph_is_commit_finished(struct git_graph const *graph); -/* - * Output the next line for a graph. - * This formats the next graph line into the specified strbuf. It is not - * terminated with a newline. - * - * Returns 1 if the line includes the current commit, and 0 otherwise. - * graph_next_line() will return 1 exactly once for each time - * graph_update() is called. - */ -int graph_next_line(struct git_graph *graph, struct strbuf *sb); - /* * graph_show_*: helper functions for printing to stdout -- 1.7.12.508.g4d78187 -- 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 5/7] grep.c: mark private file-scope symbols as static
Signed-off-by: Junio C Hamano --- grep.c | 6 +- grep.h | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/grep.c b/grep.c index 925aa92..c7f8a47 100644 --- a/grep.c +++ b/grep.c @@ -3,6 +3,10 @@ #include "userdiff.h" #include "xdiff-interface.h" +static int grep_source_load(struct grep_source *gs); +static int grep_source_is_binary(struct grep_source *gs); + + static struct grep_pat *create_grep_pat(const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t, @@ -403,7 +407,7 @@ static void dump_grep_expression_1(struct grep_expr *x, int in) } } -void dump_grep_expression(struct grep_opt *opt) +static void dump_grep_expression(struct grep_opt *opt) { struct grep_expr *x = opt->pattern_expression; diff --git a/grep.h b/grep.h index 00d71f7..8a28a67 100644 --- a/grep.h +++ b/grep.h @@ -159,11 +159,10 @@ struct grep_source { void grep_source_init(struct grep_source *gs, enum grep_source_type type, const char *name, const void *identifier); -int grep_source_load(struct grep_source *gs); void grep_source_clear_data(struct grep_source *gs); void grep_source_clear(struct grep_source *gs); void grep_source_load_driver(struct grep_source *gs); -int grep_source_is_binary(struct grep_source *gs); + int grep_source(struct grep_opt *opt, struct grep_source *gs); -- 1.7.12.508.g4d78187 -- 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 7/7] notes.c: mark private file-scope symbols as static
Signed-off-by: Junio C Hamano --- notes.c | 14 -- notes.h | 14 -- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/notes.c b/notes.c index 93e9868..bc454e1 100644 --- a/notes.c +++ b/notes.c @@ -1196,8 +1196,18 @@ void free_notes(struct notes_tree *t) memset(t, 0, sizeof(struct notes_tree)); } -void format_note(struct notes_tree *t, const unsigned char *object_sha1, - struct strbuf *sb, const char *output_encoding, int flags) +/* + * Fill the given strbuf with the notes associated with the given object. + * + * If the given notes_tree structure is not initialized, it will be auto- + * initialized to the default value (see documentation for init_notes() above). + * If the given notes_tree is NULL, the internal/default notes_tree will be + * used instead. + * + * 'flags' is a bitwise combination of the flags for format_display_notes. + */ +static void format_note(struct notes_tree *t, const unsigned char *object_sha1, + struct strbuf *sb, const char *output_encoding, int flags) { static const char utf8[] = "utf-8"; const unsigned char *sha1; diff --git a/notes.h b/notes.h index c716694..3592b19 100644 --- a/notes.h +++ b/notes.h @@ -241,20 +241,6 @@ void free_notes(struct notes_tree *t); #define NOTES_SHOW_HEADER 1 #define NOTES_INDENT 2 -/* - * Fill the given strbuf with the notes associated with the given object. - * - * If the given notes_tree structure is not initialized, it will be auto- - * initialized to the default value (see documentation for init_notes() above). - * If the given notes_tree is NULL, the internal/default notes_tree will be - * used instead. - * - * 'flags' is a bitwise combination of the above formatting flags. - */ -void format_note(struct notes_tree *t, const unsigned char *object_sha1, - struct strbuf *sb, const char *output_encoding, int flags); - - struct string_list; struct display_notes_opt { -- 1.7.12.508.g4d78187 -- 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 6/7] rerere.c: mark private file-scope symbols as static
Signed-off-by: Junio C Hamano --- rerere.c | 2 +- rerere.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rerere.c b/rerere.c index b57a34d..a6a5cd5 100644 --- a/rerere.c +++ b/rerere.c @@ -25,7 +25,7 @@ const char *rerere_path(const char *hex, const char *file) return git_path("rr-cache/%s/%s", hex, file); } -int has_rerere_resolution(const char *hex) +static int has_rerere_resolution(const char *hex) { struct stat st; return !stat(rerere_path(hex, "postimage"), &st); diff --git a/rerere.h b/rerere.h index fcd8bc1..156d2aa 100644 --- a/rerere.h +++ b/rerere.h @@ -16,7 +16,6 @@ extern void *RERERE_RESOLVED; extern int setup_rerere(struct string_list *, int); extern int rerere(int); extern const char *rerere_path(const char *hex, const char *file); -extern int has_rerere_resolution(const char *hex); extern int rerere_forget(const char **); extern int rerere_remaining(struct string_list *); extern void rerere_clear(struct string_list *); -- 1.7.12.508.g4d78187 -- 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: [PATCHv2 01/12] git p4 test: remove bash-ism of combined export/assignment
Looks good to me, ack. On 09/09/12 21:16, Pete Wyckoff wrote: Signed-off-by: Pete Wyckoff --- t/lib-git-p4.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 2d753ab..482eeac 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -26,9 +26,10 @@ testid=${this_test#t} git_p4_test_start=9800 P4DPORT=$((10669 + ($testid - $git_p4_test_start))) -export P4PORT=localhost:$P4DPORT -export P4CLIENT=client -export P4EDITOR=: +P4PORT=localhost:$P4DPORT +P4CLIENT=client +P4EDITOR=: +export P4PORT P4CLIENT P4EDITOR db="$TRASH_DIRECTORY/db" cli=$(test-path-utils real_path "$TRASH_DIRECTORY/cli") -- 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: [PATCHv2 02/12] git p4: gracefully fail if some commits could not be applied
I've only played around with this a bit, but it looks to be doing the right thing. In practice, I think the normal workflow tends to be 'rebase, submit' and so this code path will only be taken in the case where a conflicting change is submitted to p4 in the window between rebasing and submitting (or you forget to rebase). As your cover letter says though, I need to do something about rebasing. Ack. On 09/09/12 21:16, Pete Wyckoff wrote: If a commit fails to apply cleanly to the p4 tree, an interactive prompt asks what to do next. In all cases (skip, apply, write), the behavior after the prompt had a few problems. Change it so that it does not claim erroneously that all commits were applied. Instead list the set of the patches under consideration, and mark with an asterisk those that were applied successfully. Like this example: Applying 592f1f9 line5 in file1 will conflict ... Unfortunately applying the change failed! What do you want to do? [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) s Skipping! Good luck with the next patches... //depot/file1#4 - was edit, reverted Applying b8db1c6 okay_commit_after_skip ... Change 6 submitted. Applied only the commits marked with '*': 592f1f9 line5 in file1 will conflict * b8db1c6 okay_commit_after_skip Do not try to sync and rebase unless all patches were applied. If there was a conflict during the submit, there is sure to be one at the rebase. Let the user to do the sync and rebase manually. This changes how a couple tets in t9810-git-p4-rcs.sh behave: - git p4 now does not leave files open and edited in the client - If a git commit contains a change to a file that was deleted in p4, the test used to check that the sync/rebase loop happened after the failure to apply the change. Since now sync/rebase does not happen after failure, do not test this. Normal rebase machinery, outside of git p4, will let rebase --skip work. Signed-off-by: Pete Wyckoff --- git-p4.py | 42 +++- t/t9810-git-p4-rcs.sh | 50 ++- t/t9815-git-p4-submit-fail.sh | 92 +++ 3 files changed, 128 insertions(+), 56 deletions(-) create mode 100755 t/t9815-git-p4-submit-fail.sh diff --git a/git-p4.py b/git-p4.py index e67d37d..2405f38 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1088,7 +1088,10 @@ class P4Submit(Command, P4UserMap): return False def applyCommit(self, id): -print "Applying %s" % (read_pipe("git log --max-count=1 --pretty=oneline %s" % id)) +"""Apply one commit, return True if it succeeded.""" + +print "Applying", read_pipe(["git", "show", "-s", + "--format=format:%h %s", id]) (p4User, gitEmail) = self.p4UserForCommit(id) @@ -1206,7 +1209,7 @@ class P4Submit(Command, P4UserMap): p4_revert(f) for f in filesToAdd: os.remove(f) -return +return False elif response == "a": os.system(applyPatchCmd) if len(filesToAdd)> 0: @@ -1312,6 +1315,7 @@ class P4Submit(Command, P4UserMap): os.remove(f) os.remove(fileName) +return True # success # Export git tags as p4 labels. Create a p4 label and then tag # with that. @@ -1487,14 +1491,16 @@ class P4Submit(Command, P4UserMap): if gitConfig("git-p4.detectCopiesHarder", "--bool") == "true": self.diffOpts += " --find-copies-harder" -while len(commits)> 0: -commit = commits[0] -commits = commits[1:] -self.applyCommit(commit) +applied = [] +for commit in commits: +ok = self.applyCommit(commit) +if ok: +applied.append(commit) -if len(commits) == 0: -print "All changes applied!" -chdir(self.oldWorkingDirectory) +chdir(self.oldWorkingDirectory) + +if len(commits) == len(applied): +print "All commits applied!" sync = P4Sync() sync.run([]) @@ -1502,6 +1508,20 @@ class P4Submit(Command, P4UserMap): rebase = P4Rebase() rebase.rebase() +else: +if len(applied) == 0: +print "No commits applied." +else: +print "Applied only the commits marked with '*':" +for c in commits: +if c in applied: +star = "*" +else: +star = " " +print star, read_pipe(["git", "show", "-s", + "--format=format:%h %s", c]) +
Re: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
Hi, On 15 September 2012 18:21, Junio C Hamano wrote: > David Chanters writes: >> 2. If I do publish it, are there any caveats with that? i.e., >> because the replace data will likely point to a repo which in my >> working checkout I added with "git-remote", is that going to be a >> problem? > > That is between you and other project participants. They may not > want to see replacement in their project in the first place. > > Assuming that they do, pushing the replacement ref makes the > replacing object available in the pushed-into repository, so > they will *not* rely on your repository. This makes sense. But it is more the mechanics of what happens with needing to update the "fetch" line for the remote in .git/config I am more puzzled by. For example, if I have two repos -- repoA and repoB, where repoA contains the replace refs for repoB -- if I clone both repos with the intent of wanting to look at the two histories, what must I do in repoA to fetch the replace refs in the first place? I've tried: [remote "origin"] fetch = +refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/* But this results in: % git pull fatal: Invalid refspec '+refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/*' So I'm clearly not understanding something here, and even then, I'm assuming that I can manipulate the correct "fetch" line via "git config", it's just that I'm not sure which one to use. I keep meaning to read up on refspec stuff because it looks so useful. Kindly, David -- 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: [PATCHv2 03/12] git p4: remove submit failure options [a]pply and [w]rite
git-p4 won't be quite the same without these completely misleading and confusing messages :-) Ack. On 09/09/12 21:16, Pete Wyckoff wrote: When a patch failed to apply, these interactive options offered to: 1) apply the patch anyway, leaving reject (.rej) files around, or, 2) write the patch to a file (patch.txt) In both cases it suggested to invoke "git p4 submit --continue", an unimplemented option. While manually fixing the rejects and submitting the result might work, there are many steps that must be done to the job properly: * apply patch * invoke p4 add and delete * change executable bits * p4 sync -f renamed/copied files * extract commit message into p4 change description and move Jobs lines out of description section * set changelist owner for --preserve-user Plus the following manual sync/rebase will cause conflicts too, which must be resolved once again. Drop these workflows. Instead users should do a sync/rebase in git, fix the conflicts there, and do a clean "git p4 submit". Signed-off-by: Pete Wyckoff --- git-p4.py | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/git-p4.py b/git-p4.py index 2405f38..e08fea1 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1200,9 +1200,8 @@ class P4Submit(Command, P4UserMap): if not patch_succeeded: print "What do you want to do?" response = "x" -while response != "s" and response != "a" and response != "w": -response = raw_input("[s]kip this patch / [a]pply the patch forcibly " - "and with .rej files / [w]rite the patch to a file (patch.txt) ") +while response != "s": +response = raw_input("[s]kip this patch ") if response == "s": print "Skipping! Good luck with the next patches..." for f in editedFiles: @@ -1210,21 +1209,6 @@ class P4Submit(Command, P4UserMap): for f in filesToAdd: os.remove(f) return False -elif response == "a": -os.system(applyPatchCmd) -if len(filesToAdd)> 0: -print "You may also want to call p4 add on the following files:" -print " ".join(filesToAdd) -if len(filesToDelete): -print "The following files should be scheduled for deletion with p4 delete:" -print " ".join(filesToDelete) -die("Please resolve and submit the conflict manually and " -+ "continue afterwards with git p4 submit --continue") -elif response == "w": -system(diffcmd + "> patch.txt") -print "Patch saved to patch.txt in %s !" % self.clientPath -die("Please resolve and submit the conflict manually and " -"continue afterwards with git p4 submit --continue") system(applyPatchCmd) -- 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: [PATCHv2 04/12] git p4: move conflict prompt into run, add [q]uit input
I'll need to supply a followup patch to ensure that a config option can override the prompt. Ack. On 09/09/12 21:16, Pete Wyckoff wrote: When applying a commit to the p4 workspace fails, a prompt asks what to do next. This belongs up in run() instead of in applyCommit(), where run() can notice, for instance, that the prompt is unnecessary because this is the last commit. Offer two options about how to continue at conflict: [s]kip or [q]uit. Having an explicit "quit" option gives git p4 a chance to clean up, show the applied-commit summary, and do tag export. Signed-off-by: Pete Wyckoff --- git-p4.py | 41 + t/t9815-git-p4-submit-fail.sh | 31 +++ 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/git-p4.py b/git-p4.py index e08fea1..479f1fc 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1198,17 +1198,11 @@ class P4Submit(Command, P4UserMap): patch_succeeded = True if not patch_succeeded: -print "What do you want to do?" -response = "x" -while response != "s": -response = raw_input("[s]kip this patch ") -if response == "s": -print "Skipping! Good luck with the next patches..." -for f in editedFiles: -p4_revert(f) -for f in filesToAdd: -os.remove(f) -return False +for f in editedFiles: +p4_revert(f) +for f in filesToAdd: +os.remove(f) +return False system(applyPatchCmd) @@ -1475,11 +1469,34 @@ class P4Submit(Command, P4UserMap): if gitConfig("git-p4.detectCopiesHarder", "--bool") == "true": self.diffOpts += " --find-copies-harder" +# +# Apply the commits, one at a time. On failure, ask if should +# continue to try the rest of the patches, or quit. +# applied = [] -for commit in commits: +last = len(commits) - 1 +for i, commit in enumerate(commits): ok = self.applyCommit(commit) if ok: applied.append(commit) +else: +if i< last: +quit = False +while True: +print "What do you want to do?" +response = raw_input("[s]kip this commit but apply" + " the rest, or [q]uit? ") +if not response: +continue +if response[0] == "s": +print "Skipping this commit, but applying the rest" +break +if response[0] == "q": +print "Quitting" +quit = True +break +if quit: +break chdir(self.oldWorkingDirectory) diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh index 5c36714..397b3e8 100755 --- a/t/t9815-git-p4-submit-fail.sh +++ b/t/t9815-git-p4-submit-fail.sh @@ -18,7 +18,7 @@ test_expect_success 'init depot' ' ) ' -test_expect_success 'conflict on one commit, skip' ' +test_expect_success 'conflict on one commit' ' test_when_finished cleanup_git&& git p4 clone --dest="$git" //depot&& ( @@ -34,12 +34,12 @@ test_expect_success 'conflict on one commit, skip' ' echo line3>>file1&& git add file1&& git commit -m "line3 in file1 will conflict"&& - echo s | test_expect_code 1 git p4 submit>out&& + test_expect_code 1 git p4 submit>out&& test_i18ngrep "No commits applied" out ) ' -test_expect_success 'conflict on second of two commits, skip' ' +test_expect_success 'conflict on second of two commits' ' test_when_finished cleanup_git&& git p4 clone --dest="$git" //depot&& ( @@ -57,7 +57,7 @@ test_expect_success 'conflict on second of two commits, skip' ' echo line4>>file1&& git add file1&& git commit -m "line4 in file1 will conflict"&& - echo s | test_expect_code 1 git p4 submit>out&& + test_expect_code 1 git p4 submit>out&& test_i18ngrep "Applied only the commits" out ) ' @@ -85,6 +85,29 @@ test_expect_success 'conflict on first of two commits, skip' ' ) ' +test_expect_success 'conflict on first of two commits, quit' ' + test_when_finished cleanup_git&& + git p4 clone --dest="$git" //depot&& + ( + cd "$cli"&& + p4 open file1&& + echo line7>>file1&& + p4 submit -d "line7 in file1" + )&& + ( +
Re: [PATCHv2 05/12] git p4: standardize submit cancel due to unchanged template
Ack. On 09/09/12 21:16, Pete Wyckoff wrote: When editing the submit template, if no change was made to it, git p4 offers a prompt "Submit anyway?". Answering "no" cancels the submit. Previously, a "no" answer behaves like a "[s]kip" answer to the failed-patch prompt, in that it proceeded to try to apply the rest of the commits. Instead, put users back into the new "[s]kip / [c]ontinue" loop so that they can decide. This makes both cases of patch failure behave identically. The return code of git p4 after a "no" answer is now the same as that for a "skip" due to failed patch; update a test to understand this. Signed-off-by: Pete Wyckoff --- git-p4.py | 4 +++- t/t9805-git-p4-skip-submit-edit.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/git-p4.py b/git-p4.py index 479f1fc..39fa2e1 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1262,6 +1262,7 @@ class P4Submit(Command, P4UserMap): if self.edit_template(fileName): # read the edited message and submit +ret = True tmpFile = open(fileName, "rb") message = tmpFile.read() tmpFile.close() @@ -1285,6 +1286,7 @@ class P4Submit(Command, P4UserMap): else: # skip this patch +ret = False print "Submission cancelled, undoing p4 changes." for f in editedFiles: p4_revert(f) @@ -1293,7 +1295,7 @@ class P4Submit(Command, P4UserMap): os.remove(f) os.remove(fileName) -return True # success +return ret # Export git tags as p4 labels. Create a p4 label and then tag # with that. diff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh index fb3c8ec..ff2cc79 100755 --- a/t/t9805-git-p4-skip-submit-edit.sh +++ b/t/t9805-git-p4-skip-submit-edit.sh @@ -38,7 +38,7 @@ test_expect_success 'no config, unedited, say no' ' cd "$git"&& echo line>>file1&& git commit -a -m "change 3 (not really)"&& - printf "bad response\nn\n" | git p4 submit&& + printf "bad response\nn\n" | test_expect_code 1 git p4 submit&& p4 changes //depot/...>wc&& test_line_count = 2 wc ) -- 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: [ANNOUNCE] tig-1.0
On Tue, Sep 11, 2012 at 3:24 PM, Jean-Baptiste Quenot wrote: > 2012/9/7 Jonas Fonseca : >> [snip] I suggest to support something like the following: >> >> tig --no-walk --stdin < tmp-file >> >> Would that cover your use case? > > That would be great! I would then feed tig with all commits I want to > see in the main view. When you have time, please test the main-view-with-stdin branch in git://github.com/jonas/tig.git -- Jonas Fonseca -- 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: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
Hi, On Sat, Sep 15, 2012 at 11:49 PM, David Chanters wrote: > Hi, > > On 15 September 2012 18:21, Junio C Hamano wrote: > >> Assuming that they do, pushing the replacement ref makes the >> replacing object available in the pushed-into repository, so >> they will *not* rely on your repository. > > This makes sense. But it is more the mechanics of what happens with > needing to update the "fetch" line for the remote in .git/config I am > more puzzled by. > > For example, if I have two repos -- repoA and repoB, where repoA > contains the replace refs for repoB -- if I clone both repos with the > intent of wanting to look at the two histories, what must I do in > repoA to fetch the replace refs in the first place? > > I've tried: > > [remote "origin"] > fetch = > +refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/* Could you try the following: [remote "origin"] fetch = +refs/replace/*:refs/replace/* fetch = +refs/heads/*:refs/remotes/origin/* > But this results in: > > % git pull > fatal: Invalid refspec > '+refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/*' Best, 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
Unable to clone GIT project
I have created a GIT repository on Linux 64 bit machine. When I tried to clone GIT repository on windows 7 machine then I am getting below error. Error: git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory fatal: The remote end hung up unexpectedly anyone please help me resolve the issue. Regards, Ankush -- 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 userdiff patterns for Ada
Add Ada xfuncname and wordRegex patterns to the list of builtin patterns. Signed-off-by: Adrian Johnson --- Documentation/gitattributes.txt | 2 ++ t/t4018-diff-funcname.sh| 2 +- t/t4034-diff-words.sh | 1 + t/t4034/ada/expect | 27 +++ t/t4034/ada/post| 13 + t/t4034/ada/pre | 13 + userdiff.c | 9 + 7 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 t/t4034/ada/expect create mode 100644 t/t4034/ada/post create mode 100644 t/t4034/ada/pre diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 462b79c..99ed04d 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -511,6 +511,8 @@ configuration file (you still need to enable this with the attribute mechanism, via `.gitattributes`). The following built in patterns are available: +- `ada` suitable for source code in the Ada language. + - `bibtex` suitable for files with BibTeX coded references. - `cpp` suitable for source code in the C and C++ languages. diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh index 4bd2a1c..082d3e8 100755 --- a/t/t4018-diff-funcname.sh +++ b/t/t4018-diff-funcname.sh @@ -105,7 +105,7 @@ test_expect_funcname () { grep "^@@.*@@ $1" diff } -for p in bibtex cpp csharp fortran html java matlab objc pascal perl php python ruby tex +for p in ada bibtex cpp csharp fortran html java matlab objc pascal perl php python ruby tex do test_expect_success "builtin $p pattern compiles" ' echo "*.java diff=$p" >.gitattributes && diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 30d42cb..40ab333 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -298,6 +298,7 @@ test_expect_success 'unset default driver' ' test_unconfig diff.wordregex ' +test_language_driver ada test_language_driver bibtex test_language_driver cpp test_language_driver csharp diff --git a/t/t4034/ada/expect b/t/t4034/ada/expect new file mode 100644 index 000..be2376e --- /dev/null +++ b/t/t4034/ada/expect @@ -0,0 +1,27 @@ +diff --git a/pre b/post +index d96fdd1..df21bb0 100644 +--- a/pre b/post +@@ -1,13 +1,13 @@ +Ada.Text_IO.Put_Line("Hello World!?"); +1 1e-10 16#FE12#E2 3.141_592 'xy' +ax+b ay x-b +ay +x*b ay x/b +ay +x**b +ay +x(by) +ax:=b +ay +x=b ay x/= b +ay +xb ay x>=b +ay +x,b +ay +x=>b +ay +x..b +ay +x<>by diff --git a/t/t4034/ada/post b/t/t4034/ada/post new file mode 100644 index 000..df21bb0 --- /dev/null +++ b/t/t4034/ada/post @@ -0,0 +1,13 @@ +Ada.Text_IO.Put_Line("Hello World?"); +1 1e10 16#FE12#E2 3.141_592 'y' +x+y x-y +x*y x/y +x**y +x(y) +x:=y +x=y x/= y +xy x>=y +x,y +x=>y +x..y +x<>y diff --git a/t/t4034/ada/pre b/t/t4034/ada/pre new file mode 100644 index 000..d96fdd1 --- /dev/null +++ b/t/t4034/ada/pre @@ -0,0 +1,13 @@ +Ada.Text_IO.Put_Line("Hello World!"); +1 1e-10 16#FE12#E2 3.141_592 'x' +a+b a-b +a*b a/b +a**b +a(b) +a:=b +a=b a/= b +ab a>=b +a,b +a=>b +a..b +a<>b diff --git a/userdiff.c b/userdiff.c index 1e7184f..ed958ef 100644 --- a/userdiff.c +++ b/userdiff.c @@ -14,6 +14,15 @@ static int drivers_alloc; { name, NULL, -1, { pattern, REG_EXTENDED | REG_ICASE }, \ word_regex "|[^[:space:]]|[\xc0-\xff][\x80-\xbf]+" } static struct userdiff_driver builtin_drivers[] = { +IPATTERN("ada", +"!^(.*[ \t])?(is new|renames|is separate)([ \t].*)?$\n" +"!^[ \t]*with[ \t].*$\n" +"^[ \t]*((procedure|function)[ \t]+.*)$\n" +"^[ \t]*((package|protected|task)[ \t]+.*)$", +/* -- */ +"[a-zA-Z][a-zA-Z0-9_]*" +"|[0-9][-+0-9#_.eE]" +"|=>|\\.\\.|\\*\\*|:=|/=|>=|<=|<<|>>|<>"), IPATTERN("fortran", "!^([C*]|[ \t]*!)\n" "!^[ \t]*MODULE[ \t]+PROCEDURE[ \t]\n" -- 1.7.12.465.g52d9ccc -- 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: Using git-replace in place of grafts -- and publishing .git/refs/replace between repos?
David Chanters writes: > I've tried: > > [remote "origin"] > fetch = > +refs/replace/*:+refs/heads/*:refs/remotes/origin/*:refs/replace/* Read the documentation and learn about instead of blindly guessing. [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* fetch = +refs/replace/*:refs/replace/* would be syntactically more correct. That would blindly fetch each and every replace refs from the other side and apply the replacement. It is questionable if it is a sensible thing to do, though. "Git cabal" has been discussing a plan to make this easier but it is not quite ready to outline here yet. Perhaps after I return from my vacation post 1.8.0 release ;-) -- 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: [PATCHv2 01/12] git p4 test: remove bash-ism of combined export/assignment
Luke Diamand writes: > Looks good to me, ack. Thanks; is this an ack for the entire series, or are you expecting further back-and-forth with Pete before the whole thing is ready? -- 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] Add userdiff patterns for Ada
Adrian Johnson writes: > Add Ada xfuncname and wordRegex patterns to the list of builtin > patterns. > > Signed-off-by: Adrian Johnson > --- Interesting. I do not read Ada, but in this "expect" file,... > diff --git a/t/t4034/ada/expect b/t/t4034/ada/expect > new file mode 100644 > index 000..be2376e > --- /dev/null > +++ b/t/t4034/ada/expect > @@ -0,0 +1,27 @@ > +diff --git a/pre b/post > +index d96fdd1..df21bb0 100644 > +--- a/pre > b/post > +@@ -1,13 +1,13 @@ > +Ada.Text_IO.Put_Line("Hello World!?"); > +1 1e-10 16#FE12#E2 3.141_592 'xy' > +ax+b ay x-b > +ay > +x*b ay x/b > +ay > +x**b > +ay > +x(by) > +ax:=b > +ay > +x=b ay x/= b > +ay > +x x>b ay x>=b > +ay > +x,b > +ay > +x=>b > +ay > +x..b > +ay > +x<>by I do not seem to find anything interesting after @@, which means that xfuncname is not tested at all even though the log message claims the patch adds some. Puzzled... -- 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/5] Import wildmatch from rsync
Nguyễn Thái Ngọc Duy writes: > These files are from rsync.git commit > d51a3adb4fca3e6b1b046c6e570828f3bca8fe36. The commit is GPL-3. However > wildmatch.[ch] have not changed since rsync turned to GPL-3. I'd like see the last version of rsync that was GPLv2 hunted down and the copy from that version lifted from it. If you _know_ they are identical, then you should be able to do that, no? > compat/wildmatch.c | 368 > + > compat/wildmatch.h | 6 + As this will be linked on all platforms, it shouldn't be in compat/ directory. Unlike xdiff/ that has many files, this can live at the top-level, just like kwset we borrowed from GNU grep does. > diff --git a/compat/wildmatch.c b/compat/wildmatch.c > new file mode 100644 > index 000..f3a1731 > --- /dev/null > +++ b/compat/wildmatch.c > @@ -0,0 +1,368 @@ > +/* > +** Do shell-style pattern matching for ?, \, [], and * characters. > +** It is 8bit clean. > +** > +** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. > +** Rich $alz is now . > +** > +** Modified by Wayne Davison to special-case '/' matching, to make '**' > +** work differently than '*', and to fix the character-class code. > +*/ > + > +#include "rsync.h" Huh??? Ahh. The approach you took is "This patch imports the pristine copy to make it easier to verify the provenance, and the plan is to make it usable with separate follow-up patches.", I agree that is a very sensible thing to do. But please say so in the commit log message. -- 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/3] rebase -i: Teach "--edit-todo" action
Andrew Wong writes: > This allows users to edit the todo file while they're stopped in the > middle of an interactive rebase. When this action is executed, all > comments from the original todo file are stripped, and new help messages > are appended to the end. > > Signed-off-by: Andrew Wong > --- > Documentation/git-rebase.txt | 5 - > git-rebase--interactive.sh | 16 > git-rebase.sh| 14 ++ > 3 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt > index fd535b0..da067ec 100644 > --- a/Documentation/git-rebase.txt > +++ b/Documentation/git-rebase.txt > @@ -12,7 +12,7 @@ SYNOPSIS > [] [] > 'git rebase' [-i | --interactive] [options] [--exec ] [--onto ] > --root [] > -'git rebase' --continue | --skip | --abort > +'git rebase' --continue | --skip | --abort | --edit-todo > > DESCRIPTION > --- > @@ -245,6 +245,9 @@ leave out at most one of A and B, in which case it > defaults to HEAD. > --skip:: > Restart the rebasing process by skipping the current patch. > > +--edit-todo:: > + Edit the todo list during an interactive rebase. > + > -m:: > --merge:: > Use merging strategies to rebase. When the recursive (default) merge > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index 4d57e50..ca55fac 100644 > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.sh > @@ -792,6 +792,22 @@ skip) > > do_rest > ;; > +edit-todo) > + sed -i '/^#/d' "$todo" > + append_todo_help I do not think the "sed -i" in-place edit is portable. AFAIK, it is not even in POSIX.1 In any case, what information are you discarding and then replacing with the standard boilerplate? > diff --git a/git-rebase.sh b/git-rebase.sh > index 15da926..e660203 100755 > --- a/git-rebase.sh > +++ b/git-rebase.sh > @@ -38,6 +38,7 @@ C=!passed to 'git apply' > continue! continue > abort! abort and check out the original branch > skip! skip current patch and continue > +edit-todo! edit the todo list during an interactive rebase > " > . git-sh-setup > . git-sh-i18n > @@ -194,6 +195,10 @@ do > test $total_argc -eq 2 || usage > action=${1##--} > ;; > + --edit-todo) > + test $total_argc -eq 2 || usage > + action=${1##--} > + ;; > --onto) > test 2 -le "$#" || usage > onto="$2" > @@ -306,6 +311,12 @@ then > fi > fi > > +if test "$action" = "edit-todo" && > + test "$type" != "interactive" I do not see a need to split this short expression into two lines. -- 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/3] rebase -i: Add tests for "--edit-todo"
Andrew Wong writes: > Signed-off-by: Andrew Wong > --- > t/t3404-rebase-interactive.sh | 16 > 1 file changed, 16 insertions(+) > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > index 7304b66..a194c97 100755 > --- a/t/t3404-rebase-interactive.sh > +++ b/t/t3404-rebase-interactive.sh > @@ -911,4 +911,20 @@ test_expect_success 'rebase -i --root fixup root commit' > ' > test 0 = $(git cat-file commit HEAD | grep -c ^parent\ ) > ' > > +test_expect_success 'rebase --edit-todo does not works on non-interactive > rebase' ' > + git checkout conflict-branch && > + test_must_fail git rebase --onto HEAD~2 HEAD~ && > + test_must_fail git rebase --edit-todo && > + git rebase --abort > +' It _might_ be that you simply inherited sloppiness from surrounding existing tests, but what happens when a test _before_ this test failed? Is "git checkout conflict-branch" sufficient to bring you to a sensible state where this test would succeed? I'd prefer to see a defensive "git reset --hard &&" before the first "checkout". The same for the next one. > +test_expect_success 'rebase --edit-todo can be used to modify todo' ' > + git checkout no-conflict-branch^0 && > + FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 && > + FAKE_LINES="2 1" git rebase --edit-todo && > + git rebase --continue > + test M = $(git cat-file commit HEAD^ | sed -ne \$p) && > + test L = $(git cat-file commit HEAD | sed -ne \$p) > +' > + > test_done -- 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