git mailing list

FromSubjectsort iconDate
Junio C Hamano
What's cooking in git.git (Mar 2010, #02; Sun, 07)
What's cooking in git.git (Mar 2010, #02; Sun, 07) -------------------------------------------------- Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. Let's start quieting things down on 'next' front. -------------------------------------------------- [Graduated to "master"] * ...
Mar 7, 3:49 pm 2010
Junio C Hamano
[ANNOUNCE] Git 1.7.0.2
The latest maintenance release Git 1.7.0.2 is available at the usual places: http://www.kernel.org/pub/software/scm/git/ git-1.7.0.2.tar.{gz,bz2} (source tarball) git-htmldocs-1.7.0.2.tar.{gz,bz2} (preformatted docs) git-manpages-1.7.0.2.tar.{gz,bz2} (preformatted docs) The RPM binary packages for a few architectures are found in: RPMS/$arch/git-*-1.7.0.2-1.fc11.$arch.rpm (RPM) Git v1.7.0.2 Release Notes ========================== Fixes since ...
Mar 7, 3:29 pm 2010
slipstream180
How do you add an external directory to repository?
I want to add an external directory to an existing repository. External Dir: /home/some/directory Working Dir: /htdocs/.git If I attempt the following command from the /htdocs dir: git add /home/some/directory I get an error: fatal: '/home/some/directory' is outside repository I understand that I can add a symbolic link to /home/some/directory, but I believe that only track the link. How do I track all files under the directory as well? Thanks in advance! -- View this ...
Mar 7, 1:03 pm 2010
Fredrik Gustafsson
Re: How do you add an external directory to repository?
I'm unsure if that can be done, I don't think so. I do, however, believe that the superproject functionality can suite your needs. Then you will have two git repositories, one wich is handling the other. It sounds really more complicated than it is. http://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects regards iveqy --
Mar 7, 1:23 pm 2010
Nicolas Sebrecht
Re: How do you add an external directory to repository?
I think you're looking for the bind option of mount. This is what I use to track all my configuration files in one "conf" repository. Here is an extract of how my fstab looks like: /home/nicolas/.zsh /home/nicolas/dev/conf/zsh auto bind,user 0 0 /home/nicolas/.vim /home/nicolas/dev/conf/vim auto bind,user 0 0 /home/nicolas/.mutt /home/nicolas/dev/conf/mutt auto bind,user 0 0 /home/nicolas/.screen /home/nicolas/dev/conf/screen auto bind,user 0 0 ...
Mar 7, 2:36 pm 2010
Mark Lodato
[PATCHv2 0/3] grep color enhancements
This is a re-spin of the second half of Gmane 141186, "color enhancements, particularly for grep", which is currently in pu as 'ml/color-grep'. The following changes were made, all to the second patch: * Fix the parsing of color.grep. The old code caused a segfault if this option was set, and it also disallowed setting this option without a value. * Color the filename in --name-only output. I still don't like this, but I understand that makes the coloring more consistent. As ...
Mar 7, 9:52 am 2010
Mark Lodato
[PATCHv2 3/3] grep: Colorize selected, context, and func ...
Colorize non-matching text of selected lines, context lines, and function name lines. The default for all three is no color, but they can be configured using color.grep.<slot>. The first two are similar to the corresponding options in GNU grep, except that GNU grep applies the color to the entire line, not just non-matching text. Signed-off-by: Mark Lodato <lodatom@gmail.com> --- Documentation/config.txt | 6 ++++++ builtin-grep.c | 9 +++++++++ grep.c | ...
Mar 7, 9:52 am 2010
Mark Lodato
[PATCHv2 2/3] grep: Colorize filename, line number, and ...
Colorize the filename, line number, and separator in git grep output, as GNU grep does. The colors are customizable through color.grep.<slot>. The default is to only color the separator (in cyan), since this gives the biggest legibility increase without overwhelming the user with colors. GNU grep also defaults cyan for the separator, but defaults to magenta for the filename and to green for the line number, as well. There is one difference from GNU grep: When a binary file matches without -a, ...
Mar 7, 9:52 am 2010
Junio C Hamano
Re: [PATCHv2 2/3] grep: Colorize filename, line number, ...
I don't know this "optimization" is warranted. I can understand that you are trying to help the user to save a handful of useless bytes per line of output in the normal case, but doesn't "color.cmd.foo = normal" set the value to an empty string already if that is what the user wants? The user may know about his contents better than this code does; perhaps the payload sometimes has funny ANSI sequence in it and the user may be trying to explicitly reset at the beginning of the line for the ...
Mar 7, 12:02 pm 2010
Mark Lodato
Re: [PATCHv2 2/3] grep: Colorize filename, line number, ...
Ah, I didn't know about the "normal" color. I tried using a blank value, which defaulted to "reset", so I thought there was no way to say "no ANSI sequence". The above was my workaround to get no sequence. Since the "normal" color exists, this workaround should be removed. The squash-able patch below removes the workaround, and also fixes another bug: color was not reset at the end of the line for hunk separators ("--"). As an aside, perhaps a blank color value should default to no ...
Mar 7, 1:47 pm 2010
Mark Lodato
[PATCHv2 1/3] Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*
Add GIT_COLOR_BOLD_* macros to set both bold and the color in one sequence. This saves two characters of output ("ESC [ m", minus ";") and makes the code more readable. Add the remaining GIT_COLOR_BG_* macros to make the list complete. The white and black colors are not included since they look bad on most terminals. Signed-off-by: Mark Lodato <lodatom@gmail.com> --- builtin-grep.c | 2 +- color.h | 11 +++++++++++ graph.c | 12 ++++++------ 3 files changed, 18 ...
Mar 7, 9:52 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 00/12] Support columinized output in tag/branch/l ...
This adds support to show columnized output in the mentioned commands. I am quite happy with columnized "git branch/tag". There is still room for improvement. For example, if "git column" is going to display all items in one or two lines (too wide screen), then falling back to one column mode would be better. I'm also experimenting aligned grep output. While it's useful sometimes to look for things near the beginning of line, I don't know if it's really worth the effort. Anyway, enjoy the ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 02/12] setup_pager(): save terminal width before ...
After redirecting, we may no longer read terminal width. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- pager.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/pager.c b/pager.c index fc6c3e0..ad447cf 100644 --- a/pager.c +++ b/pager.c @@ -81,6 +81,15 @@ void setup_pager(void) spawned_pager = 1; /* means we are emitting to terminal */ +#ifdef TIOCGWINSZ + { + struct winsize ws; + if (!ioctl(1, TIOCGWINSZ, &ws)) { + if ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 01/12] Move term_columns() to pager.c
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 1 + help.c | 22 ---------------------- pager.c | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/cache.h b/cache.h index 89f6a40..124f100 100644 --- a/cache.h +++ b/cache.h @@ -985,6 +985,7 @@ extern void setup_pager(void); extern const char *pager_program; extern int pager_in_use(void); extern int pager_use_color; +extern int term_columns(); extern const ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 08/12] tag: support column output with --columns
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/git-tag.txt | 11 ++++++++++- builtin/tag.c | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 31c78a8..1ef8df2 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -12,7 +12,8 @@ SYNOPSIS 'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] <tagname> [<commit> | ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 03/12] Add columnizer
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- .gitignore | 1 + Makefile | 2 + column.c | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ column.h | 23 ++++++++ command-list.txt | 1 + 5 files changed, 191 insertions(+), 0 deletions(-) create mode 100644 column.c create mode 100644 column.h diff --git a/.gitignore b/.gitignore index 7b3acb7..8e087e6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 06/12] Add helpers to redirect stdout to "git column"
While the columnizer can be used directly, it requires output code change. The helpers instead redirect all output to "git column" and let "git column" do all the layout work. This keeps code change minimum. All we need is: start_columnizer(); /* do some complex computation and output to stdout */ stop_columnizer(); Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- column.h | 2 + pager.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 04/12] help: use columnizer
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- help.c | 33 +++++++++++---------------------- 1 files changed, 11 insertions(+), 22 deletions(-) diff --git a/help.c b/help.c index 888bf8c..e039c14 100644 --- a/help.c +++ b/help.c @@ -3,6 +3,7 @@ #include "exec_cmd.h" #include "levenshtein.h" #include "help.h" +#include "column.h" void add_cmdname(struct cmdnames *cmds, const char *name, int len) { @@ -71,29 +72,17 @@ void exclude_cmds(struct cmdnames *cmds, ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 05/12] Add builtin command "column"
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/git-column.txt | 40 ++++++++++++++++ Makefile | 1 + builtin.h | 1 + builtin/column.c | 42 +++++++++++++++++ git.c | 1 + t/t9002-column.sh | 101 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 186 insertions(+), 0 deletions(-) create mode 100644 Documentation/git-column.txt create mode 100644 ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 09/12] branch: support column output with --columns
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/git-branch.txt | 8 ++++++++ builtin/branch.c | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 903a690..3d1d600 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -9,6 +9,7 @@ SYNOPSIS -------- [verse] 'git branch' [--color[=<when>] | --no-color] [-r | ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 07/12] add core.columns
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/config.txt | 8 ++++++++ cache.h | 1 + config.c | 6 ++++++ environment.c | 1 + 4 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index c80262b..d299eaf 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -533,6 +533,14 @@ core.sparseCheckout:: Enable "sparse checkout" ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 10/12] ls-files: support column output with --columns
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/ls-files.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index b065061..10cb057 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -13,6 +13,7 @@ #include "parse-options.h" #include "resolve-undo.h" #include "string-list.h" +#include "column.h" static int abbrev; static int show_deleted; @@ -33,6 +34,7 @@ static int ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 11/12] grep: do not return early in cmd_grep() if ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 39 +++++++++++++++++---------------------- 1 files changed, 17 insertions(+), 22 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 40b9a93..b8a1d5c 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -568,7 +568,6 @@ static int grep_cache(struct grep_opt *opt, const char **paths, int cached) if (hit && opt->status_only) break; } - free_grep_patterns(opt); return hit; } @@ ...
Mar 7, 5:09 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 12/12] grep: support column output with --columns
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/git-grep.txt | 10 ++++++++++ builtin/grep.c | 9 +++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 4b32322..7bd6a4f 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -18,6 +18,7 @@ SYNOPSIS [-c | --count] [--all-match] [-q | --quiet] [--max-depth <depth>] [--color[=<when>] ...
Mar 7, 5:09 am 2010
Mahesh Vaidya
git push question
   Hi    I am asked to explore GiT as version control tool by my employer.    I have discovered that one can set up property like    "git config user.name piglet " and commit will show this fictitious name instead real name forvaidya@gmail.com    How do I ensure that a correct name is stuck at the time receive-pack operation when user pushes changes to auth repository -Mahesh --
Mar 7, 4:41 am 2010
BJ Hargrave
Re: git push question
You can write a pre-receive hook, which runs on the remote repository, to validate the all incoming commits have recognized committer names/e-mail addresses. If they don't, the hook can reject the receive-pack. -- BJ --
Mar 7, 4:52 am 2010
Paul Menzel
status of libgit.a
Dear Git folks, could you please give an update on the status of libgit.a. For example cgit still could not be packaged yet for Debian [1] because of this bug [2]. cgit is used by a lot of projects out there, so I am wondering if the current libgit.a can be released in its current state. By the way, is there a web site/page for libgit.a? Thanks and sorry if I got something wrong, Paul [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515793 [2] ...
Mar 7, 3:27 am 2010
Miklos Vajna
Re: status of libgit.a
libgit.a is not a public library, so it will never have a stable API/ABI. There is a libgit2 project which tries to do this, but it's far from complete: No, there isn't. I think the only sane solution is what Fedora does as well: http://cvs.fedoraproject.org/viewvc/devel/cgit/ When cgit-1.2.3 is released, have a look at its Makefile, check what Git version does it want and add the relevant Git source to the cgit source package. [ I remember Debian did not support having multiple ...
Mar 7, 5:18 am 2010
Dmitry Potapov
Re: status of libgit.a
libgit.a has never been meant to use outside of Git. It was created just to assist with the building process, and there is no clear defined API. So, using libgit.a outside of Git is no different than copying source files and using them in another project. AFAIK, there is no plan to create a stable API for the existing libgit.a Another project (libgit2) started some time ago to create a Git library with a stable API, but it does not share much code with Git, and so far it provides only basic ...
Mar 7, 6:26 am 2010
Nguyen Thai Ngoc Duy
Re: status of libgit.a
Or bundle cgit with git.git as a subsystem, with Lars as maintainer. -- Duy --
Mar 7, 7:27 am 2010
Johannes Schindelin
Re: status of libgit.a
Hi, There had been some people who worked towards a re-entrant libgit.a (read: non-die()ing in library functions). But there were too many others, so that effort stopped. The most likely route for people needing libgit.a would be libgit2: cgit should not depend on libgit.a, as it is linked statically anyway. Ciao, Dscho
Mar 7, 9:36 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 11/18] verify-pack: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- git.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git.c b/git.c index a8660f4..0e052c8 100644 --- a/git.c +++ b/git.c @@ -396,7 +396,7 @@ static void handle_internal_command(int argc, const char **argv) { "version", cmd_version }, { "whatchanged", cmd_whatchanged, RUN_SETUP | USE_PAGER }, { "write-tree", cmd_write_tree, RUN_SETUP }, - { "verify-pack", cmd_verify_pack }, + { ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 00/18] Search and set up repository early for bui ...
This is a simpler part of my Git setup cleanup WIP [1], to introduce RUN_SETUP_GENTLY and make most of commands use it. The commands that do not have RUN_SETUP* are: - Init/Clone commands - Server commands - Helpers that have nothing to do with repositories - git-rev-parse [1] http://mid.gmane.org/1266336317-607-1-git-send-email-pclouds@gmail.com Nguyễn Thái Ngọc Duy (18): builtin: introduce startup_info struct builtin: Support RUN_SETUP_GENTLY to set up repository early if ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 02/18] builtin: Support RUN_SETUP_GENTLY to set u ...
Attempts to access gitdir are everywhere, even before cmd_*() is called. Because repository has not been found, repository-specific information (i.e. $GIT_DIR/config) may not be read. This leads to obscure bugs. So the sooner we setup gitdir, the less trouble we may have to deal with. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 1 + git.c | 11 ++++++++--- setup.c | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cache.h ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 07/18] builtin: USE_PAGER should not be used with ...
USE_PAGER may need core.pager from repository. So a repository search should be done before core.pager is read. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- git.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/git.c b/git.c index 3904fe2..84dd78e 100644 --- a/git.c +++ b/git.c @@ -253,8 +253,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) if (use_pager == -1 && p->option & RUN_SETUP) use_pager = ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 18/18] merge-file: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/merge-file.c | 4 +--- git.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/merge-file.c b/builtin/merge-file.c index 1e70073..474c6c2 100644 --- a/builtin/merge-file.c +++ b/builtin/merge-file.c @@ -30,7 +30,6 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix) int level = XDL_MERGE_ZEALOUS_ALNUM; int style = 0, quiet = 0; int favor = ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 17/18] var: use RUN_SETUP_GENTLY
"git var" needs to read repository config, so setup gitdir first. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/var.c | 2 -- git.c | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/builtin/var.c b/builtin/var.c index 70fdb4d..26324ef 100644 --- a/builtin/var.c +++ b/builtin/var.c @@ -75,12 +75,10 @@ static int show_config(const char *var, const char *value, void *cb) int cmd_var(int argc, const char **argv, const char *prefix) ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 14/18] diff: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/diff.c | 6 ++---- git.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/diff.c b/builtin/diff.c index ffcdd05..e4bd855 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -252,7 +252,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix) int ents = 0, blobs = 0, paths = 0; const char *path = NULL; struct blobinfo blob[2]; - int nongit; int result = 0; ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 16/18] ls-remote: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/ls-remote.c | 3 --- git.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 70f5622..998f2c8 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -31,7 +31,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) { int i; const char *dest = NULL; - int nongit; unsigned flags = 0; const char ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 15/18] help: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/help.c | 2 -- git.c | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/builtin/help.c b/builtin/help.c index 3182a2b..4988629 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -414,7 +414,6 @@ static void show_html_page(const char *git_cmd) int cmd_help(int argc, const char **argv, const char *prefix) { - int nongit; const char *alias; enum help_format ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 13/18] bundle: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/bundle.c | 6 ++---- git.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/bundle.c b/builtin/bundle.c index 2006cc5..80649ba 100644 --- a/builtin/bundle.c +++ b/builtin/bundle.c @@ -18,7 +18,6 @@ static const char builtin_bundle_usage[] = int cmd_bundle(int argc, const char **argv, const char *prefix) { struct bundle_header header; - int nongit; const char *cmd, ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 08/18] archive: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/archive.c | 2 +- git.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/archive.c b/builtin/archive.c index 6a887f5..ef0bef8 100644 --- a/builtin/archive.c +++ b/builtin/archive.c @@ -125,5 +125,5 @@ int cmd_archive(int argc, const char **argv, const char *prefix) setvbuf(stderr, NULL, _IOLBF, BUFSIZ); - return write_archive(argc, argv, prefix, 1); + return ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 12/18] apply: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/apply.c | 7 +++---- git.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 3af4ae0..d27aac6 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -3516,7 +3516,6 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix) { int i; int errs = 0; - int is_not_gitdir; int binary; int force_apply = 0; @@ -3589,7 ...
Mar 6, 9:56 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 09/18] mailinfo: use RUN_SETUP_GENTLY
mailinfo may use repo config, so setup gitdir first. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/mailinfo.c | 3 --- git.c | 2 +- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index ce2ef6b..3d2c650 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -1026,9 +1026,6 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix) { const char *def_charset; - /* ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 10/18] check-ref-format: use RUN_SETUP_GENTLY
When --branch is used, check-ref-format will look into repository for branch name. Therefore repository search is needed. The call flow is: - cmd_check_ref_format - strbuf_check_branch_ref - strbuf_branchname - interpret_branch_name - branch_get - read_config - resolve_ref Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- git.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git.c b/git.c index 326f7c7..a8660f4 100644 --- a/git.c +++ ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 06/18] grep: use RUN_SETUP_GENTLY
grep has USE_PAGER set. setup_pager() may read config even setup_git_dir* is not run yet. This tries to find a repository before config is read. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 9 +++------ git.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 40b9a93..fb82ff8 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -765,7 +765,7 @@ int cmd_grep(int argc, const char **argv, ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 05/18] shortlog: use RUN_SETUP_GENTLY
shortlog has USE_PAGER set. setup_pager() may read config even setup_git_dir* is not run yet. This tries to find a repository before the config is read. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/shortlog.c | 4 +--- git.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 06320f5..bdf3402 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -249,7 +249,6 @@ int ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 03/18] config: use RUN_SETUP_GENTLY
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/config.c | 6 ++---- git.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/builtin/config.c b/builtin/config.c index 4bc46b1..ecc8f87 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -326,11 +326,9 @@ static int get_colorbool(int print) return get_colorbool_found ? 0 : 1; } -int cmd_config(int argc, const char **argv, const char *unused_prefix) +int cmd_config(int ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 04/18] hash-object: use RUN_SETUP_GENTLY
hash-object needs to inspect repository's config, so it must try to find a repository regardless the object will be written in object store. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/hash-object.c | 9 +++++---- git.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 6a5f5b5..57330b8 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -76,7 +76,7 @@ ...
Mar 6, 9:55 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 01/18] builtin: introduce startup_info struct
The purpose of this struct is to make it easier to extend parameters passed to builtin commands from run_builtin(), and let libgit aware of some global states in future. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 6 ++++++ environment.c | 1 + git.c | 9 +++++---- setup.c | 12 +++++++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/cache.h b/cache.h index 89f6a40..30fddf1 100644 --- a/cache.h +++ ...
Mar 6, 9:55 pm 2010
Junio C Hamano
Re: [PATCH v4 3/7] revert: add --ff option to allow fast ...
I never said that. For scripted use, like we can see in your [PATCH 7/7], "cherry-pick --ff" could be a good ingredient (but even then the calling Porcelain script may already know that what is being picked is a direct descendent (rebase -i certainly should, as the last commit it processed from the todo file is at the HEAD), but for manual use case it just feels silly to assume that the end user is so stupid that s/he doesn't know the commit being picked might be a direct descendant, which ...
Mar 6, 8:55 pm 2010
Paolo Bonzini
Re: [PATCH v4 3/7] revert: add --ff option to allow fast ...
Avoiding pointless separation of histories. It's true that nowadays git-patch-id will make a good job of reconciling them, but they do look ugly in gitk. Paolo --
Mar 7, 1:34 am 2010
Junio C Hamano
Re: [PATCH v4 3/7] revert: add --ff option to allow fast ...
Sorry, but that is a not-very-useful XY answer. Why were _you_ using "cherry-pick" on a commit that is an immediate child of the current commit? What were you trying to achieve by blindly using cherry-pick even in such a case? I am sort-of guessing that "blindly" is coming from a script that doesn't bother to check if the commit you are cherry-picking is a direct child, and I do not think it is such a bad thing to allow scripts to blindly call cherry-pick that way and at the same time ...
Mar 7, 2:05 am 2010
Christian Couder
Re: [PATCH v4 3/7] revert: add --ff option to allow fast ...
The wording is: "Maybe this option could be made the default in the long run, ..." I didn't wrote something like: "This option should be made the default in the long run, ..." I really didn't know if it should or should not be made the default now or in the long run, but I thought I had to talk about it. Why? Because Paolo said that he would like it to become the default, and also because if we implement "git cherry-pick A..B" and people start to use it a lot, they may find it ...
Mar 7, 1:39 pm 2010
Thomas Anderson
error: failed to push some refs
I cloned git://github.com/symfony/symfony.git to C:/git/test-root and then cloned C:/git/test-root twice to C:/git/test-clone and C:/git/test-clone2. I modify the README file in C:/git/test-clone, stage it, commit it and then try to push it to C:/git/test-root and get this message: To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'non-fast forward' section of 'git push --help' for details. Pushing to ...
Mar 6, 7:15 pm 2010
Shawn O. Pearce
Re: error: failed to push some refs
Exactly what the message said to you: To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'non-fast forward' section of 'git push --help' for details. Someone else (your other clone) modified your project in the interim. To prevent losing their change, you need to use `git pull` to bring in their work, merge it with your own, and then you can push it to the destination. For more details, check the `git ...
Mar 6, 7:18 pm 2010
Dmitry Potapov
Re: error: failed to push some refs
I don't know much about Git Gui, but "git pull" is an equivalent of "git fetch" and "git merge", and it seems Git Gui got both Fetch "git pull" (or "git merge") will produce this conflict in your working tree, which you should resolve then and commit. (Git automatically creates a merge commit if there was no conflicts.) Dmitry --
Mar 7, 2:43 am 2010
Thomas Anderson
Re: error: failed to push some refs
How do I do "git pull" with Git Gui? And in any event, if there's a conflict, I wouldn't want to overwrite my code with the code on the server - I'd want to view a diff so that I might resolve the conflict by hand. --
Mar 6, 10:04 pm 2010
Thomas Anderson
Re: a few beginner git questions
How, then, do I update code? ie. I perform my initial clone, make some changes and commit / push them. Someone else then comes along, makes some changes and commits them. The next day, I do Remote -> Fetch from -> origin to update my code to the latest in Git but c:\git\test\clone\README is exactly the same as it was before. How do I update the initial clone such that I can edit the updated files? --
Mar 6, 10:02 pm 2010
Thomas Anderson
Re: a few beginner git questions
What's the difference, then, between doing "stage, stage, commit" as opposed to "stage, commit"? Why not just make all commits stage automatically? --
Mar 6, 7:23 pm 2010
Dmitry Potapov
Re: a few beginner git questions
There are a few ways to do that. It depends on what you actually wants. First of all, you can merge 'origin/master' (or whatever its name). If you do not have any local commit then merge will just fast-forward your branch to the same point. However, if you do have changes, then it will create a new merge commit. If you have many such merge commits, it can make the upstream unhappy, because your changes are intervene with merges, so it is more difficult to inspect your actual ...
Mar 7, 1:50 am 2010
Dmitry Potapov
Re: a few beginner git questions
Probably none... If you stage twice the exactly same file, it does not change anything. But if you "stage, stage" means to stage two different files while "stage" is to stage just one then the outcome will be The goal of the stage area is to mark what changes you want to commit. So, one commit will contain only one semantic change and not everything what you have in your working tree at that moment. CVS also allows to not commit all changes at the same time (you can specify what files ...
Mar 7, 2:08 am 2010
Junio C Hamano
Re: a few beginner git questions
"git add file" is a way to let you say "I have examined the changes since the last commit to this file, and I do not want to see them in the output from my later invocations of 'git diff'". The intent is to let you focus on one detail without getting distracted by other changes. So typically you repeat the following steps: - change your files in the working tree; - run 'git diff' to check your progress _incrementally_; and - run 'git add that-file' to mark that the changes so far is ...
Mar 7, 2:39 am 2010
Linus Torvalds
Re: core.autocrlf considered half-assed
I do agree. It would probably have been a good idea to mark the CRLF status in the index, but we didn't. And crlf isn't actually the _only_ thing that can cause confusion, the 'ident' and 'filter' can do the same thing. One option might be to have "git config" know about crlf, so that if you change crlf state with 'git config' rather than manually, we could at least _warn_ about the effects and tell people that they may need to do a full new checkout (or reset the stat info in the ...
Mar 7, 4:45 pm 2010
Dmitry Potapov
Re: core.autocrlf considered half-assed
Well, I agree there are some issues with it. In particularly, when someone changes core.autocrlf in his/her repository, and then git behavior is outright confusing. IMHO, the nuts of the problem is that does not store in the index how files were checkout. Instead it uses core.autocrlf, which specifies how the user _wants_ files to be check- out. So, when the autocrlf option changes, things get very confusing. I did, and I have not noticed any problem with that. git init git config ...
Mar 7, 2:27 am 2010
Junio C Hamano
Re: [PATCH] Documentation: reset: describe new "--keep" option
Thanks. With the example I think I can tell others that this at least has one known use case that is not totally whacky. I haven't re-read Peter Baumann's comments that you dismissed as a mis-reading of your added documentation, but if somebody _can_ misread what you wrote, that is a sign that it has a room to be improved for clarity. --
Mar 6, 10:52 pm 2010
Christian Couder
Re: [PATCH] Documentation: reset: describe new "--keep" option
what about: --keep:: Resets the index to match the tree recorded by the named commit, but changed files in the working tree are kept untouched. Aborts if the reset would touch any of them. ? Thanks, Christian. --
Mar 7, 1:38 pm 2010
Junio C Hamano Mar 6, 9:01 pm 2010
Junio C Hamano
Re: [PATCH] git status: Show detailed dirty status of su ...
Can we do this additional line only when there is a submodule involved in the changes? The whole point of "collect first and then print" is so that we can compute things like "has_deleted" before starting to emit any output to intelligently give an appropriate advice message, and it feels silly to say submodules to users who don't even use any submodule. I have a suspicion that the majority of users may not even know nor care what a It indeed does sound like DIFF_OPT_* than DIFF_FORMAT_*. ...
Mar 6, 10:41 pm 2010
Jens Lehmann
[PATCH v2] git status: Show detailed dirty status of sub ...
Since 1.7.0 there a three reasons a submodule is considered modified against the work tree: It contains new commits, modified content or untracked content. Lets show all reasons in the long format of git status, so the user can better asses the nature of the modification. This change does not affect the short and porcelain formats. Two new members are added to "struct wt_status_change_data" to store the information gathered by run_diff_files(). wt-status.c uses the new ...
Mar 7, 1:03 pm 2010
Junio C Hamano Mar 6, 9:00 pm 2010
Mark Lodato
Re: [PATCH] Fix indentation problem in git-ls-files(1)
Yes, the documentation is lacking here. I believe we official support AsciiDoc 8.2.7 - this is what the builds on kernel.org use. Here's a cheatsheet for that version: http://powerman.name/doc/asciidoc-827 Hopefully the following will clarify things for the future: Use ';;' instead of ':::' for a nested list. The former was added in AsciiDoc 5.0.9; the latter in 8.3.5. For horizontal lists, put the term and definition on the same line *and* prefix it with [horizontal]. Before ...
Mar 7, 10:27 am 2010
Junio C Hamano
Re: [PATCH] Fix indentation problem in git-ls-files(1)
FYI, the machine documentation set is autogenerated at k.org uses 8.2.5 The only rule we had so far is "try to mimic existing text around what you are changing", and "don't try to be original nor fancy by using features that are not used in existing text anywhere", I agree it would be helpful to have more concrete tips on what to avoid, and conventions on what particular typesetting conventions we chose for various parts of speech. --
Mar 7, 11:38 am 2010
Johannes Schindelin Mar 7, 3:13 pm 2010
Erik Faye-Lund
Re: [PATCH 2/4] format-patch: use a string_list for headers
Do we really use this C99 feature (designated initializers)? I think it will break MSVC builds, at least... Perhaps some other non-gcc platforms as well? -- Erik "kusma" Faye-Lund --
Mar 7, 2:44 pm 2010
Stephen Boyd
[PATCHv2 0/3] format-patch and send-email ignoring confi ...
Changes since v1: * No more initializers * Better tests for send-email * Dropped first patch Stephen Boyd (3): format-patch: use a string_list for headers format-patch: add --no-cc, --no-to, and --no-add-headers send-email: add --no-cc, --no-to, and --no-bcc builtin-log.c | 94 +++++++++++++++++++++++++---------------------- git-send-email.perl | 14 +++++-- t/t4014-format-patch.sh | 38 +++++++++++++++++++ t/t9001-send-email.sh | 66 ...
Mar 7, 3:46 pm 2010
Stephen Boyd
Re: [PATCH] Add tests for git format-patch --to and form ...
The same applies to the fomat.headers and format.cc config options. How is this different? --
Mar 6, 5:06 pm 2010
Miklos Vajna
Re: [PATCH] Add tests for git format-patch --to and form ...
I think having multiple Cc: and custom headers is a regular use case, while having multiple To: headers is rare.
Mar 6, 6:20 pm 2010
Junio C Hamano
Re: [PATCH] Add tests for git format-patch --to and form ...
Not different. Perhaps we should fix them now you noticed they share the same problem? An obvious alternative is to keep format.to not get overriden by --to as the original patch did; that would at least make the handling between config and option consistent inside the command, but at the same time, it means format-patch behaves differently from everything else in git. I don't have strong preference either way myself, and while I know "fixing" the ones you listed would affect existing ...
Mar 6, 8:42 pm 2010
Stephen Boyd
Re: [PATCH] Add tests for git format-patch --to and form ...
Actually, I think the same applies to send-email too? There's sendemail.to and sendemail.cc which can't be overridden. At least the email associated commands are all quirky ;-) Honestly though, I think you're right about fixing them. We have the option of making them consistent with the rest of git with a little bit of work. If you say --no-cc or --no-add-headers or --no-to the respective config should be overriden. If you say --to or --cc or --add-headers it should be appended. I doubt ...
Mar 7, 2:43 am 2010
Junio C Hamano
Re: [PATCH] Add tests for git format-patch --to and form ...
That sounds like a sensible and practical way out, as it won't break existing setup that expects the additive behaviour these two command somehow ended up with, while allowing --no-* to override the config when necessary. --
Mar 7, 11:38 am 2010
Stephen Boyd
[PATCH 0/4] format-patch and send-email ignoring config ...
Ok this does the --no-* thing to allow the user to say "I want to ignore the config settings this time". I couldn't think of a better way to implement appending and overriding without having to say --no-to and --to in the same command line invocation. Seems to work ok though. My perl is pretty bad so please check send-email. You get an ancient bugfix for free too. Enjoy. Stephen Boyd (4): send-email: actually add bcc headers format-patch: use a string_list for headers format-patch: ...
Mar 7, 2:33 pm 2010
Stephen Boyd
[PATCH 2/4] format-patch: use a string_list for headers
In the next patch we'll need to clear the header lists if the user specifies --no-add-headers or --no-to or --no-cc. This actually cuts down on the code a bit too. Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- I had a patch like this but using strbuf's instead. I couldn't find it... builtin-log.c | 70 +++++++++++++++++++++++++------------------------------- 1 files changed, 31 insertions(+), 39 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 5d23a67..dd8369f ...
Mar 7, 2:33 pm 2010
Stephen Boyd
[PATCH 1/4] send-email: actually add bcc headers
This bug looks ancient. In fact it doesn't look like --bcc ever worked even when it was introduced in 5806324 (Add support for --bcc to git-send-email., 2006-05-29). Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- git-send-email.perl | 7 ++++++- t/t9001-send-email.sh | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index e05455f..3d9c832 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -856,11 ...
Mar 7, 2:33 pm 2010
Stephen Boyd
[PATCH 3/4] format-patch: add --no-cc, --no-to, and --no ...
These new options allow users to override their config settings for format.cc, format.to and format.headers respectively. These options only make git ignore the config settings and any previous command line options, so you'll still have to add more command line options to add extra headers. For example, $ cat .git/config [format] to = Someone <someone@out.there> $ git format-patch -1 --no-to --to="Someone Else <else@out.there>" would format a patch addressed to "Someone Else" and not ...
Mar 7, 2:33 pm 2010
Stephen Boyd
[PATCH 4/4] send-email: add --no-cc, --no-to, and --no-bcc
There's no way to override the sendemail.to, sendemail.cc, and sendemail.bcc config settings. Add options allowing the user to tell git to ignore the config settings and take whatever is on the command line. Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- git-send-email.perl | 14 ++++++++++---- t/t9001-send-email.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index ...
Mar 7, 2:33 pm 2010
Stephen Boyd
Re: [PATCH 1/4] send-email: actually add bcc headers
Haha. Nevermind this one, I'm blind and can't read. Need to figure out a way to test the bcc list though. --
Mar 7, 2:53 pm 2010
Stephen Boyd
[PATCHv2 2/3] format-patch: add --no-cc, --no-to, and -- ...
These new options allow users to override their config settings for format.cc, format.to and format.headers respectively. These options only make git ignore the config settings and any previous command line options, so you'll still have to add more command line options to add extra headers. For example, $ cat .git/config [format] to = Someone <someone@out.there> $ git format-patch -1 --no-to --to="Someone Else <else@out.there>" would format a patch addressed to "Someone Else" and not ...
Mar 7, 3:46 pm 2010
Stephen Boyd
[PATCHv2 3/3] send-email: add --no-cc, --no-to, and --no-bcc
There's no way to override the sendemail.to, sendemail.cc, and sendemail.bcc config settings. Add options allowing the user to tell git to ignore the config settings and take whatever is on the command line. Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- git-send-email.perl | 14 +++++++--- t/t9001-send-email.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index ...
Mar 7, 3:46 pm 2010
Stephen Boyd
Re: [PATCH 2/4] format-patch: use a string_list for headers
Figured as much. Not a problem to fix. Thanks. --
Mar 7, 2:54 pm 2010
Stephen Boyd
[PATCHv2 1/3] format-patch: use a string_list for headers
In the next patch we'll need to clear the header lists if the user specifies --no-add-headers or --no-to or --no-cc. This actually cuts down on the code a bit too. Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- builtin-log.c | 73 ++++++++++++++++++++++++++------------------------------ 1 files changed, 34 insertions(+), 39 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 5d23a67..ca241af 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -458,35 +458,28 @@ static int ...
Mar 7, 3:46 pm 2010
Bert Wesarg Mar 7, 3:30 am 2010
previous daytodaynext day
March 6, 2010March 7, 2010March 8, 2010