Git development
 help / color / mirror / Atom feed
* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Junio C Hamano @ 2006-04-19  0:56 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0604181627101.3701@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> 	git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh

This is interesting.

Yet to be born "internal diff".  Should I start one, or are you
already hacking on it?

^ permalink raw reply

* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Linus Torvalds @ 2006-04-19  0:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0604181735480.3701@g5.osdl.org>



On Tue, 18 Apr 2006, Linus Torvalds wrote:
> 
> And I thought we already disallowed ':' in branch names because cogito 
> uses them for the strange <rev>:<rev> syntax.. 

Btw, pathnames with ':' in them aren't a problem. It's only revision
names that can't have ':' in them and still be used together with this 
syntax.

If you have a pathname with ':', it's fine to do

	git cat-file v1.2.4:pathname:with:colon

because the magic revision parsing only cares about the _first_ colon, and 
will split that into "v1.2.4" and "pathname:with:colon" without ever even 
looking at the other ones.

		Linus

^ permalink raw reply

* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Linus Torvalds @ 2006-04-19  0:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vy7y2csv8.fsf@assigned-by-dhcp.cox.net>



On Tue, 18 Apr 2006, Junio C Hamano wrote:
> 
> Yes, I wanted to do this myself for a while.  The only issue I
> might have is what the separator character between rev and path
> should be.

I didn't put a lot of thought into it, but using ':' not only is pretty 
visually pleasing, it also means that shell completion automatically works 
at least on bash, even without any git-specific completion rules.

That's not true for a lot of other special characters: colon really is 
special, exactly because it has been used for things like PATH separators, 
etc.

I'm a total filename completion junkie - I simply cannot type in a 
filename any more. I'll literally press <tab> to complete even short 
filenames, just because it gives me that nice confirmation of the 
existence of the filename (ie I've typed it all in, and the <tab> adds the 
space after the filename).

So to me, ':' is just clearly superior. I can't think of any other 
separator that works with filename completion and has no shell issues, 
_and_ looks logical.

And I thought we already disallowed ':' in branch names because cogito 
uses them for the strange <rev>:<rev> syntax.. 

		Linus

^ permalink raw reply

* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Junio C Hamano @ 2006-04-19  0:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0604181627101.3701@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> [ NOTE! The reason I put "RFC" in the subject rather than "PATCH" is that 
>   I'm not 100% sure this isn't just a "shiny object" of mine rather than a 
>   really useful thing to do. What do people think? Have you ever wanted to 
>   access individual files in some random revision? Do you think this is 
>   useful? I think it's cool and _may_ be useful, but I'm not going to 
>   really push this patch. Consider it a throw-away patch unless somebody 
>   else finds it intriguing enough.. ]

Yes, I wanted to do this myself for a while.  The only issue I
might have is what the separator character between rev and path
should be.

^ permalink raw reply

* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Shawn Pearce @ 2006-04-19  0:21 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: Linus Torvalds, Junio C Hamano, Git Mailing List
In-Reply-To: <46a038f90604181714j6fce1867wc17952d898f8e7ae@mail.gmail.com>

Not that my voice carries much weight, but a coworker has been
asking for this feature to be added to pg for months.  I've just
been too lazy to get around to writing the shell code to do it.
Making it part of git cat-file seems like a good idea, making it
usable by other tools like git diff just rocks.  :-)

I think its a very worthwhile addition.

Martin Langhoff <martin.langhoff@gmail.com> wrote:
> On 4/19/06, Linus Torvalds <torvalds@osdl.org> wrote:
> 
> >   What do people think? Have you ever wanted to
> >   access individual files in some random revision? Do you think this is
> >   useful?
> 
> Definitely, I've several times had to go through contortions to do
> this easily, and I've ended up turning to gitweb often to quickly see
> the state of a file at a given revision.
> 
> > With this, you can do something like
> >
> >         git cat-file blob v1.2.4:Makefile
> >
> > to get the contents of "Makefile" at revision v1.2.4.
> >
> > Now, this isn't necessarily something you really need all that often, but
> > the concept itself is actually pretty powerful. We could, for example,
> > allow things like
> >
> >         git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh
> 
> These two examples are more than enough -- I buy ;-)

-- 
Shawn.

^ permalink raw reply

* [PATCH] Document git-clone --reference
From: Shawn Pearce @ 2006-04-19  0:19 UTC (permalink / raw)
  To: git; +Cc: dwmw2
In-Reply-To: <20060418235658.GB8915@spearce.org>

The new --reference flag introduced to git-clone in
GIT 1.3.0 was not documented but is rather handy.
So document it.

Also corrected a minor issue with the documentation for the
-s flag; the info/alternates file name was spelled wrong.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

---

  Shawn Pearce <spearce@spearce.org> wrote:
  >   git clone --reference=/foo git://remote/foo
  > 
  > would do the trick.  This is new in 1.3.0.  I just noticed its also
  > not documented in 1.3.0.  :-)

 Documentation/git-clone.txt |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

base 6625864c8ce9868ba4ab41165d97084f3f04bbed
last 66a5bd88d2a8d9d64d86733852fbaba9caa756b0
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 9ac54c2..131e445 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -10,6 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git-clone' [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>]
+	  [--reference <repository>]
 	  <repository> [<directory>]
 
 DESCRIPTION
@@ -46,10 +47,18 @@ OPTIONS
 -s::
 	When the repository to clone is on the local machine,
 	instead of using hard links, automatically setup
-	.git/objects/info/alternatives to share the objects
+	.git/objects/info/alternates to share the objects
 	with the source repository.  The resulting repository
 	starts out without any object of its own.
 
+--reference <repository>::
+	If the reference repository is on the local machine
+	automatically setup .git/objects/info/alternates to
+	obtain objects from the reference repository.  Using
+	an already existing repository as an alternate will
+	require less objects to be copied from the repository
+	being cloned, reducing network and local storage costs.
+
 --quiet::
 -q::
 	Operate quietly.  This flag is passed to "rsync" and
@@ -112,6 +121,16 @@ Make a local clone that borrows from the
 ------------
 
 
+Clone from upstream while borrowing from an existing local directory::
++
+------------
+$ git clone --reference my2.6 \
+	git://git.kernel.org/pub/scm/.../linux-2.7 \
+	my2.7
+$ cd my2.7
+------------
+
+
 Create a bare repository to publish your changes to the public::
 +
 ------------
-- 
1.3.0.rc4.g8060

^ permalink raw reply related

* Re: [PATCH] git-svnimport symlink support
From: Martin Langhoff @ 2006-04-19  0:16 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Karl Hasselström, Martin Langhoff, Matthias Urlichs,
	Herbert Valerio Riedel, git
In-Reply-To: <7v3bgcngqc.fsf@assigned-by-dhcp.cox.net>

On 4/18/06, Junio C Hamano <junkio@cox.net> wrote:
> Karl, Martin, Smurf, Comments?

+1 but bear in mind that I am not learned in the ways of the SVN specials...

martin

^ permalink raw reply

* Re: [RFC] get_sha1() shorthands for blob/tree objects
From: Martin Langhoff @ 2006-04-19  0:14 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0604181627101.3701@g5.osdl.org>

On 4/19/06, Linus Torvalds <torvalds@osdl.org> wrote:

>   What do people think? Have you ever wanted to
>   access individual files in some random revision? Do you think this is
>   useful?

Definitely, I've several times had to go through contortions to do
this easily, and I've ended up turning to gitweb often to quickly see
the state of a file at a given revision.

> With this, you can do something like
>
>         git cat-file blob v1.2.4:Makefile
>
> to get the contents of "Makefile" at revision v1.2.4.
>
> Now, this isn't necessarily something you really need all that often, but
> the concept itself is actually pretty powerful. We could, for example,
> allow things like
>
>         git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh

These two examples are more than enough -- I buy ;-)


martin

^ permalink raw reply

* Re: Clone with local alternates?
From: David Woodhouse @ 2006-04-18 23:59 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: git
In-Reply-To: <20060418235658.GB8915@spearce.org>

On Tue, 2006-04-18 at 19:56 -0400, Shawn Pearce wrote:
>   git clone --reference=/foo git://remote/foo
> 
> would do the trick.  This is new in 1.3.0.  I just noticed its also
> not documented in 1.3.0.  :-)

Aha. Thanks.

-- 
dwmw2

^ permalink raw reply

* Re: Clone with local alternates?
From: Shawn Pearce @ 2006-04-18 23:56 UTC (permalink / raw)
  To: David Woodhouse; +Cc: git
In-Reply-To: <1145404132.16166.97.camel@shinybook.infradead.org>

David Woodhouse <dwmw2@infradead.org> wrote:
> Often I want to clone a remote repository but would like to use an
> existing local source tree as 'alternates'. 
> 
> One way of doing this is to clone the local tree with 'git-clone -l -s',
> find the latest common commit shared with the remote tree to be fetched,
> revert to that with 'git-reset --head $last' and then pulling from the
> remote. 
> 
> Is that _really_ the best way of doing it though? It would be better if
> we just had a '--local-alternates=/foo' option to git-clone when cloning
> a remote repository.

  git clone --reference=/foo git://remote/foo

would do the trick.  This is new in 1.3.0.  I just noticed its also
not documented in 1.3.0.  :-)

-- 
Shawn.

^ permalink raw reply

* Clone with local alternates?
From: David Woodhouse @ 2006-04-18 23:48 UTC (permalink / raw)
  To: git

Often I want to clone a remote repository but would like to use an
existing local source tree as 'alternates'. 

One way of doing this is to clone the local tree with 'git-clone -l -s',
find the latest common commit shared with the remote tree to be fetched,
revert to that with 'git-reset --head $last' and then pulling from the
remote. 

Is that _really_ the best way of doing it though? It would be better if
we just had a '--local-alternates=/foo' option to git-clone when cloning
a remote repository.

-- 
dwmw2

^ permalink raw reply

* [RFC] get_sha1() shorthands for blob/tree objects
From: Linus Torvalds @ 2006-04-18 23:45 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List



[ NOTE! The reason I put "RFC" in the subject rather than "PATCH" is that 
  I'm not 100% sure this isn't just a "shiny object" of mine rather than a 
  really useful thing to do. What do people think? Have you ever wanted to 
  access individual files in some random revision? Do you think this is 
  useful? I think it's cool and _may_ be useful, but I'm not going to 
  really push this patch. Consider it a throw-away patch unless somebody 
  else finds it intriguing enough.. ]

This is a fairly straightforward patch to allow "get_sha1()" to also have 
shorthands for tree and blob objects.

The syntax is very simple and intuitive: you can specify a tree or a blob 
by simply specifying <revision>:<path>, and get_sha1() will do the SHA1 
lookup from the tree for you.

You can currently do it with "git ls-tree <rev> <path>" and parsing the 
output, but that's actually pretty awkward.

With this, you can do something like

	git cat-file blob v1.2.4:Makefile

to get the contents of "Makefile" at revision v1.2.4.

Now, this isn't necessarily something you really need all that often, but 
the concept itself is actually pretty powerful. We could, for example, 
allow things like

	git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh

to see the difference between two arbitrary files in two arbitrary 
revisions. To do that, the only thing we'd have to do is to make 
git-diff-tree accept two blobs to diff, in addition to the two trees it 
now expects.

[ IOW, don't get me wrong: the get_sha1() parsing is just the first step, 
  and does _not_ allow that "git diff" syntax to work yet. It parses the 
  object names fine, but git-diff-tree will currently exit with a "fatal: 
  unable to read source tree" error message because the objects aren't 
  tree objects ]

			Linus
---
diff --git a/sha1_name.c b/sha1_name.c
index 4f92e12..0cd1139 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -3,6 +3,7 @@ #include "tag.h"
 #include "commit.h"
 #include "tree.h"
 #include "blob.h"
+#include "diff.h"
 
 static int find_short_object_filename(int len, const char *name, unsigned char *sha1)
 {
@@ -449,12 +450,76 @@ static int get_sha1_1(const char *name, 
 	return get_short_sha1(name, len, sha1, 0);
 }
 
+static int get_tree_entry(const unsigned char *, const char *, unsigned char *);
+
+static int find_tree_entry(struct tree_desc *t, const char *name, unsigned char *result)
+{
+	int namelen = strlen(name);
+	while (t->size) {
+		const char *entry;
+		const unsigned char *sha1;
+		int entrylen, cmp;
+		unsigned mode;
+
+		sha1 = tree_entry_extract(t, &entry, &mode);
+		update_tree_entry(t);
+		entrylen = strlen(entry);
+		if (entrylen > namelen)
+			continue;
+		cmp = memcmp(name, entry, entrylen);
+		if (cmp > 0)
+			continue;
+		if (cmp < 0)
+			break;
+		if (entrylen == namelen) {
+			memcpy(result, sha1, 20);
+			return 0;
+		}
+		if (name[entrylen] != '/')
+			continue;
+		if (!S_ISDIR(mode))
+			break;
+		if (++entrylen == namelen) {
+			memcpy(result, sha1, 20);
+			return 0;
+		}
+		return get_tree_entry(sha1, name + entrylen, result);
+	}
+	return -1;
+}
+
+static int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned char *sha1)
+{
+	int retval;
+	void *tree;
+	struct tree_desc t;
+
+	tree = read_object_with_reference(tree_sha1, tree_type, &t.size, NULL);
+	if (!tree)
+		return -1;
+	t.buf = tree;
+	retval = find_tree_entry(&t, name, sha1);
+	free(tree);
+	return retval;
+}
+
 /*
  * This is like "get_sha1_basic()", except it allows "sha1 expressions",
  * notably "xyz^" for "parent of xyz"
  */
 int get_sha1(const char *name, unsigned char *sha1)
 {
+	int ret;
+
 	prepare_alt_odb();
-	return get_sha1_1(name, strlen(name), sha1);
+	ret = get_sha1_1(name, strlen(name), sha1);
+	if (ret < 0) {
+		const char *cp = strchr(name, ':');
+		if (cp) {
+			unsigned char tree_sha1[20];
+			if (!get_sha1_1(name, cp-name, tree_sha1))
+				return get_tree_entry(tree_sha1, cp+1, sha1);
+		}
+	}
+	return ret;
 }

^ permalink raw reply related

* [Announce] GIT 1.3.0
From: Junio C Hamano @ 2006-04-18 21:55 UTC (permalink / raw)
  To: git; +Cc: linux-kernel

The latest feature release GIT 1.3.0 is available at the usual places:

	http://www.kernel.org/pub/software/scm/git/

	git-1.3.0.tar.{gz,bz2}			(tarball)
	RPMS/$arch/git-*-1.3.0-1.$arch.rpm	(RPM)


There are many fixes and enhancements all over the place, and here is
only a list of notable user-visible changes in 1.3.0 since 1.2.6:

 - git-cvsserver (Martin Langhoff).

   This allows you to make your git repo accessible from CVS clients.

 - Annotate/blame (Ryan Anderson and Fredrik Kuivinen).

   These are alternate implementations of cvs annotate
   equivalent.  One of them probably needs to be eventually
   retired, but for now they are kept while both of them
   still have room for improvements.

 - builtin diff generation is now truly built-in.  We do not
   rely on GNU diff anymore (Linus and Davide Libenzi).

   This unfortunately makes GIT_DIFF_OPTS less useful; it can
   only take -u<n> or --unified=<n> and nothing else.

 - diff family acquired --stat, --patch-with-stat and --patch-with-raw
   output formats (Johannes Schindelin, Petr Baudis).

 - git-log command now takes diff options to act as a
   replacement for git-whatchanged.

 - rename detector was simplified and got faster (Linus and me).

 - clone --use-separate-remote; a repository cloned with this
   flag will copy the upstream branch heads under .git/remotes/origin/,
   not .git/heads/.  You will get the default "master" branch
   that starts out as a copy of the upstream HEAD.

 - A lot lower start-up latency for git-log, even when limiting
   by paths (Linus).

 - "git-commit --amend" can be used to amend the tip commit of the
   current branch.

 - Human date parsing is a bit friendlier to our European friends by
   preferring dd.mm.yy format over mm.dd.yy.

 - contrib/ hierarchy.  Things that are not purely git proper
   but are "around git" are shipped with git.  Current
   piggybackers are:

   - Two Emacs interfaces (Alexandre Julliard)
   - Alternative SVN interface (Eric Wong)
   - Alternative repository viewer (Aneesh Kumar)

----------------------------------------------------------------
(Shortlog since v1.2.6)

A Large Angry SCM:
      Makefile fixups.

Alex Riesen:
      PATCH: simplify calls to git programs in git-fmt-merge-msg
      workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)

Alexandre Julliard:
      Add an Emacs interface in contrib.
      git-format-patch: Always add a blank line between headers and body.
      contrib/emacs: Add an Emacs VC backend.
      git.el: Portability fixes for XEmacs and Emacs CVS.
      git.el: Set default directory before running the status mode setup hooks.
      git.el: Automatically update .gitignore status.
      git.el: Added support for Signed-off-by.
      git.el: Added customize support for all parameters.
      ls-files: Don't require exclude files to end with a newline.
      git.el: More robust handling of subprocess errors when returning strings.
      git.el: Get the default user name and email from the repository config.
      git.el: Added a function to diff against the other heads in a merge.

Anand Kumria:
      git-svnimport: if a limit is specified, respect it

Aneesh Kumar K.V:
      Add contrib/gitview from Aneesh.
      Add a README for gitview
      gitview: typofix
      gitview: Read tag and branch information using git ls-remote
      gitview: Use monospace font to draw the branch and tag name
      gitview: Display the lines joining commit nodes clearly.
      gitview: Fix DeprecationWarning
      gitview: Bump the rev
      gitview: Code cleanup
      gitview: Fix the graph display .
      gitview: Fix the encoding related bug
      gitview: Remove trailing white space
      gitview: Some window layout changes.
      gitview: Set the default width of graph cell
      gitview: Use horizontal scroll bar in the tree view
      gitview: pass the missing argument _show_clicked_cb.

Carl Worth:
      git-rebase: Clarify usage statement and copy it into the actual documentation.
      New test to verify that when git-clone fails it cleans up the new directory.
      git-ls-files: Fix, document, and add test for --error-unmatch option.
      Add new git-rm command with documentation
      git-rm: Fix to properly handle files with spaces, tabs, newlines, etc.

Davide Libenzi:
      Clean-up trivially redundant diff.
      xdiff: post-process hunks to make them consistent.

Dennis Stosberg:
      Solaris 9 also wants our own unsetenv/setenv.
      Replace index() with strchr().

Dmitry V. Levin:
      git/Documentation: fix SYNOPSIS style bugs

Eric W. Biederman:
      Implement limited context matching in git-apply.

Eric Wong:
      Introducing contrib/git-svn.
      git-svn: fix revision order when XML::Simple is not loaded
      git-svn: ensure fetch always works chronologically.
      git-svn: remove files from the index before adding/updating
      git-svn: fix a typo in defining the --no-stop-on-copy option
      git-svn: allow --find-copies-harder and -l<num> to be passed on commit
      git-svn: Allow for more argument types for commit (from..to)
      git-svn: remove any need for the XML::Simple dependency
      git-svn: change ; to && in addremove()
      contrib/git-svn.txt: add a note about renamed/copied directory support
      git-svn: fix several corner-case and rare bugs with 'commit'
      contrib/git-svn: add Makefile, test, and associated ignores
      git-svn: 0.9.1: add --version and copyright/license (GPL v2+) information
      contrib/git-svn: add show-ignore command
      contrib/git-svn: optimize sequential commits to svn
      contrib/git-svn: version 0.10.0
      contrib/git-svn: tell the user to not modify git-svn-HEAD directly
      contrib/git-svn: correct commit example in manpage
      contrib/git-svn: use refs/remotes/git-svn instead of git-svn-HEAD
      git-branch: add -r switch to list refs/remotes/*
      contrib/git-svn: add -b/--branch switch for branch detection
      contrib/git-svn: several small bug fixes and changes
      contrib/git-svn: strip 'git-svn-id:' when commiting to SVN
      contrib/git-svn: allow --authors-file to be specified
      contrib/git-svn: cleanup option parsing
      contrib/git-svn: create a more recent master if one does not exist
      contrib/git-svn: avoid re-reading the repository uuid, it never changes
      contrib/git-svn: add --id/-i=$GIT_SVN_ID command-line switch
      contrib/git-svn: better documenting of CLI switches
      send-email: accept --no-signed-off-by-cc as the documentation states
      contrib/git-svn: fix a copied-tree bug in an overzealous assertion
      contrib/git-svn: fix svn compat and fetch args
      contrib/git-svn: remove the --no-stop-on-copy flag
      contrib/git-svn: fix a harmless warning on rebuild (with old repos)
      fetch,parse-remote,fmt-merge-msg: refs/remotes/* support
      ls-tree: add --abbrev[=<n>] option
      ls-files: add --abbrev[=<n>] option
      contrib/git-svn: allow rebuild to work on non-linear remote heads
      send-email: use built-in time() instead of /bin/date '+%s'
      send-email: Change from Mail::Sendmail to Net::SMTP
      send-email: try to order messages in email clients more correctly
      send-email: lazy-load Email::Valid and make it optional
      contrib/git-svn: stabilize memory usage for big fetches
      contrib/git-svn: force GIT_DIR to an absolute path
      contrib/git-svn: accept configuration via repo-config
      contrib/git-svn: documentation updates
      contrib/git-svn: ensure repo-config returns a value before using it
      contrib/git-svn: make sure our git-svn is up-to-date for test
      contrib/git-svn: handle array values correctly

Fernando J. Pereda:
      Allow building Git in systems without iconv

Francis Daly:
      AsciiDoc fix for tutorial
      Tweak asciidoc output to work with broken docbook-xsl
      Fix multi-paragraph list items in OPTIONS section
      Format tweaks for asciidoc.
      Tweaks to make asciidoc play nice.

Fredrik Kuivinen:
      Add git-blame, a tool for assigning blame.
      git-blame, take 2
      git-blame: Make the output human readable
      git-blame: Use the same tests for git-blame as for git-annotate
      Fix some inconsistencies in the docs
      Remove trailing dot after short description
      Nicer output from 'git'
      Make it possible to not clobber object.util in sort_in_topological_order (take 2)
      rev-lib: Make it easy to do rename tracking (take 2)
      blame: Rename detection (take 2)
      blame: Nicer output
      blame: Fix git-blame <directory>
      Makefile: Add TAGS and tags targets

Herbert Valerio Riedel:
      git-svnimport symlink support

J. Bruce Fields:
      Document git-rebase behavior on conflicts.
      Documentation: revise top of git man page

Jason Riedy:
      Fix typo in git-rebase.sh.
      Add ALL_LDFLAGS to the git target.

Jeff Muizelaar:
      cosmetics: change from 'See-Also' to 'See Also'
      documentation: add 'see also' sections to git-rm and git-add

Jim Radford:
      fix repacking with lots of tags

Johannes Schindelin:
      Fix cpio call
      Optionally support old diffs
      Support Irix
      Optionally work without python
      Fixes for ancient versions of GNU make
      avoid makefile override warning
      Really honour NO_PYTHON
      Fix "gmake -j"
      Use Ryan's git-annotate instead of jsannotate
      Warn about invalid refs
      Fix test case for some sed
      imap-send: Add missing #include for macosx
      Remove dependency on a file named "-lz"
      cvsimport: use git-update-ref when updating
      On some platforms, certain headers need to be included before regex.h
      Fix compile with expat, but an old curl version
      diff-options: add --stat (take 2)
      diff-options: add --stat (take 2)
      diff-options: add --patch-with-stat
      pager: do not fork a pager if PAGER is set to empty.

Jon Loeliger:
      Add git-show reference
      Call out the two different uses of git-branch and fix a typo.
      Document the default source of template files.
      Clarify git-rebase example commands.
      Reference git-commit-tree for env vars.
      Fix minor typo.
      Rewrite synopsis to clarify the two primary uses of git-checkout.
      Clarify and expand some hook documentation.
      Removed bogus "<snap>" identifier.
      Added Packing Heursitics IRC writeup.

Jonas Fonseca:
      manpages: insert two missing [verse] markers for multi-line SYNOPSIS
      repo-config: give value_ a sane default so regexec won't segfault
      Add git-annotate(1) and git-blame(1)

Josef Weidendorfer:
      git-mv: fix moves into a subdir from outside

Junio C Hamano:
      "Assume unchanged" git
      "Assume unchanged" git: do not set CE_VALID with --refresh
      ls-files: debugging aid for CE_VALID changes.
      "Assume unchanged" git: --really-refresh fix.
      ls-files: split "show-valid-bit" into a different option.
      "assume unchanged" git: documentation.
      cache_name_compare() compares name and stage, nothing else.
      git-commit: Now --only semantics is the default.
      rebase: allow a hook to refuse rebasing.
      commit: detect misspelled pathspec while making a partial commit.
      rebase: allow rebasing onto different base.
      ls-files --error-unmatch pathspec error reporting fix.
      Detect misspelled pathspec to git-add
      packed objects: minor cleanup
      topo-order: make --date-order optional.
      pack-objects: reuse data from existing packs.
      pack-objects: finishing touches.
      git-repack: allow passing a couple of flags to pack-objects.
      git-tag: -l to list tags (usability).
      Add contrib/README.
      SubmittingPatches: note on whitespaces
      pack-objects: avoid delta chains that are too long.
      Make "empty ident" error message a bit more helpful.
      Delay "empty ident" errors until they really matter.
      Keep Porcelainish from failing by broken ident after making changes.
      fmt-merge-msg: say which branch things were merged into unless 'master'
      Allow git-mv to accept ./ in paths.
      Documentation: fix typo in rev-parse --short option description.
      fmt-merge-msg: do not add excess newline at the end.
      rev-list --objects-edge
      Thin pack - create packfile with missing delta base.
      send-pack --thin: use "thin pack" delta transfer.
      Add git-push --thin.
      Use thin pack transfer in "git fetch".
      fmt-merge-msg: avoid open "-|" list form for Perl 5.6
      rerere: avoid open "-|" list form for Perl 5.6
      send-email: avoid open "-|" list form for Perl 5.6
      svnimport: avoid open "-|" list form for Perl 5.6
      cvsimport: avoid open "-|" list form for Perl 5.6
      Fix fmt-merge-msg counting.
      cherry-pick/revert: error-help message rewording.
      git-mktree: reverse of git-ls-tree.
      rev-list.c: fix non-grammatical comments.
      send-pack: do not give up when remote has insanely large number of refs.
      gitview: ls-remote invocation shellquote safety.
      pack-objects: thin pack micro-optimization.
      pack-objects: use full pathname to help hashing with "thin" pack.
      count-delta: tweak counting of copied source material.
      count-delta: fix counting of copied source.
      Tweak break/merge score to adjust to the new delta generation code.
      pack-objects: allow "thin" packs to exceed depth limits
      rev-list --objects-edge: remove duplicated edge commit output.
      rev-list --objects: use full pathname to help hashing.
      pack-objects: hash basename and direname a bit differently.
      Revert "diff-delta: produce optimal pack data"
      Build and install git-mailinfo.
      rev-list split: minimum fixup.
      apply --whitespace fixes and enhancements.
      apply: squelch excessive errors and --whitespace=error-all
      apply --whitespace: configuration option.
      git-apply --whitespace=nowarn
      Revert "Revert "diff-delta: produce optimal pack data""
      git-apply: war on whitespace -- finishing touches.
      diffcore-break: micro-optimize by avoiding delta between identical files.
      diffcore-rename: split out the delta counting code.
      diffcore-delta: stop using deltifier for packing.
      git-am: --whitespace=x option.
      diff-delta: cull collided hash bucket more aggressively.
      git-log (internal): add approxidate.
      git-log (internal): more options.
      Pretty-print tagger dates.
      war on whitespaces: documentation.
      Documentation: read-tree --aggressive
      Documentation: rev-list --objects-edge
      annotate: resurrect raw timestamps.
      setup_revisions(): handle -n<n> and -<n> internally.
      GIT-VERSION-GEN: squelch unneeded error from "cat version"
      show-branch --topics
      git-commit --amend
      git-commit: make sure we protect against races.
      diffcore-rename: similarity estimator fix.
      show-branch --topics: omit more uninteresting commits.
      count-delta: no need for this anymore.
      diffcore-break: similarity estimator fix.
      diffcore-delta: make change counter to byte oriented again.
      git-commit --amend: allow empty commit.
      Const tightening.
      verify-pack -v: show delta-chain histogram.
      blame: avoid -lm by not using log().
      blame and annotate: show localtime with timezone.
      blame: avoid "diff -u0".
      annotate/blame tests updates.
      annotate-blame test: don't "source", but say "."
      annotate-blame test: add evil merge.
      blame: unbreak "diff -U 0".
      annotate-blame: tests incomplete lines.
      pack-objects: simplify "thin" pack.
      Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
      refs.c::do_for_each_ref(): Finish error message lines with "\n"
      fsck-objects: Remove --standalone
      Fix t1200 test for breakage caused by removal of full-stop at the end of fast-forward message.
      try_to_simplify_commit(): do not skip inspecting tree change at boundary.
      repack: prune loose objects when -d is given
      git-diff: -p disables rename detection.
      diffcore-rename: somewhat optimized.
      revision traversal: --remove-empty fix.
      revision traversal: --remove-empty fix (take #2).
      diffcore-delta: make the hash a bit denser.
      diffcore-delta: tweak hashbase value.
      cvsimport: honor -i and non -i upon subsequent imports
      fetch: exit non-zero when fast-forward check fails.
      cvsimport: fix reading from rev-parse
      git-pull: run repo-config with dash form.
      unpack_delta_entry(): reduce memory footprint.
      generate-cmdlist: style cleanups.
      revamp git-clone.
      git-merge knows some strategies want to skip trivial merges
      http-fetch: nicer warning for a server with unreliable 404 status
      core.warnambiguousrefs: warns when "name" is used and both "name" branch and tag exists.
      revamp git-clone (take #2).
      get_sha1_basic(): try refs/... and finally refs/remotes/$foo/HEAD
      clone: record the remote primary branch with remotes/$origin/HEAD
      http-push.c: squelch C90 warnings.
      git-apply: do not barf when updating an originally empty file.
      rev-list --timestamp
      git-clone: typofix.
      git-pull: further safety while on tracking branch.
      git-pull: reword "impossible to fast-forward" message.
      sha1_name: warning ambiguous refs.
      sha1_name: make core.warnambiguousrefs the default.
      send-email: Identify author at the top when sending e-mail
      commit-tree: check return value from write_sha1_file()
      built-in diff: minimum tweaks
      true built-in diff: run everything in-core.
      git-push: make --thin pack transfer the default.
      add clean and ignore rules for xdiff/
      GIT 1.3.0 rc1
      rev-list --no-merges: argument parsing fix.
      rev-list: memory usage reduction.
      rev-list --boundary
      revision arguments: ..B means HEAD..B, just like A.. means A..HEAD
      revision.c "..B" syntax: constness fix
      assume unchanged git: diff-index fix.
      tree/diff header cleanup.
      rev-list --boundary: fix re-injecting boundary commits.
      Makefile: many programs now depend on xdiff/lib.a having been built.
      revision: --topo-order and --unpacked
      revision: simplify argument parsing.
      revision: --max-age alone does not need limit_list() anymore.
      git-clone: fix handling of upsteram whose HEAD does not point at master.
      GIT 1.3.0-rc2
      combine-diff: use built-in xdiff.
      combine-diff: refactor built-in xdiff interface.
      combine-diff: move the code to parse hunk-header into common library.
      blame: use built-in xdiff
      date parsing: be friendlier to our European friends.
      blame.c: fix completely broken ancestry traversal.
      Match ofs/cnt types in diff interface.
      blame -S <ancestry-file>
      Add Documentation/technical/pack-format.txt
      Thin pack generation: optimization.
      rev-list --abbrev-commit
      count-delta: match get_delta_hdr_size() changes.
      GIT 1.3.0-rc3
      git-log: match rev-list --abbrev and --abbrev-commit
      diff: fix output of total-rewrite diff.
      diffcore-rename: fix merging back a broken pair.
      log-tree: separate major part of diff-tree.
      git log [diff-tree options]...
      Retire diffcore-pathspec.
      tree-diff: do not assume we use only one pathspec
      git log --full-diff
      Retire git-log.sh
      blame and friends: adjust to multiple pathspec change.
      Retire git-log.sh (take#2)
      diff-* --patch-with-raw
      Retire git-log.sh (take #3)
      combine-diff: do not lose hunks with only deletion at end.
      combine-diff: fix hunks at the end (take #2).
      Retire t5501-old-fetch-and-upload test.
      git-commit: do not muck with commit message when no_edit is set.
      stripspace: make sure not to leave an incomplete line.
      combine-diff: type fix.
      Documentation: add a couple of missing docs.
      Makefile: $(MAKE) check-docs
      git-log: do not output excess blank line between commits
      t3600-rm: skip failed-remove test when we cannot make an unremovable file.
      Fix-up previous expr changes.
      diff --stat: no need to ask funcnames nor context.
      t5500: test fix
      stripspace: incomplete line fix (take #2)
      Retire git-log.sh (take #4)
      git-log <diff-options> <paths> documentation
      "git cmd -h" for shell scripts.
      rev-list --bisect: limit list before bisecting.
      GIT v1.3.0-rc4
      diff-tree: typefix.
      diff --stat: do not do its own three-dashes.
      diff-files --stat: do not dump core with unmerged index.
      reading $GIT_DIR/info/graft - skip comments correctly.
      rev-list --boundary: show boundary commits even when limited otherwise.
      packed_object_info_detail(): check for corrupt packfile.
      diff --stat: make sure to set recursive.
      GIT 1.3.0

Karl Hasselström:
      git-svnimport: -r adds svn revision number to commit messages
      svnimport: Mention -r in usage summary
      svnimport: Convert executable flag
      svnimport: Convert the svn:ignore property
      svnimport: Read author names and emails from a file
      Let git-svnimport's author file use same syntax as git-cvsimport's
      Save username -> Full Name <email@addr.es> map file
      git-svnimport: Don't assume that copied files haven't changed

Keith Packard:
      Provide configurable UI font for gitk

Linus Torvalds:
      Handling large files with GIT
      Handling large files with GIT
      git-merge-tree: generalize the "traverse <n> trees in sync" functionality
      Teach the "git" command to handle some commands internally
      First cut at libifying revlist generation
      Make git diff-generation use a simpler spawn-like interface
      The war on trailing whitespace
      Splitting rev-list into revisions lib, end of beginning.
      git-rev-list libification: rev-list walking
      Introduce trivial new pager.c helper infrastructure
      Tie it all together: "git log"
      Rip out merge-order and make "git log <paths>..." work again.
      get_revision(): do not dig deeper when we know we are at the end.
      git-fmt-merge-msg cleanup
      Fix up diffcore-rename scoring
      diffcore-delta: 64-byte-or-EOL ultrafast replacement.
      diffcore-delta: 64-byte-or-EOL ultrafast replacement (hash fix).
      git-apply: safety fixes
      Use a *real* built-in diff generator
      builtin-diff: \No newline at end of file.
      Fix error handling for nonexistent names
      Move "--parent" parsing into generic revision.c library code
      Make path-limiting be incremental when possible.
      revision: Fix --topo-order and --max-age with reachability limiting.
      Make "--parents" logs also be incremental
      When showing a commit message, do not lose an incomplete line.
      Use less memory in "git log"
      Clean up trailing whitespace when pretty-printing commits
      Support "git cmd --help" syntax

Lukas Sandström:
      git-fetch: print the new and old ref when fast-forwarding

Marco Costalba:
      Add a Documentation/git-tools.txt

Marco Roeland:
      imap-send: cleanup execl() call to use NULL sentinel instead of 0
      git-commit: document --amend
      xdiff/xdiffi.c: fix warnings about possibly uninitialized variables

Mark Hollomon:
      Let merge set the default strategy.

Mark Wooding:
      combine-diff: Honour --full-index.
      combine-diff: Honour -z option correctly.
      Documentation/Makefile: Some `git-*.txt' files aren't manpages.
      gitignore: Ignore some more boring things.
      contrib/emacs/Makefile: Provide tool for byte-compiling files.
      annotate-tests: override VISUAL when running tests.
      xdiff: Show function names in hunk headers.
      gitk: Use git wrapper to run git-ls-remote.
      Shell utilities: Guard against expr' magic tokens.

Martin Langhoff:
      Introducing git-cvsserver -- a CVS emulator for git.
      cvsserver: add notes on how to get a checkout under Eclipse
      cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U
      cvsserver: Eclipse compat - browsing 'modules' (heads in our case) works
      cvsserver: add notes on how to get a checkout under Eclipse
      cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U
      cvsserver: Eclipse compat - browsing 'modules' (heads in our case) works
      cvsserver: Checkout correctly on Eclipse
      annotate: fix -S parameter to take a string
      cvsserver: Eclipse compat -- now "compare with latest from HEAD" works
      cvsserver: checkout faster by sending files in a sensible order
      cvsserver: fix checkouts with -d <somedir>
      cvsserver: checkout faster by sending files in a sensible order
      cvsserver: fix checkouts with -d <somedir>
      cvsserver: nested directory creation fixups for Eclipse clients
      cvsserver: better error messages
      cvsserver: anonymous cvs via pserver support
      cvsserver: updated documentation

Martin Mares:
      gitk: Make error_popup react to Return

Matthias Urlichs:
      cvsimport: Remove master-updating code
      Don't recurse into parents marked uninteresting.

Mike McCormack:
      Allow adding arbitary lines in the mail header generated by format-patch.
      Allow format-patch to attach patches
      Document the --attach flag.
      Describe how to add extra mail header lines in mail generated by git-format-patch.
      Add git-imap-send, derived from isync 1.0.1.
      Avoid a divide by zero if there's no messages to send.
      Avoid a crash if realloc returns a different pointer.
      Add documentation for git-imap-send.

Nick Hengeveld:
      Update http-push functionality
      http-push: fix revision walk
      HTTP slot reuse fixes
      http-push: refactor remote file/directory processing
      http-push: improve remote lock management
      http-push: support for updating remote info/refs
      http-push: cleanup
      Fix broken slot reuse when fetching alternates
      http-push: add support for deleting remote branches
      http-push: don't assume char is signed
      git-ls-remote: send no-cache header when fetching info/refs
      Set HTTP user agent to git/GIT_VERSION
      http-fetch: add optional DAV-based pack list

Nicolas Pitre:
      relax delta selection filtering in pack-objects
      diff-delta: fold two special tests into one plus cleanups
      diff-delta: produce optimal pack data
      diff-delta: big code simplification
      diff-delta: bound hash list length to avoid O(m*n) behavior
      diff-delta: produce optimal pack data
      diff-delta: bound hash list length to avoid O(m*n) behavior
      diff-delta: allow reusing of the reference buffer index
      test-delta needs zlib to compile
      diff-delta: bound hash list length to avoid O(m*n) behavior
      3% tighter packs for free

Olaf Hering:
      allow double click on current HEAD id after git-pull

Paul Jakma:
      Makefile tweaks: Solaris 9+ dont need iconv / move up uname variables

Paul Mackerras:
      gitk: Make "find" on "Files" work again.
      gitk: New improved gitk
      gitk: Fix clicks on arrows on line ends
      gitk: Fix Update menu item
      gitk: Various speed improvements
      gitk: Further speedups
      gitk: Fix a bug in drawing the selected line as a thick line
      gitk: Fix display of diff lines beginning with --- or +++
      gitk: Make commitdata an array rather than a list
      gitk: Don't change cursor at end of layout if find in progress
      gitk: Make downward-pointing arrows end in vertical line segment
      gitk: Improve appearance of first child links
      gitk: Fix two bugs reported by users
      gitk: Use the new --boundary flag to git-rev-list
      gitk: Show diffs for boundary commits
      gitk: Prevent parent link from overwriting commit headline
      gitk: Allow top panes to scroll horizontally with mouse button 2
      gitk: Better workaround for arrows on diagonal line segments
      gitk: replace parent and children arrays with lists
      gitk: Add a help menu item to display key bindings
      gitk: Fix incorrect invocation of getmergediffline
      gitk: Fix bug caused by missing commitlisted elements

Pavel Roskin:
      gitview: Select the text color based on whether the entry in highlighted. Use standard font.
      Add git-clean command
      gitk: Fix searching for filenames in gitk

Peter Eriksen:
      Use blob_, commit_, tag_, and tree_type throughout.
      Replace xmalloc+memset(0) with xcalloc.

Petr Baudis:
      Properly git-bisect reset after bisecting from non-master head
      Optionally do not list empty directories in git-ls-files --others
      Support for pickaxe matching regular expressions
      Improve the git-diff-tree -c/-cc documentation
      Document --patch-with-raw
      Separate the raw diff and patch with a newline

Randal L. Schwartz:
      fix imap-send for OSX

Rene Scharfe:
      tar-tree: Use SHA1 of root tree for the basedir
      tar-tree: Introduce write_entry()
      tar-tree: Use write_entry() to write the archive contents
      tar-tree: Remove obsolete code
      tar-tree: Use the prefix field of a tar header
      Remove useless pointer update
      Fix sparse warnings about usage of 0 instead of NULL
      Fix sparse warnings about non-ANSI function prototypes

Rutger Nijlunsing:
      gitk: add key bindings for selecting first and last commit

Ryan Anderson:
      send-email: Add some options for controlling how addresses are automatically added to the cc: list.
      send-email: Add --cc
      Add git-annotate, a tool for assigning blame.
      annotate: Handle dirty state and arbitrary revisions.
      annotate: Convert all -| calls to use a helper open_pipe().
      annotate: Use qx{} for pipes on activestate.
      annotate: handle \No newline at end of file.
      annotate: Add a basic set of test cases.
      annotate: Support annotation of files on other revisions.

Sean Estabrooks:
      annotate.perl triggers rpm bug

Serge E. Hallyn:
      cleanups: Fix potential bugs in connect.c
      cleanups: Remove unused vars from combine-diff.c
      cleanups: Remove impossible case in quote.c
      cleanups: prevent leak of two strduped strings in config.c
      cleanups: remove unused variable from exec_cmd.c

Shawn Pearce:
      git ls files recursively show ignored files
      Add missing programs to ignore list
      Darwin: Ignore missing /sw/lib
      Teach git-checkout-index to read filenames from stdin.
      Prevent --index-info from ignoring -z.
      Add --temp and --stage=all options to checkout-index.
      Add missing semicolon to sed command.

Stephen Rothwell:
      gitk: allow goto heads

Timo Hirvonen:
      Use setenv(), fix warnings

Tony Luck:
      fix warning from pack-objects.c
      Re-fix compilation warnings.
      annotate should number lines starting with 1
      fix field width/precision warnings in blame.c

Yann Dirson:
      Allow empty lines in info/grafts

Yasushi SHOJI:
      Be verbose when !initial commit
      Make git-clone to take long double-dashed origin option (--origin)
      git-clone: exit early if repo isn't specified

^ permalink raw reply

* [PATCH] gitk: Add a visual tag for remote refs
From: Josef Weidendorfer @ 2006-04-18 21:53 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: GIT list

This patch partly changes the background color for remote refs.
It makes it easy to quickly distinguish remote refs from local
developer branches.

I ignore remote HEADs, as these really should be drawn as
aliases to other heads. But there is no simple way to
detect that HEADs really are aliases for other refs via
"git-ls-remote".

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>

---

To see the effect of this patch, you need remote refs in your
repository. Such refs are created when using "--use-separate-remote"
with git-clone.

IMHO showing HEAD refs as aliases to real refs would be nice to
have in gitk (What is the current branch?). Unfortunately,
"git-ls-remote", which is used in gitk, does not give the info
whether a ref is a symbolic link to another.
So for this time, I ignore remote HEADs, too. They are only confusing
as they would have been drawn now.

Josef


 gitk |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

f073dd11d6f2d473797b4c85cd4ac9758b6141b6
diff --git a/gitk b/gitk
index 87e7162..b642326 100755
--- a/gitk
+++ b/gitk
@@ -290,10 +290,16 @@ proc readrefs {} {
 	    match id path]} {
 	    continue
 	}
+	if {[regexp {^remotes/.*/HEAD$} $path match]} {
+	    continue
+	}
 	if {![regexp {^(tags|heads)/(.*)$} $path match type name]} {
 	    set type others
 	    set name $path
 	}
+	if {[regexp {^remotes/} $path match]} {
+	    set type heads
+	}
 	if {$type == "tags"} {
 	    set tagids($name) $id
 	    lappend idtags($id) $name
@@ -1718,6 +1724,14 @@ proc drawtags {id x xt y1} {
 	    set xl [expr {$xl - $delta/2}]
 	    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
 		-width 1 -outline black -fill $col -tags tag.$id
+	    if {[regexp {^(remotes/.*/|remotes/)} $tag match remoteprefix]} {
+	        set rwid [font measure $mainfont $remoteprefix]
+		set xi [expr {$x + 1}]
+		set yti [expr {$yt + 1}]
+		set xri [expr {$x + $rwid}]
+		$canv create polygon $xi $yti $xri $yti $xri $yb $xi $yb \
+			-width 0 -fill "#ffddaa" -tags tag.$id
+	    }
 	}
 	set t [$canv create text $xl $y1 -anchor w -text $tag \
 		   -font $mainfont -tags tag.$id]
-- 
1.3.0.rc4.g8060-dirty

^ permalink raw reply related

* [PATCH] Fix filename scaling for binary files
From: Jonas Fonseca @ 2006-04-18 21:26 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List

Set maximum filename length for binary files so that scaling won't be
triggered and result in invalid string access.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

---

 diff.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/diff.c b/diff.c
index b54bbfa..ddcfb84 100644
--- a/diff.c
+++ b/diff.c
@@ -250,13 +250,14 @@ static void show_stats(struct diffstat_t
 	for (i = 0; i < data->nr; i++) {
 		struct diffstat_file *file = data->files[i];
 
+		len = strlen(file->name);
+		if (max_len < len)
+			max_len = len;
+
 		if (file->is_binary || file->is_unmerged)
 			continue;
 		if (max_change < file->added + file->deleted)
 			max_change = file->added + file->deleted;
-		len = strlen(file->name);
-		if (max_len < len)
-			max_len = len;
 	}
 
 	for (i = 0; i < data->nr; i++) {

-- 
Jonas Fonseca

^ permalink raw reply related

* Re: Next problem: empty ident  <joern@limerick.(none)> not allowed
From: Linus Torvalds @ 2006-04-18 20:47 UTC (permalink / raw)
  To: Jörn Engel; +Cc: git
In-Reply-To: <20060418202525.GD25688@wohnheim.fh-wedel.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1426 bytes --]



On Tue, 18 Apr 2006, Jörn Engel wrote:
> 
> And now I have some questions:
> 1. Why didn't the environment variables work?

They do. But they just described the _author_. Git wanted the _committer_ 
to be described too.

So if you had used GIT_COMMITTER_NAME/EMAIL, everything would have been 
fine.

Notice that if you don't give any author information, git will assume that 
the committer is the author, so if you give committer information, you 
don't actually need to give author information. It "knows" that the 
committer is you, and since you don't tell it otherwise, it will think 
that you're the author too.

So the committer is always the "default author".

But the reverse is _not_ true: even if you tell git who the author is, it 
will _not_ assume that the committer is the same one. It knows that the 
committer is you, but you didn't talk about yourself, you just talked 
about the author.

That non-symmetric behaviour does make a lot of sense, if you think about 
it a while. The author is _not_ the "default committer". 

Putting your name and email in the git config file solves the problem, 
because then git knows who the committer is (and by extension, the 
"default author").

> 2. Why is there a check for commit information when I pull from some
> tree?

Because you're going to create a merge commit. It wants to know who to 
attribute that merge to. Why the committer is, in other words.

		Linus

^ permalink raw reply

* Re: Next problem: empty ident  <joern@limerick.(none)> not allowed
From: Jörn Engel @ 2006-04-18 20:40 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vu08qei2o.fsf@assigned-by-dhcp.cox.net>

On Tue, 18 April 2006 13:37:19 -0700, Junio C Hamano wrote:
> Jörn Engel <joern@wohnheim.fh-wedel.de> writes:
> 
> > And now I have some questions:
> > 1. Why didn't the environment variables work?
> > 2. Why is there a check for commit information when I pull from some
> > tree?
> 
> Because "pull" means "fetch and merge the local modifications if
> any".  When you merge (and you _did_ merge), you create a new
> commit of your own, and the commit records who committed it.
> 
> You need GIT_COMMITTER_EMAIL.

Ok.  I was stupid in two accounts.  Thanks!

Jörn

-- 
Time? What's that? Time is only worth what you do with it.
-- Theo de Raadt

^ permalink raw reply

* Re: Next problem: empty ident  <joern@limerick.(none)> not allowed
From: Junio C Hamano @ 2006-04-18 20:37 UTC (permalink / raw)
  To: Jörn Engel; +Cc: git
In-Reply-To: <20060418202525.GD25688@wohnheim.fh-wedel.de>

Jörn Engel <joern@wohnheim.fh-wedel.de> writes:

> And now I have some questions:
> 1. Why didn't the environment variables work?
> 2. Why is there a check for commit information when I pull from some
> tree?

Because "pull" means "fetch and merge the local modifications if
any".  When you merge (and you _did_ merge), you create a new
commit of your own, and the commit records who committed it.

You need GIT_COMMITTER_EMAIL.

^ permalink raw reply

* Re: Next problem: empty ident  <joern@limerick.(none)> not allowed
From: Junio C Hamano @ 2006-04-18 20:37 UTC (permalink / raw)
  To: Jörn Engel; +Cc: git
In-Reply-To: <20060418202525.GD25688@wohnheim.fh-wedel.de>

Jörn Engel <joern@wohnheim.fh-wedel.de> writes:

> And now I have some questions:
> 1. Why didn't the environment variables work?
> 2. Why is there a check for commit information when I pull from some
> tree?

Because "pull" means "fetch and merge the local modifications if
any".  When you merge (and you _did_ merge), you create a new
commit of your own, and the commit records who committed it.

You need GIT_COMMITTER_EMAIL.

Now, the normal "git log" does not verbosely show committer and
author,

^ permalink raw reply

* Next problem: empty ident  <joern@limerick.(none)> not allowed
From: Jörn Engel @ 2006-04-18 20:25 UTC (permalink / raw)
  To: git

After successfully using a central object store with git://... instead
of rsync://... (thanks to Sam and Linus), I've run into the next
problem:

$ env | grep GIT
GIT_AUTHOR_NAME=Joern Engel
GIT_OBJECT_DIRECTORY=/home/joern/.git
GIT_AUTHOR_EMAIL=joern@wh.fh-wedel.de

$ git pull git://git.infradead.org/mtd-2.6.git
Unpacking 74 objects
 100% (74/74) done
Trying really trivial in-index merge...
Wonderful.
fatal: empty ident  <joern@limerick.(none)> not allowed

Adding this to .git/config solved the problem:
[user]
	name = "Joern Engel"
	email = "joern@foo.bar"


And now I have some questions:
1. Why didn't the environment variables work?
2. Why is there a check for commit information when I pull from some
tree?

Jörn

-- 
I've never met a human being who would want to read 17,000 pages of
documentation, and if there was, I'd kill him to get him out of the
gene pool.
-- Joseph Costello

^ permalink raw reply

* Re: Confused about tracking git master
From: Seth Falcon @ 2006-04-18 19:47 UTC (permalink / raw)
  To: git
In-Reply-To: <20060418185937.GD13672@vsectoor.geht-ab-wie-schnitzel.de>

Nicolas Vilz <niv@iaglans.de> writes:
> You are trapped with the pu branch imho, like many others before *G* ... 
> simply do a 
>
> Pull: +refs/heads/pu:refs/heads/pu
>
> in your .git/remotes/origin file or remove that pu line...

Thank you!  That seems to get me going again.  But, isn't this going
to trip up other newbies?  I just tried a fresh git clone and the pu
branch comes in...

It would improve one's first impressions to not have to edit
.git/remotes/origin (although it is instructional) just to stay up to
date with git.

Cheers,

+ seth

^ permalink raw reply

* Re: [PATCH 1/7] cleanups: Fix resource leak and buffer overrun in daemon.c
From: Junio C Hamano @ 2006-04-18 19:32 UTC (permalink / raw)
  To: Serge E. Hallyn; +Cc: git
In-Reply-To: <20060418131106.GD7562@sergelap.austin.ibm.com>

"Serge E. Hallyn" <serue@us.ibm.com> writes:

> Argh, I had to pull out a sheet of paper, but you are right.  I
> misread, and the warning must be about the case where the
> snprint "[%ld] " prints out 1023 characters.

If snprintf(buf, sizeof(buf), "[%ld] ", (long) getpid()) is
judged to possibly overrun the buffer by your static analysis
tool, I think the tool is broken.  It at least should know how
big a printed long can be.  It would earn bonus points if it can
warn me when sizeof(buf) is sufficiently small, say 40 bytes,
with a message like "on future architectures with 128-bit long
this code might break" ;-).

^ permalink raw reply

* Re: Confused about tracking git master
From: Nicolas Vilz @ 2006-04-18 18:59 UTC (permalink / raw)
  To: Seth Falcon; +Cc: git
In-Reply-To: <m2wtdmg3in.fsf@ziti.fhcrc.org>

On Tue, Apr 18, 2006 at 11:08:48AM -0700, Seth Falcon wrote:
> To get updates, I _think_ all I have to do is 'git pull'.  Doing so I
> get:
> 
>     Unpacking 157 objects
>      100% (157/157) done
>     * refs/heads/todo: same as branch 'todo' of git://git.kernel.org/pub/scm/git/git
>     * refs/heads/maint: same as branch 'maint' of git://git.kernel.org/pub/scm/git/git
>     * refs/heads/origin: same as branch 'master' of git://git.kernel.org/pub/scm/git/git
>     * refs/heads/pu: does not fast forward to branch 'pu' of git://git.kernel.org/pub/scm/git/git;
>       not updating.       
> 
[..]
> 
> Is there a step I'm missing?  Or am I just misunderstanding what to
> expect?  Clarification on either of those would be appreciated.

You are trapped with the pu branch imho, like many others before *G* ... 
simply do a 

Pull: +refs/heads/pu:refs/heads/pu

in your .git/remotes/origin file or remove that pu line...

Greetings
Nicolas

^ permalink raw reply

* Re: GIT_OBJECT_DIRECTORY
From: Jörn Engel @ 2006-04-18 18:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0604181139150.3701@g5.osdl.org>

On Tue, 18 April 2006 11:47:53 -0700, Linus Torvalds wrote:
> On Tue, 18 Apr 2006, Jörn Engel wrote:
> > 
> > But it appears as if I could "cp -lr" the git tree and work with that.
> 
> That should work. I just personally fear cowlinks, because some things 
> will edit the files in place, and then you're screwed.

s/cowlinks/hardlinks/ ?

The reason for me to write the cowlink patches was exactly the fear
you are talking about.  With those patches, links are broken whenever
such a thing happens.

> I _think_ it should be ok for the .git subdirectory, but quite frankly, 
> I'm not going to guarantee it. Also, you will break the cow-linking when 
> you ever re-pack either the source or the destination, so you'd actually 

In that case, cowlinks should still turn a blatant bug into some
wasted space - which is a hell of a lot better.

> 	# cow-link the checked-out state

And this happens to be a problem.  Creating the links when the copy is
created is simple.  Detecting identical files and linking them after
the fact is racy, complicated, racy and, well, racy.  I wouldn't want
to touch it with a ten foot pole.  Not without kernel support.

Jörn

-- 
Linux is more the core point of a concept that surrounds "open source"
which, in turn, is based on a false concept. This concept is that
people actually want to look at source code.
-- Rob Enderle

^ permalink raw reply

* Re: GIT_OBJECT_DIRECTORY
From: Linus Torvalds @ 2006-04-18 18:47 UTC (permalink / raw)
  To: Jörn Engel; +Cc: git
In-Reply-To: <20060418182650.GB25688@wohnheim.fh-wedel.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 923 bytes --]



On Tue, 18 Apr 2006, Jörn Engel wrote:
> 
> But it appears as if I could "cp -lr" the git tree and work with that.

That should work. I just personally fear cowlinks, because some things 
will edit the files in place, and then you're screwed.

I _think_ it should be ok for the .git subdirectory, but quite frankly, 
I'm not going to guarantee it. Also, you will break the cow-linking when 
you ever re-pack either the source or the destination, so you'd actually 
be _better_ off with something that does

	# clone the git directories by hand, no checkout (-n).
	git clone -l -s -n src dst

	# cow-link the checked-out state
	(cd src ; git ls-files | cpio -pudml dst)

	# make sure to refresh the index
	git update-index --refresh

or something like that.

TOTALLY UNTESTED!!  (And you need to have made "dst" be an absolute path, 
of course, since we want it to work even after we've done the "cd src" 
thing).

		Linus

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox