git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cg-log patches

From
Petr Baudis <pasky@ucw.cz>
Date
May 9, 2005, 12:14 UTC
Message-ID
<20050509121435.GB18382@pasky.ji.cz>
In-Reply-To
<20050509113907.GA22830@diku.dk>

Dear diary, on Mon, May 09, 2005 at 01:39:07PM CEST, I got a letter where Jonas Fonseca <fonseca@diku.dk> told me that...

Show 5 quoted lines
> Fix cg-log -f option so that a complete list of files is
> displayed when a commit has more than one parent.
> 
> Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
But that makes no sense, since each merge will have enormous amount of
files listed, making no sense. E.g. each merge of Cogito with Linus will
have all the Cogito files listed, since they aren't in the Linus branch
- but that's wrong, since the merge _to_ the Cogito branch concerns no
Cogito files.

In git, the parents list is unordered. But this is different in Cogito, where the first parent _is_ special. If you are merging _from_ branch B _to_ branch A, the order of parents will be always

parent A parent B

In practice, it does not make too much difference, but this is one of the cases where it makes difference. So I think the current behaviour is right.

BTW, this also implies that merges
  A --
      \
  B ---+--
and
  A ---+--
      /
  B --

are considered as different ones by Cogito; in git itself, you might model that as

  A --.
       >---
  B --'

which is not possible in Cogito. I could imagine doing it by e.g. passing cg-clone multiple arguments, but I'd have to first see a compelling real-world usage for this first.

Show 22 quoted lines
> Index: cg-log
> ===================================================================
> --- 95bc73fd188347aa294991d1c5c7cffd60422098/cg-log  (mode:100755)
> +++ ddf82a0140bdc1440eb93bcbe01e14e90e44a3e8/cg-log  (mode:100755)
> @@ -67,8 +67,16 @@
>  		done
>  	fi | sort -u | \
>  	while read modes type sha1s file; do
> -		echo -n "$sep$file"
> +		echo -n "$sep"
>  		sep=", "
> + 		if [ $(echo "$line$sep$file" | wc -c) -lt 75 ]; then
> + 			line="$line$sep$file"
> + 			echo -n "$file"
> + 		else
> + 			line="$file"
> + 			echo "$coldefault"
> + 			echo -n "    $colfiles$file"
> + 		fi
>  	done
>  	echo "$coldefault:"
>  }
Could we have a trailing comma at the previous line?
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Jonas FonsecaNext: Jonas Fonseca
Message 13 of 17 in “cg-log patches”
  1. SeanMay 8, 2005
  2. Marcel HoltmannMay 8, 2005
  3. SeanMay 8, 2005
  4. Marcel HoltmannMay 8, 2005
  5. Petr BaudisMay 8, 2005
  6. SeanMay 8, 2005
  7. Petr BaudisMay 8, 2005
  8. SeanMay 8, 2005
  9. Marcel HoltmannMay 8, 2005
  10. Jonas FonsecaMay 8, 2005
  11. SeanMay 9, 2005
  12. Jonas FonsecaMay 9, 2005
  13. Petr BaudisMay 9, 2005
  14. Jonas FonsecaMay 9, 2005
  15. SeanMay 9, 2005
  16. Petr BaudisMay 10, 2005
  17. Petr BaudisMay 8, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.