Git development
 help / color / mirror / Atom feed
* broken link - what is it?
From: Michael S. Tsirkin @ 2007-07-24 10:24 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Junio C Hamano, git

I seem to have a corrupted repo:

>git-fsck --full
broken link from    tree c907c09fee3e14adbc17c3e9d54c060b520303ba
              to    blob dfaa7049e9ebe227cfcffc49d3de16716764bcbd
broken link from    tree 00c8e1ed2de45bb57bd5482bf258efdfc28d5192
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
broken link from    tree ee2144e186e78ce1ebbecfe10a6551ebc407f025
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
missing blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
broken link from    tree 79f14c41a69bf43069a6828769d8ee3ce86f6daf
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
missing blob dfaa7049e9ebe227cfcffc49d3de16716764bcbd
broken link from    tree 5c3bb6f86743ced765fbcabe0ade6fc0a7e0f01a
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
broken link from    tree 5f553908b5e2dfb6d53964c5e01ff596b91a61ba
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
broken link from    tree 6f48bab6e09ae3d92cfdec8b6dec77b65a0968a7
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424
broken link from    tree 21fade55d91e78863920ecfe58767e007dcd4e74
              to    blob 5909ec5314cebf884c03b2d85c7919eb40b5b424

man git-fsck does not document what "broken link" is.
Can someone enlighten me please?

-- 
MST

^ permalink raw reply

* StGIT (or guilt) + git-svn?
From: Steven Grimm @ 2007-07-24 10:20 UTC (permalink / raw)
  To: 'git'

Anyone have experience mixing git-svn with either StGIT or guilt? A 
coworker of mine was asking if he could do local versioning of files he 
has no intention of committing to svn. He wanted a ".git-svnignore" kind 
of scheme but I think his use case sounds like the sort of thing StGIT 
and guilt are designed for. What I'm not sure about is whether git-svn 
will confuse those tools or vice versa. I don't think I've ever seen 
that combo discussed on the list.

-Steve

^ permalink raw reply

* Re: [PATCH] git log -g: Complain, but do not fail, when no reflogs are there
From: Alex Riesen @ 2007-07-24 10:17 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, gitster
In-Reply-To: <Pine.LNX.4.64.0707241014500.14781@racer.site>

On 7/24/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Tue, 24 Jul 2007, Alex Riesen wrote:
> > On 7/24/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > >
> > > When asking "git log -g --all", clearly you want to see only those refs
> > > that do have reflogs, but you do not want it to fail, either.
> > >
> > > So instead of die()ing, complain about it, but move on to the other refs.
> > >
> >
> > I believe you wont even see these complaints: the pager will start shortly
> > afterwards and fill the screen with commits, completely hiding the errors.
>
> You can see it briefly, but it is hidden by default.  Which is a good
> thing.  If you set the pager to "cat" (which is happily not the default!)
> you can see them clearly.  Until you are swamped by the rest of the
> output.
>
> Maybe this is a feature?
>

Maybe. I can't see it at all. Should I downgrade something or propose
a patch to put some delay after this error? I think not.

I think second Junios suggestion, but this is of course no
difference to me.

^ permalink raw reply

* Re: Git help for kernel archeology, suppress diffs caused by CVS keyword expansion
From: Jakub Narebski @ 2007-07-24 10:16 UTC (permalink / raw)
  To: git
In-Reply-To: <Pine.LNX.4.64.0707240214500.14781@racer.site>

[Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org]

Johannes Schindelin wrote:

> On Mon, 23 Jul 2007, Jon Smirl wrote:
> 
>> Thanks for working on this. I'd like to see it added to git toolkit. 
> 
> I plan to submit it to patchutils instead, since this is not really 
> dependent on git.

Could you also add it to contrib/ area, please?
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* Re: [PATCH] Add a 1-second sleep to git-cvsexportcommit test
From: Junio C Hamano @ 2007-07-24 10:14 UTC (permalink / raw)
  To: Robin Rosenberg
  Cc: Simon 'corecode' Schubert, Jason Sewall, git, raa.lkml
In-Reply-To: <200707241134.31950.robin.rosenberg.lists@dewire.com>

Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:

> Tail of the first cvsexportcommit invocation (trash/cvswork/a) from the place where it writes the last file
> into the CVS repo.
>  
> 27778 write(7, "/with spaces.png/1.1/Tue Jul 24 "..., 99) = 99
> 27778 close(7)                          = 0
> 27778 munmap(0xb7f15000, 4096)          = 0
> 27778 rename("CVS/Entries.Backup", "CVS/Entries") = 0
> 27778 unlink("CVS/Entries.Log")         = 0
> 27778 fchdir(6)                         = 0
> 27778 close(6)                          = 0
> ...
> 27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> 27778 time(NULL)                        = 1185268822
> 27778 gettimeofday({1185268822, 953340}, NULL) = 0
>
> Here CVS sleeps. The amount varies between invocations since it
> only sleeps enough for the seconds to wrap.

Makes one wonder what it would do if you are on a filesystem
with coarser-than-a-second timestamp resolution.

^ permalink raw reply

* [PATCH] git.el: Support for incremental status updates.
From: Alexandre Julliard @ 2007-07-24 10:12 UTC (permalink / raw)
  To: git

When we know which files have been modified, we can now run diff-index
or ls-files with a file list to refresh only the specified files
instead of the whole project.

This also allows proper refreshing of files upon add/delete/resolve,
instead of making assumptions about the new file state.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 contrib/emacs/git.el |  224 +++++++++++++++++++++++++-------------------------
 1 files changed, 113 insertions(+), 111 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index d7f4316..53dd703 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -314,8 +314,8 @@ and returns the process output as a string."
     (sort-lines nil (point-min) (point-max))
     (save-buffer))
   (when created
-    (git-run-command nil nil "update-index" "--info-only" "--add" "--" (file-relative-name ignore-name)))
-  (git-add-status-file (if created 'added 'modified) (file-relative-name ignore-name))))
+    (git-run-command nil nil "update-index" "--add" "--" (file-relative-name ignore-name)))
+  (git-update-status-files (list (file-relative-name ignore-name)) 'unknown)))
 
 ; propertize definition for XEmacs, stolen from erc-compat
 (eval-when-compile
@@ -523,23 +523,39 @@ and returns the process output as a string."
                   "  " (git-escape-file-name (git-fileinfo->name info))
                   (git-rename-as-string info))))
 
-(defun git-parse-status (status)
-  "Parse the output of git-diff-index in the current buffer."
-  (goto-char (point-min))
-  (while (re-search-forward
-          ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMU]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
-          nil t 1)
-    (let ((old-perm (string-to-number (match-string 1) 8))
-          (new-perm (string-to-number (match-string 2) 8))
-          (state (or (match-string 4) (match-string 6)))
-          (name (or (match-string 5) (match-string 7)))
-          (new-name (match-string 8)))
-      (if new-name  ; copy or rename
-          (if (eq ?C (string-to-char state))
-              (ewoc-enter-last status (git-create-fileinfo 'added new-name old-perm new-perm 'copy name))
-            (ewoc-enter-last status (git-create-fileinfo 'deleted name 0 0 'rename new-name))
-            (ewoc-enter-last status (git-create-fileinfo 'added new-name old-perm new-perm 'rename name)))
-        (ewoc-enter-last status (git-create-fileinfo (git-state-code state) name old-perm new-perm))))))
+(defun git-insert-fileinfo (status info &optional refresh)
+  "Insert INFO in the status buffer, optionally refreshing an existing one."
+  (let ((node (and refresh
+                   (git-find-status-file status (git-fileinfo->name info)))))
+    (setf (git-fileinfo->needs-refresh info) t)
+    (when node   ;preserve the marked flag
+      (setf (git-fileinfo->marked info) (git-fileinfo->marked (ewoc-data node))))
+    (if node (ewoc-set-data node info) (ewoc-enter-last status info))))
+
+(defun git-run-diff-index (status files)
+  "Run git-diff-index on FILES and parse the results into STATUS.
+Return the list of files that haven't been handled."
+  (let ((refresh files))
+    (with-temp-buffer
+      (apply #'git-run-command t nil "diff-index" "-z" "-M" "HEAD" "--" files)
+      (goto-char (point-min))
+      (while (re-search-forward
+              ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMU]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
+              nil t 1)
+        (let ((old-perm (string-to-number (match-string 1) 8))
+              (new-perm (string-to-number (match-string 2) 8))
+              (state (or (match-string 4) (match-string 6)))
+              (name (or (match-string 5) (match-string 7)))
+              (new-name (match-string 8)))
+          (if new-name  ; copy or rename
+              (if (eq ?C (string-to-char state))
+                  (git-insert-fileinfo status (git-create-fileinfo 'added new-name old-perm new-perm 'copy name) refresh)
+                (git-insert-fileinfo status (git-create-fileinfo 'deleted name 0 0 'rename new-name) refresh)
+                (git-insert-fileinfo status (git-create-fileinfo 'added new-name old-perm new-perm 'rename name)) refresh)
+            (git-insert-fileinfo status (git-create-fileinfo (git-state-code state) name old-perm new-perm) refresh))
+          (setq files (delete name files))
+          (when new-name (setq files (delete new-name files)))))))
+  files)
 
 (defun git-find-status-file (status file)
   "Find a given file in the status ewoc and return its node."
@@ -548,32 +564,59 @@ and returns the process output as a string."
       (setq node (ewoc-next status node)))
     node))
 
-(defun git-parse-ls-files (status default-state &optional skip-existing)
-  "Parse the output of git-ls-files in the current buffer."
-  (goto-char (point-min))
-  (let (infolist)
-    (while (re-search-forward "\\([HMRCK?]\\) \\([^\0]*\\)\0" nil t 1)
-      (let ((state (match-string 1))
-            (name (match-string 2)))
-        (unless (and skip-existing (git-find-status-file status name))
-          (push (git-create-fileinfo (or (git-state-code state) default-state) name) infolist))))
-    (dolist (info (nreverse infolist))
-      (ewoc-enter-last status info))))
-
-(defun git-parse-ls-unmerged (status)
-  "Parse the output of git-ls-files -u in the current buffer."
-  (goto-char (point-min))
-  (let (files)
-    (while (re-search-forward "[0-7]\\{6\\} [0-9a-f]\\{40\\} [123]\t\\([^\0]+\\)\0" nil t)
-      (let ((node (git-find-status-file status (match-string 1))))
-        (when node (push (ewoc-data node) files))))
-    (git-set-files-state files 'unmerged)))
-
-(defun git-add-status-file (state name)
-  "Add a new file to the status list (if not existing already) and return its node."
+(defun git-run-ls-files (status files default-state &rest options)
+  "Run git-ls-files on FILES and parse the results into STATUS.
+Return the list of files that haven't been handled."
+  (let ((refresh files))
+    (with-temp-buffer
+      (apply #'git-run-command t nil "ls-files" "-z" "-t" (append options (list "--") files))
+      (goto-char (point-min))
+      (while (re-search-forward "\\([HMRCK?]\\) \\([^\0]*\\)\0" nil t 1)
+        (let ((state (match-string 1))
+              (name (match-string 2)))
+          (git-insert-fileinfo status (git-create-fileinfo (or (git-state-code state) default-state) name) refresh)
+          (setq files (delete name files))))))
+  files)
+
+(defun git-run-ls-unmerged (status files)
+  "Run git-ls-files -u on FILES and parse the results into STATUS."
+  (with-temp-buffer
+    (apply #'git-run-command t nil "ls-files" "-z" "-u" "--" files)
+    (goto-char (point-min))
+    (let (unmerged-files)
+      (while (re-search-forward "[0-7]\\{6\\} [0-9a-f]\\{40\\} [123]\t\\([^\0]+\\)\0" nil t)
+        (let ((node (git-find-status-file status (match-string 1))))
+          (when node (push (ewoc-data node) unmerged-files))))
+      (git-set-files-state unmerged-files 'unmerged))))
+
+(defun git-update-status-files (files &optional default-state)
+  "Update the status of FILES from the index."
   (unless git-status (error "Not in git-status buffer."))
-  (or (git-find-status-file git-status name)
-      (ewoc-enter-last git-status (git-create-fileinfo state name))))
+  (let* ((status git-status)
+         (remaining-files
+          (if (git-empty-db-p) ; we need some special handling for an empty db
+              (git-run-ls-files status files 'added "-c")
+            (git-run-diff-index status files))))
+    (git-run-ls-unmerged status files)
+    (when (and (or (not files) remaining-files)
+               (file-readable-p ".git/info/exclude"))
+      (setq remaining-files (git-run-ls-files status remaining-files
+                                              'unknown "-o" "--exclude-from=.git/info/exclude"
+                                              (concat "--exclude-per-directory=" git-per-dir-ignore-file))))
+    ; mark remaining files with the default state (or remove them if nil)
+    (when remaining-files
+      (if default-state
+          (ewoc-map (lambda (info)
+                      (when (member (git-fileinfo->name info) remaining-files)
+                        (git-set-files-state (list info) default-state))
+                      nil)
+                    status)
+        (ewoc-filter status
+                     (lambda (info files)
+                       (not (member (git-fileinfo->name info) files)))
+                     remaining-files)))
+    (git-refresh-files)
+    (git-refresh-ewoc-hf status)))
 
 (defun git-marked-files ()
   "Return a list of all marked files, or if none a list containing just the file at cursor position."
@@ -789,54 +832,34 @@ and returns the process output as a string."
 (defun git-add-file ()
   "Add marked file(s) to the index cache."
   (interactive)
-  (let ((files (git-marked-files-state 'unknown)))
+  (let ((files (git-get-filenames (git-marked-files-state 'unknown))))
     (unless files
-      (push (ewoc-data
-             (git-add-status-file 'added (file-relative-name
-                                          (read-file-name "File to add: " nil nil t))))
-            files))
-    (apply #'git-run-command nil nil "update-index" "--info-only" "--add" "--" (git-get-filenames files))
-    (git-set-files-state files 'added)
-    (git-refresh-files)))
+      (push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
+    (apply #'git-run-command nil nil "update-index" "--add" "--" files)
+    (git-update-status-files files 'uptodate)))
 
 (defun git-ignore-file ()
   "Add marked file(s) to the ignore list."
   (interactive)
-  (let ((files (git-marked-files-state 'unknown)))
+  (let ((files (git-get-filenames (git-marked-files-state 'unknown))))
     (unless files
-      (push (ewoc-data
-             (git-add-status-file 'unknown (file-relative-name
-                                            (read-file-name "File to ignore: " nil nil t))))
-            files))
-    (dolist (info files) (git-append-to-ignore (git-fileinfo->name info)))
-    (git-set-files-state files 'ignored)
-    (git-refresh-files)))
+      (push (file-relative-name (read-file-name "File to ignore: " nil nil t)) files))
+    (dolist (f files) (git-append-to-ignore f))
+    (git-update-status-files files 'ignored)))
 
 (defun git-remove-file ()
   "Remove the marked file(s)."
   (interactive)
-  (let ((files (git-marked-files-state 'added 'modified 'unknown 'uptodate)))
+  (let ((files (git-get-filenames (git-marked-files-state 'added 'modified 'unknown 'uptodate))))
     (unless files
-      (push (ewoc-data
-             (git-add-status-file 'unknown (file-relative-name
-                                            (read-file-name "File to remove: " nil nil t))))
-            files))
+      (push (file-relative-name (read-file-name "File to remove: " nil nil t)) files))
     (if (yes-or-no-p
          (format "Remove %d file%s? " (length files) (if (> (length files) 1) "s" "")))
         (progn
-          (dolist (info files)
-            (let ((name (git-fileinfo->name info)))
-              (when (file-exists-p name) (delete-file name))))
-          (apply #'git-run-command nil nil "update-index" "--info-only" "--remove" "--" (git-get-filenames files))
-          ; remove unknown files from the list, set the others to deleted
-          (ewoc-filter git-status
-                       (lambda (info files)
-                         (not (and (memq info files) (eq (git-fileinfo->state info) 'unknown))))
-                       files)
-          (git-set-files-state files 'deleted)
-          (git-refresh-files)
-          (unless (ewoc-nth git-status 0)  ; refresh header if list is empty
-            (git-refresh-ewoc-hf git-status)))
+          (dolist (name files)
+            (when (file-exists-p name) (delete-file name)))
+          (apply #'git-run-command nil nil "update-index" "--remove" "--" files)
+          (git-update-status-files files nil))
       (message "Aborting"))))
 
 (defun git-revert-file ()
@@ -849,26 +872,23 @@ and returns the process output as a string."
                 (format "Revert %d file%s? " (length files) (if (> (length files) 1) "s" ""))))
       (dolist (info files)
         (case (git-fileinfo->state info)
-          ('added (push info added))
-          ('deleted (push info modified))
-          ('unmerged (push info modified))
-          ('modified (push info modified))))
+          ('added (push (git-fileinfo->name info) added))
+          ('deleted (push (git-fileinfo->name info) modified))
+          ('unmerged (push (git-fileinfo->name info) modified))
+          ('modified (push (git-fileinfo->name info) modified))))
       (when added
-          (apply #'git-run-command nil nil "update-index" "--force-remove" "--" (git-get-filenames added))
-          (git-set-files-state added 'unknown))
+        (apply #'git-run-command nil nil "update-index" "--force-remove" "--" added))
       (when modified
-          (apply #'git-run-command nil nil "checkout" "HEAD" (git-get-filenames modified))
-          (git-set-files-state modified 'uptodate))
-      (git-refresh-files))))
+        (apply #'git-run-command nil nil "checkout" "HEAD" modified))
+      (git-update-status-files (append added modified) 'uptodate))))
 
 (defun git-resolve-file ()
   "Resolve conflicts in marked file(s)."
   (interactive)
-  (let ((files (git-marked-files-state 'unmerged)))
+  (let ((files (git-get-filenames (git-marked-files-state 'unmerged))))
     (when files
-      (apply #'git-run-command nil nil "update-index" "--" (git-get-filenames files))
-      (git-set-files-state files 'modified)
-      (git-refresh-files))))
+      (apply #'git-run-command nil nil "update-index" "--" files)
+      (git-update-status-files files 'uptodate))))
 
 (defun git-remove-handled ()
   "Remove handled files from the status list."
@@ -1071,27 +1091,9 @@ and returns the process output as a string."
          (pos (ewoc-locate status))
          (cur-name (and pos (git-fileinfo->name (ewoc-data pos)))))
     (unless status (error "Not in git-status buffer."))
+    (git-run-command nil nil "update-index" "--refresh")
     (git-clear-status status)
-    (git-run-command nil nil "update-index" "--info-only" "--refresh")
-    (if (git-empty-db-p)
-        ; we need some special handling for an empty db
-        (with-temp-buffer
-          (git-run-command t nil "ls-files" "-z" "-t" "-c")
-          (git-parse-ls-files status 'added))
-      (with-temp-buffer
-        (git-run-command t nil "diff-index" "-z" "-M" "HEAD")
-        (git-parse-status status)))
-      (with-temp-buffer
-        (git-run-command t nil "ls-files" "-z" "-u")
-        (git-parse-ls-unmerged status))
-      (when (file-readable-p ".git/info/exclude")
-        (with-temp-buffer
-          (git-run-command t nil "ls-files" "-z" "-t" "-o"
-                           "--exclude-from=.git/info/exclude"
-                           (concat "--exclude-per-directory=" git-per-dir-ignore-file))
-          (git-parse-ls-files status 'unknown)))
-    (git-refresh-files)
-    (git-refresh-ewoc-hf status)
+    (git-update-status-files nil)
     ; move point to the current file name if any
     (let ((node (and cur-name (git-find-status-file status cur-name))))
       (when node (ewoc-goto-node status node)))))
-- 
1.5.3.rc2.39.g82303f

-- 
Alexandre Julliard
julliard@winehq.org

^ permalink raw reply related

* Re: question on alternates
From: Jakub Narebski @ 2007-07-24 10:05 UTC (permalink / raw)
  To: git
In-Reply-To: <20070724100053.GA18701@mellanox.co.il>

Michael S. Tsirkin wrote:

> Is it possible to add an alternate to .git/objects/info/alternates
> to an existig repository, after the fact?

Yes.

> If I do, is there a way to find and remove objects that
> already exist in the alternate?

I guess "git repack -a -d -l" (or "git gc --prune").

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* question on alternates
From: Michael S. Tsirkin @ 2007-07-24 10:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Is it possible to add an alternate to .git/objects/info/alternates
to an existig repository, after the fact?
If I do, is there a way to find and remove objects that
already exist in the alternate?

Thanks,

-- 
MST

^ permalink raw reply

* Re: [PATCH 3/3] Teach "git branch" about --new-workdir
From: Junio C Hamano @ 2007-07-24  9:47 UTC (permalink / raw)
  To: Johannes Schindelin
  Cc: Marius Storm-Olsen, Shawn O. Pearce, Julian Phillips, git
In-Reply-To: <Pine.LNX.4.64.0707241002410.14781@racer.site>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> While you guys are discussing this, please please keep in mind that there are
>> Windows users (/me raises his hand) out there that really really want this
>> too. So, please try to keep it light on the symlinks.
>
> Easy: use cygwin.
>
> Okay, a bit more seriously again: in the recent weeks, it seems that more 
> and more Windows users are asking for features.  Since I guess you are a 
> developer (why else would you want to use git), IMHO it is your itch to 
> scratch.

I do not know this is an appropriate itch to scratch for a
Windows developer to begin with.  The new-workdir setting *is*
about symlinked .git/ metainfo space.  If somebody wants to work
on a filesystem without symlink, he should not be using
new-workdir but something else.  E.g. GIT_DIR + GIT_WORK_TREE,
or perhaps GIT_DIR + core.worktree comes to mind.

^ permalink raw reply

* Re: [PATCH] Add glossary that can be converted into a po file for each language.
From: Christian Stimming @ 2007-07-24  9:34 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Johannes Schindelin, Shawn O. Pearce, Brett Schwarz, git,
	Paul Mackerras
In-Reply-To: <7vk5sqi91m.fsf@assigned-by-dhcp.cox.net>

Quoting Junio C Hamano <gitster@pobox.com>:
>> +++ b/po/glossary/git-gui-glossary.txt
>> @@ -0,0 +1,34 @@
>> +"English Term (Dear translator: This file will never be visible to  
>>  the user!)"	"English Definition (Dear translator: This file will   
>> never be visible to the user! It should only serve as a tool for   
>> you, the translator. Nothing more.)"
>> +"amend"	""
>> +"annotate"	""
>> +"branch [noun]"	"A 'branch' is an active line of development."
>> +"branch [verb]"	""
>> +"checkout [noun]"	""
>> +"checkout [verb]"	"The action of updating the working tree to a   
>> revision which was stored in the object database."
>> +"commit [noun]"	"A single point in the git history."
>
> I wonder.... couldn't this be written as a Tcl array that maps
> word to its definition, marked with [mc] 'gettext'ese, perhaps,
> glossary.tcl?  Then perhaps git-gui can include it and have a
> user-visible glossary as part of its help system.

I'm not so sure about this idea. I'd expect the glossary definitions  
for the translators to emphasize other issues than what a user-visible  
glossary would explain. For the user, the glossary should explain what  
each term means and what the user can *do* with this. For the  
translator, the glossary should explain what each term means and where  
it appears in the project (and which other terms it should be  
distinguished from). Also, the translator glossary IMHO should collect  
warnings about potential ambiguities as well (including the very clear  
distinction between noun and verb). Whereas the user glossary is  
probably much more verbose in what it explains, but doesn't emphasize  
as much the clear differences between verb and noun and so on.

> Am I dreaming, or too drunk?

You tell me :-)

Christian

^ permalink raw reply

* Re: [PATCH] Add a 1-second sleep to git-cvsexportcommit test
From: Robin Rosenberg @ 2007-07-24  9:34 UTC (permalink / raw)
  To: Simon 'corecode' Schubert
  Cc: Junio C Hamano, Jason Sewall, git, raa.lkml
In-Reply-To: <46A5BA87.50105@fs.ei.tum.de>

tisdag 24 juli 2007 skrev Simon 'corecode' Schubert:
> Robin Rosenberg wrote:
> >>> Since the sleep is per invocation of cvsexportcommit it won't hurt
> >>> too much since it is rarely invoked on a huge number of git commits.
> >> The question also is, why does this happen on two sequential invocations 
> >> of cvsexportcommit, but not on two cvs commits done by cvsexportcommit?  
> >> This should look the same to cvs, no?  
> > 
> > I reread my post here... My last sentence was a comment to the patch
> > and not the sleep in CVS.
> 
> Yes, I realize this.  Still, I wonder the same:  why is this needed *per
> invocation of cvsexportcommit* and not *per invocation of cvs*?  Seems
> unintuitive to me, or I didn't read the patch good enough.  

Besides the potential update and status commands cvs is only invoked once per
invocation of cvsexportcommit so there is no difference between a sleep per CVS
invokation vs a sleep per cvsexportcommit invocation. The sleep is needed to make
sure file modification times resulting from git-apply are different. 

The sleep in CVS fixes that on my machine so I do not have a problem (and cannot 
really verify that the patch I made fixes the problem).

This debug patch reveals the sleep in CVS. CVS does the sleep differently for different platforms.

diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 4efa0c9..9a1e998 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -153,7 +153,7 @@ test_expect_success \
       git commit -a -m "With spaces" &&
       id=$(git rev-list --max-count=1 HEAD) &&
       (cd "$CVSWORK" &&
-      git-cvsexportcommit -c $id &&
+      strace -fF -o a git-cvsexportcommit -c $id &&
       test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.1/-kb with spaces.txt/1.1/"
       )'
 
@@ -165,7 +165,7 @@ test_expect_success \
       git commit -a -m "Update with spaces" &&
       id=$(git rev-list --max-count=1 HEAD) &&
       (cd "$CVSWORK" &&
-      git-cvsexportcommit -c $id
+      strace -fF -o b git-cvsexportcommit -c $id
       test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.2/-kb with spaces.txt/1.2/"
       )'

Tail of the first cvsexportcommit invocation (trash/cvswork/a) from the place where it writes the last file
into the CVS repo.
 
27778 write(7, "/with spaces.png/1.1/Tue Jul 24 "..., 99) = 99
27778 close(7)                          = 0
27778 munmap(0xb7f15000, 4096)          = 0
27778 rename("CVS/Entries.Backup", "CVS/Entries") = 0
27778 unlink("CVS/Entries.Log")         = 0
27778 fchdir(6)                         = 0
27778 close(6)                          = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
27778 time(NULL)                        = 1185268822
27778 gettimeofday({1185268822, 953340}, NULL) = 0

Here CVS sleeps. The amount varies between invocations since it
only sleeps enough for the seconds to wrap.

27778 nanosleep({0, 46660000}, NULL)    = 0
27778 time(NULL)                        = 1185268823
27778 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
27778 close(1 <unfinished ...>
27766 <... read resumed> "", 4096)      = 0
27778 <... close resumed> )             = 0
27766 close(6 <unfinished ...>
27778 munmap(0xb7f14000, 4096 <unfinished ...>
27766 <... close resumed> )             = 0
27778 <... munmap resumed> )            = 0

Back into git-cvsexportcommit
27766 rt_sigaction(SIGHUP, {SIG_IGN},  <unfinished ...>
27778 exit_group(0)                     = ?
27766 <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
27766 --- SIGCHLD (Child exited) @ 0 (0) ---
27766 rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
27766 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
27766 waitpid(27778, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 27778
27766 rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0
27766 rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
27766 rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
27766 unlink(".msg")                    = 0
27766 unlink(".cvsexportcommit.diff")   = 0
27766 stat64("/home/me/tmp/git-cvsapplycommit-55ADfh", {st_mode=S_IFDIR|0700, st_size=6, ...}) = 0
27766 lstat64("/home/me/tmp/git-cvsapplycommit-55ADfh", {st_mode=S_IFDIR|0700, st_size=6, ...}) = 0
27766 chmod("/home/me/tmp/git-cvsapplycommit-55ADfh", 0700) = 0
27766 open("/home/me/tmp/git-cvsapplycommit-55ADfh", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
27766 fstat64(6, {st_mode=S_IFDIR|0700, st_size=6, ...}) = 0
27766 fcntl64(6, F_SETFD, FD_CLOEXEC)   = 0
27766 getdents64(6, /* 2 entries */, 4096) = 48
27766 getdents64(6, /* 0 entries */, 4096) = 0
27766 close(6)                          = 0
27766 rmdir("/home/me/tmp/git-cvsapplycommit-55ADfh") = 0
27766 write(1, "/home/me/SW/GIT/t/trash/cvsroot/"..., 234) = 234
27766 exit_group(0)                     = ?

-- robin

^ permalink raw reply related

* [PATCH] Mark more strings for i18n, including the status message list.
From: Christian Stimming @ 2007-07-24  9:29 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Brett Schwarz, git, Paul Mackerras, Junio C Hamano
In-Reply-To: <20070724112701.ndpm5fxaocks804s@webmail.tu-harburg.de>

Mark more strings for i18n, including the status message list.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
---
  git-gui.sh |   49 +++++++++++++++++++++++++------------------------
  1 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index fa510b9..6f5533b 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1340,31 +1340,32 @@ set all_icons(O$ui_workdir) file_plain

  set max_status_desc 0
  foreach i {
-		{__ "Unmodified"}
-
-		{_M "Modified, not staged"}
-		{M_ "Staged for commit"}
-		{MM "Portions staged for commit"}
-		{MD "Staged for commit, missing"}
-
-		{_O "Untracked, not staged"}
-		{A_ "Staged for commit"}
-		{AM "Portions staged for commit"}
-		{AD "Staged for commit, missing"}
-
-		{_D "Missing"}
-		{D_ "Staged for removal"}
-		{DO "Staged for removal, still present"}
-
-		{U_ "Requires merge resolution"}
-		{UU "Requires merge resolution"}
-		{UM "Requires merge resolution"}
-		{UD "Requires merge resolution"}
+		{__ {mc "Unmodified"}}
+
+		{_M {mc "Modified, not staged"}}
+		{M_ {mc "Staged for commit"}}
+		{MM {mc "Portions staged for commit"}}
+		{MD {mc "Staged for commit, missing"}}
+
+		{_O {mc "Untracked, not staged"}}
+		{A_ {mc "Staged for commit"}}
+		{AM {mc "Portions staged for commit"}}
+		{AD {mc "Staged for commit, missing"}}
+
+		{_D {mc "Missing"}}
+		{D_ {mc "Staged for removal"}}
+		{DO {mc "Staged for removal, still present"}}
+
+		{U_ {mc "Requires merge resolution"}}
+		{UU {mc "Requires merge resolution"}}
+		{UM {mc "Requires merge resolution"}}
+		{UD {mc "Requires merge resolution"}}
  	} {
-	if {$max_status_desc < [string length [lindex $i 1]]} {
-		set max_status_desc [string length [lindex $i 1]]
+	set text [eval [lindex $i 1]]
+	if {$max_status_desc < [string length $text]} {
+		set max_status_desc [string length $text]
  	}
-	set all_descs([lindex $i 0]) [lindex $i 1]
+	set all_descs([lindex $i 0]) $text
  }
  unset i

@@ -2299,7 +2300,7 @@ proc trace_current_diff_path {varname args} {
  	} else {
  		set p $current_diff_path
  		set s [mapdesc [lindex $file_states($p) 0] $p]
-		set f {File:}
+		set f [mc "File:"]
  		set p [escape_path $p]
  		set o normal
  	}
-- 
1.5.3.rc2.12.gbc280

^ permalink raw reply related

* Re: [PATCH] filter-branch: Big syntax change; support rewriting  multiplerefs
From: Johannes Sixt @ 2007-07-24  9:27 UTC (permalink / raw)
  To: git; +Cc: gitster
In-Reply-To: <Pine.LNX.4.64.0707231829210.14781@racer.site>

Johannes Schindelin wrote:
> +# These refs should be updated if their heads were rewritten
> +
> +git rev-parse --revs-only --symbolic "$@" |
> +while read ref
> +do
> +       # normalize ref
> +       case "$ref" in
> +       HEAD)
> +               ref="$(git symbolic-ref "$ref")"
> +       ;;
> +       refs/*)
> +       ;;
> +       *)
> +               ref="$(git for-each-ref --format='%(refname)' |
> +                       grep /"$ref")"
> +       esac
> +
> +       git check-ref-format "$ref" && echo "$ref"
> +done > "$tempdir"/heads

This does not work as I'd expected it: I can't successfully say:

   git-filter-branch master

It tells me:

   Which ref do you want to rewrite?

> +# NEEDSWORK: we should sort the unmapped refs topologically first
> +while read ref
> +do
> +       sha1=$(git rev-parse "$ref"^0)
> +       test -f "$workdir"/../map/$sha1 && continue
> +       # Assign the boundarie(s) in the set of rewritten commits
> +       # as the replacement commit(s).
> +       # (This would look a bit nicer if --not --stdin worked.)
> +       for p in $((cd "$workdir"/../map; ls | sed "s/^/^/") |
> +               git rev-list $ref --boundary --stdin |
> +               sed -n "s/^-//p")
> +       do
> +               map $p >> "$workdir"/../map/$sha1
> +       done
> +done < "$tempdir"/heads

This logic seems to be borked, and I don't grok it. I was trying this:

   git-filter-branch -- --since=2007.01.10 \
		refs/heads/topic refs/heads/master

where topic's last change is from before 2007.01.10, i.e. it is not
among the rewritten commits. And I get this:

WARNING: Ref 'refs/heads/master' is unchanged
WARNING: 'refs/heads/topic' was rewritten into multiple commits:
329325526647503382ae7dee41c12fe6b81bbe43
2bdf3349b76f72ceb71755c75a555d60bc7c73aa
ce6c9dfeac5ddbd64da2d9360d6552717df81d1f

The first 2 of these 3 sha1s happen to be merge bases of topic and
master, but none of them appear anywhere in

   git rev-list --parents --boundary --since=2007.07.10 \
		refs/heads/topic refs/heads/master

What's up?

-- Hannes

^ permalink raw reply

* [PATCH] Fix translation of strings in foreach lists.
From: Christian Stimming @ 2007-07-24  9:27 UTC (permalink / raw)
  To: Brett Schwarz, git, Paul Mackerras, Shawn O. Pearce,
	Junio C Hamano
In-Reply-To: <1282.25717.qm@web38901.mail.mud.yahoo.com>

Fix translation of strings in foreach lists.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
---
Quoting Brett Schwarz <brett_schwarz@yahoo.com>:
> I not sure if it's worth changing, but you don't necessarily need   
> those [append]'s in there.

Thanks for the info. It is basically up to Shawn to decide which style  
he likes more.

This patch is already necessary because I accidentally messed up the  
foreach argument lists. With this patch those will work again and will  
additionally be translated as well. (Unfortunately, I can't commit to  
git-gui-i18n ATM due to a http-only-firewall connection. Johannes...?  
Thanks.)

  lib/database.tcl |   16 ++++++++--------
  lib/option.tcl   |   26 +++++++++++++-------------
  2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lib/database.tcl b/lib/database.tcl
index 8dda9af..118b1b2 100644
--- a/lib/database.tcl
+++ b/lib/database.tcl
@@ -40,16 +40,16 @@ proc do_stats {} {

  	frame $w.stat -borderwidth 1 -relief solid
  	foreach s {
-		{count           [mc "Number of loose objects"]}
-		{size            [mc "Disk space used by loose objects"] { KiB}}
-		{in-pack         [mc "Number of packed objects"]}
-		{packs           [mc "Number of packs"]}
-		{size-pack       [mc "Disk space used by packed objects"] { KiB}}
-		{prune-packable  [mc "Packed objects waiting for pruning"]}
-		{garbage         [mc "Garbage files"]}
+		{count           {mc "Number of loose objects"}}
+		{size            {mc "Disk space used by loose objects"} { KiB}}
+		{in-pack         {mc "Number of packed objects"}}
+		{packs           {mc "Number of packs"}}
+		{size-pack       {mc "Disk space used by packed objects"} { KiB}}
+		{prune-packable  {mc "Packed objects waiting for pruning"}}
+		{garbage         {mc "Garbage files"}}
  		} {
  		set name [lindex $s 0]
-		set label [lindex $s 1]
+		set label [eval [lindex $s 1]]
  		if {[catch {set value $stats($name)}]} continue
  		if {[llength $s] > 2} {
  			set value "$value[lindex $s 2]"
diff --git a/lib/option.tcl b/lib/option.tcl
index 6c4d7ae..8d9e09d 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -183,22 +183,22 @@ proc do_options {} {

  	set optid 0
  	foreach option {
-		{t user.name [mc "User Name"]}
-		{t user.email [mc "Email Address"]}
-
-		{b merge.summary [mc "Summarize Merge Commits"]}
-		{i-1..5 merge.verbosity [mc "Merge Verbosity"]}
-		{b merge.diffstat [mc "Show Diffstat After Merge"]}
-
-		{b gui.trustmtime  [mc "Trust File Modification Timestamps"]}
-		{b gui.pruneduringfetch [mc "Prune Tracking Branches During Fetch"]}
-		{b gui.matchtrackingbranch [mc "Match Tracking Branches"]}
-		{i-0..99 gui.diffcontext [mc "Number of Diff Context Lines"]}
-		{t gui.newbranchtemplate [mc "New Branch Name Template"]}
+		{t user.name {mc "User Name"}}
+		{t user.email {mc "Email Address"}}
+
+		{b merge.summary {mc "Summarize Merge Commits"}}
+		{i-1..5 merge.verbosity {mc "Merge Verbosity"}}
+		{b merge.diffstat {mc "Show Diffstat After Merge"}}
+
+		{b gui.trustmtime  {mc "Trust File Modification Timestamps"}}
+		{b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
+		{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
+		{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+		{t gui.newbranchtemplate {mc "New Branch Name Template"}}
  		} {
  		set type [lindex $option 0]
  		set name [lindex $option 1]
-		set text [lindex $option 2]
+		set text [eval [lindex $option 2]]
  		incr optid
  		foreach f {repo global} {
  			switch -glob -- $type {
-- 
1.5.3.rc2.12.gbc280

^ permalink raw reply related

* Re: http git clone memory problem.
From: Johannes Schindelin @ 2007-07-24  9:26 UTC (permalink / raw)
  To: Benjamin Sergeant; +Cc: git
In-Reply-To: <1621f9fa0707232044j7cec2bes7bc7cd268775ce48@mail.gmail.com>

Hi,

On Mon, 23 Jul 2007, Benjamin Sergeant wrote:

> - Sorry for the noise if this has already been reported.
> - It's on a Mandriva Spring machine with git 1.5.0.4

That is really old.  Could you try with a newer version?  I do not 
remember off-hand if we had fixed such a problem.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Test case for "git diff" outside a git repo
From: Johannes Schindelin @ 2007-07-24  9:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Steven Grimm, git
In-Reply-To: <7vy7h6ib0b.fsf@assigned-by-dhcp.cox.net>

Hi,

On Mon, 23 Jul 2007, Junio C Hamano wrote:

> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Steven Grimm <koreth@midwinter.com> writes:
> >
> >> Signed-off-by: Steven Grimm <koreth@midwinter.com>
> >> ---
> >> 	git-diff --quiet is pretty broken right now. If you do
> >> 	"strace git diff --quiet file1 file2" you will see that
> >> 	it never calls open() on either file! And it always
> >> 	returns a zero exit code whether or not the files are
> >> 	different.
> >>
> >> 	I'm trying to follow the code to figure out what's going on,
> >> 	but meanwhile, here's a test case. Perhaps someone more
> >> 	familiar with the diff code will beat me to a fix.
> 
> The code to do "untracked diff" is an ugly stepchild and not really part 
> of git-diff proper.  In fact, --quiet also is an afterthought and I 
> would not be too surprised if the "untracked diff" code does not work 
> with it.

Not that ugly, mind you.  Every third day or so I congratulate myself for 
having "git diff --color-words" or "git diff -M", without having to suffer 
initialising a git repository.

But yes, I agree, the --quiet code came after the --no-index code, and 
thus it is well possible that the latter ignores the former.

> >> diff --git a/t/t4021-diff-norepo.sh b/t/t4021-diff-norepo.sh
> >> new file mode 100755
> >> index 0000000..dfee3d7
> >> --- /dev/null
> >> +++ b/t/t4021-diff-norepo.sh
> >> @@ -0,0 +1,26 @@
> >> +#!/bin/sh
> >> +
> >> +test_description='test git diff outside a repo'
> >> +
> >> +. ./test-lib.sh
> >> +
> >> +rm -rf .git
> 
> Unless you are testing the t/ directory and git.git suite from a 
> tarball, the only effect of this is to make t/trash controlled by its 
> ../../.git repository (i.e. the git.git repository).  You are still 
> inside a git repository.

Yes, this is no good.

However, you can force --no-index.  IMHO that is the way to go.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] git log -g: Complain, but do not fail, when no reflogs are there
From: Johannes Schindelin @ 2007-07-24  9:16 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git, gitster
In-Reply-To: <81b0412b0707240026v4321a709wcbbbd7b67a4c506b@mail.gmail.com>

Hi,

On Tue, 24 Jul 2007, Alex Riesen wrote:

> On 7/24/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > When asking "git log -g --all", clearly you want to see only those refs
> > that do have reflogs, but you do not want it to fail, either.
> > 
> > So instead of die()ing, complain about it, but move on to the other refs.
> > 
> 
> I believe you wont even see these complaints: the pager will start shortly
> afterwards and fill the screen with commits, completely hiding the errors.

You can see it briefly, but it is hidden by default.  Which is a good 
thing.  If you set the pager to "cat" (which is happily not the default!) 
you can see them clearly.  Until you are swamped by the rest of the 
output.

Maybe this is a feature?

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] git log -g: Complain, but do not fail, when no reflogs are there
From: Johannes Schindelin @ 2007-07-24  9:14 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vbqe2jr9m.fsf@assigned-by-dhcp.cox.net>

Hi,

On Mon, 23 Jul 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > When asking "git log -g --all", clearly you want to see only those refs
> > that do have reflogs, but you do not want it to fail, either.
> >
> > So instead of die()ing, complain about it, but move on to the other refs.
> 
> Hmph, do we even want to error(), I wonder...

Maybe not.  I thought it was some useful information, though.

> Can you tell, at that point, if there were explicit branch names given 
> originally on the command line, or the refs came
> from --all?

No:

                        if (!strcmp(arg, "--all")) {
                                handle_all(revs, flags);
                                continue;
                        }

which calls

static void handle_all(struct rev_info *revs, unsigned flags)
{
        struct all_refs_cb cb;
        cb.all_revs = revs;
        cb.all_flags = flags;
        for_each_ref(handle_one_ref, &cb);
}

which in turn calls

static int handle_one_ref(const char *path, const unsigned char *sha1, int flag,
 void *cb_data)
{
        struct all_refs_cb *cb = cb_data;
        struct object *object = get_reference(cb->all_revs, path, sha1,
                                              cb->all_flags);
        add_pending_object(cb->all_revs, object, path);
        return 0;
}

If you do not say --all, handle_revision_arg() is called, which calls 
add_pending_object thus:

                        add_pending_object(revs, &a->object, this);
                        add_pending_object(revs, &b->object, next);

or thus

        add_pending_object_with_mode(revs, object, arg, mode);

So no, there is not really a chance to see how the refs were specified at 
the time add_pending_object() is called.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] filter-branch: Big syntax change; support rewriting multiple refs
From: Johannes Schindelin @ 2007-07-24  9:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vfy3ejre3.fsf@assigned-by-dhcp.cox.net>

Hi,

On Mon, 23 Jul 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > 	Junio, I know that this comes quite late in the game, but I really
> > 	think that the "first arg is new branch name" was a bad syntax.
> >
> > 	Could you please consider taking this patch (or whatever version
> > 	comes out after review ;-) or keeping filter-branch of 1.5.3?  I 
> > 	do not want people to get used to the borked syntax...
> 
> Yeah, "No new features after -rc" should not apply to this one.
> 
> I was actually going to ask you about it, since this is a feature we 
> have already advertised to the public, but still is a new feature, and 
> we'd be better off getting it right in the first public version.

Thanks.

> > 	BTW I considered "git log -g --all" as an alternative to
> > 	inspecting refs/original/, but ATM this die()s if just _one_ of 
> > 	the refs has no logs.  Probably should fix that, too.
> 
> I do not think refs/original/ is such a hot feature.  What's wrong with 
> "gitk mine@{1}...mine"?

If you are saying

	$ git filter-branch <some-filters> --all <rev-list-options>

potentially all refs are rewritten.

To find out which ones actually changed, you can use "git show-ref | grep 
^refs/original/" ATM.

It is not really easy to do it otherwise.  With the patches I sent out 
yesterday,

	$ git log -g --no-walk --all --decorate --abbrev-commit 
	  --pretty=oneline --since=<before-the-last-filter-branch-call>

would be similar, but not as comfortable, would it?

Of course, we could teach filter-branch an option, say --show-changed, 
which will not actually filter branches, but instead look at the reflogs 
itself and show the refs which were recently changed by filter-branch.

But note that you can switch off reflogs.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH 3/3] Teach "git branch" about --new-workdir
From: Johannes Schindelin @ 2007-07-24  9:02 UTC (permalink / raw)
  To: Marius Storm-Olsen; +Cc: Junio C Hamano, Shawn O. Pearce, Julian Phillips, git
In-Reply-To: <46A5B5F5.6000202@trolltech.com>

Hi,

On Tue, 24 Jul 2007, Marius Storm-Olsen wrote:

> > > I live by new-workdir.  I do everything with it.  And today I
> > > just spent over an hour sorting out cases where my many, many
> > > workdirs have different refs than their base repositories,
> > > because their packed-refs files are different.
> > > Grrrrrrrrrrrrrrrrrr.
> > > 
> > > So we really need to make anyone that edits packed-refs (and maybe also
> > > config) resolve the symlink and do the edit in the target directory.  Then
> > > we can consider adding this workdir thing
> > >  to core git.
> > 
> > This is actually not limited to packed-refs file, but applies to other
> > things as well.
> > 
> > I have been wondering if something like this patch would be sufficient.  The
> > idea essentially is to take the lock on the link
> > target when we try to take a lock on something that is a symlink
> > pointing elsewhere.
> (..snip..)
> 
> While you guys are discussing this, please please keep in mind that there are
> Windows users (/me raises his hand) out there that really really want this
> too. So, please try to keep it light on the symlinks.

Easy: use cygwin.

Okay, a bit more seriously again: in the recent weeks, it seems that more 
and more Windows users are asking for features.  Since I guess you are a 
developer (why else would you want to use git), IMHO it is your itch to 
scratch.

Ciao,
Dscho

P.S.: Sorry if this came over as rude, but I am growing slightly annoyed 
by the expectation of so many that since it is Open Source, I should work 
for free.

^ permalink raw reply

* Re: [PATCH/RFH] Mark user-manual as UTF-8
From: Jeff King @ 2007-07-24  8:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields, H. Peter Anvin
In-Reply-To: <7vwswqgs6c.fsf@assigned-by-dhcp.cox.net>

On Tue, Jul 24, 2007 at 12:46:35AM -0700, Junio C Hamano wrote:

> This attempts to force UTF-8 on the generating end.
> [...]
>  * I have to warn that I do not really think I know what I am
>    doing, but this seems to "work for me".

I'm by no means a docbook expert, but I think what you've done is sane.
Supposedly there is an xsl:param "chunker.output.encoding" which would
let you do the same thing from the xsltproc command line, but I can't
seem to get it to work (and I don't know enough about xsl to even begin
figuring out why).

-Peff

^ permalink raw reply

* git documentation - user manual html version has wierd characters all over the place
From: Thierry Parmentelat @ 2007-07-24  8:37 UTC (permalink / raw)
  To: git

Hi there

just so you know: the html page here
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

has all its examples -- the ones in a <div class=literallayout> -- with 
wierd character inserted
e.g. in the Preface
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#id264704
What I see as the first example displays like this
$�man�git-clone

the same symptom appears in chapter titles
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#repositories-and-branches
displays


    Chapter�1.�Repositories and Branches

===
I am using the latest firefox 2.0.0.5 on macos 10.4.10 US version


-- thanks

^ permalink raw reply

* Re: [PATCH] Add a 1-second sleep to git-cvsexportcommit test
From: Simon 'corecode' Schubert @ 2007-07-24  8:38 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: Junio C Hamano, Jason Sewall, git, raa.lkml
In-Reply-To: <200707241033.36509.robin.rosenberg.lists@dewire.com>

Robin Rosenberg wrote:
>>> Since the sleep is per invocation of cvsexportcommit it won't hurt
>>> too much since it is rarely invoked on a huge number of git commits.
>> The question also is, why does this happen on two sequential invocations of cvsexportcommit, but not on two cvs commits done by cvsexportcommit?  This should look the same to cvs, no?
> 
> I reread my post here... My last sentence was a comment to the patch
> and not the sleep in CVS.

Yes, I realize this.  Still, I wonder the same:  why is this needed *per invocation of cvsexportcommit* and not *per invocation of cvs*?  Seems unintuitive to me, or I didn't read the patch good enough.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

^ permalink raw reply

* Re: [PATCH] Add a 1-second sleep to git-cvsexportcommit test
From: Robin Rosenberg @ 2007-07-24  8:33 UTC (permalink / raw)
  To: Simon 'corecode' Schubert
  Cc: Junio C Hamano, Jason Sewall, git, raa.lkml
In-Reply-To: <46A5B43E.3030700@fs.ei.tum.de>

tisdag 24 juli 2007 skrev Simon 'corecode' Schubert:
> Robin Rosenberg wrote:
> >>> It may be that we may want to fix this inside cvsexportcommit
> >>> itself, instead of working it around in the tests.  If somebody
> >>> tries to push more than one commit from git using two
> >>> cvsexportcommit in a row, he would need to make sure that the
> >>> second run happens one or more seconds after the first run,
> >>> otherwise he will see the exact corruption in real life.
> >> Ah, now I see the problem.  The timestamp in the CVS/Entries is the same (because it only has second granularity), 
> >> so cvs commit won't consider it as changed. 
> >>
> >> That's the reason why CVS usually waits until the second turns after a "update" (obviously not after a "commit"). 
> >> So we could either turn back the timestamp in the Entries file (ugly) or simply wait until the second turns.  Given 
> >> the overall cvs performance, this won't be a big issue, I guess. 
> > 
> > CVS sleeps after commit here. Can we bisect it? I have 1.12.3
> > (mandriva). The patch below I think would work around the problem,
> > rather than trying to fix the test. but I'd like to have the last CVS
> >  revision where it does not work for the patch comment
> 
> This is a strange thing.  CVS has this in their commit code since 1996.  So I wonder why this is getting triggered.
> 
> > Since the sleep is per invocation of cvsexportcommit it won't hurt
> > too much since it is rarely invoked on a huge number of git commits.
> 
> The question also is, why does this happen on two sequential invocations of cvsexportcommit, but not on two cvs commits done by cvsexportcommit?  This should look the same to cvs, no?

I reread my post here...  My last sentence was a comment to the patch and not the sleep in CVS.

-- robin

^ permalink raw reply

* Re: [PATCH 3/3] Teach "git branch" about --new-workdir
From: Marius Storm-Olsen @ 2007-07-24  8:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Shawn O. Pearce, Johannes Schindelin, Julian Phillips, git
In-Reply-To: <7v1wezohi4.fsf@assigned-by-dhcp.cox.net>

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

>> I live by new-workdir.  I do everything with it.  And today I
>> just spent over an hour sorting out cases where my many, many
>> workdirs have different refs than their base repositories,
>> because their packed-refs files are different.
>> Grrrrrrrrrrrrrrrrrr.
>> 
>> So we really need to make anyone that edits packed-refs (and 
>> maybe also config) resolve the symlink and do the edit in the 
>> target directory.  Then we can consider adding this workdir thing
>>  to core git.
> 
> This is actually not limited to packed-refs file, but applies to 
> other things as well.
> 
> I have been wondering if something like this patch would be 
> sufficient.  The idea essentially is to take the lock on the link
> target when we try to take a lock on something that is a symlink
> pointing elsewhere.
(..snip..)

While you guys are discussing this, please please keep in mind that 
there are Windows users (/me raises his hand) out there that really 
really want this too. So, please try to keep it light on the symlinks.

-- 
.marius


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ 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